@@ -18,8 +18,6 @@ import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Components"
20import "../../../qml/Components"
21−import AccountsService 0.1
22−import LightDM 0.1 as LightDM
23import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
24import Unity.Test 0.1 as UT
22import Unity.Test 0.1 as UT
@@ -53,24 +51,6 @@ Rectangle {
56− function setUser(username) {
57− AccountsService.user = username
58− LightDM.Greeter.authenticate(username)
62− target: LightDM.Greeter
65− if (AccountsService.passwordDisplayHint === AccountsService.Numeric) {
66− pinPadCheckBox.checked = false
68− pinPadCheckBox.checked = true
70− lockscreen.infoText = text;
74 Rectangle {
54 Rectangle {
75 anchors.fill: parent
55 anchors.fill: parent
76 anchors.leftMargin: lockscreen.width
56 anchors.leftMargin: lockscreen.width
@@ -151,17 +131,6 @@ Rectangle {
151 id: enteredLabel
131 id: enteredLabel
155− text: "start auth (1234)"
157− onClicked: setUser("has-pin")
160− text: "start auth (password)"
162− onClicked: setUser("has-password")
165 TextField {
134 TextField {
166 id: infoTextTextField
135 id: infoTextTextField
167 width: parent.width
136 width: parent.width
@@ -262,11 +231,11 @@ Rectangle {
263 function test_unlock_data() {
232 function test_unlock_data() {
265− {tag: "numeric", alphanumeric: false, username: "has-pin", password: "1234", minPinLength: 4, maxPinLength: 4},
234+ {tag: "numeric", alphanumeric: false, password: "1234", minPinLength: 4, maxPinLength: 4},
266− {tag: "alphanumeric", alphanumeric: true, username: "has-password", password: "password", minPinLength: -1, maxPinLength: -1},
235+ {tag: "alphanumeric", alphanumeric: true, password: "password", minPinLength: -1, maxPinLength: -1},
267− {tag: "numeric (wrong)", alphanumeric: false, username: "has-pin", password: "4321", minPinLength: 4, maxPinLength: 4},
236+ {tag: "numeric (wrong)", alphanumeric: false, password: "4321", minPinLength: 4, maxPinLength: 4},
268− {tag: "alphanumeric (wrong)", alphanumeric: true, username: "has-password", password: "drowssap", minPinLength: -1, maxPinLength: -1},
237+ {tag: "alphanumeric (wrong)", alphanumeric: true, password: "drowssap", minPinLength: -1, maxPinLength: -1},
269− {tag: "flexible length", alphanumeric: false, username: "has-pin", password: "1234", minPinLength: -1, maxPinLength: -1},
238+ {tag: "flexible length", alphanumeric: false, password: "1234", minPinLength: -1, maxPinLength: -1},
@@ -274,7 +243,8 @@ Rectangle {
274 enteredLabel.text = ""
243 enteredLabel.text = ""
275 minPinLengthTextField.text = data.minPinLength
244 minPinLengthTextField.text = data.minPinLength
276 maxPinLengthTextField.text = data.maxPinLength
245 maxPinLengthTextField.text = data.maxPinLength
277− setUser(data.username)
246+ pinPadCheckBox.checked = data.alphanumeric
247+ infoTextTextField.text = "Enter " + (data.alphanumeric ? "passphrase" : "passcode")
278 waitForLockscreenReady();
248 waitForLockscreenReady();
280 var inputField = findChild(lockscreen, "pinentryField")
250 var inputField = findChild(lockscreen, "pinentryField")