@@ -18,8 +18,6 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Components"
21−import AccountsService 0.1
22−import LightDM 0.1 as LightDM
2321import Ubuntu.Components 0.1
2422import Unity.Test 0.1 as UT
2523
@@ -53,24 +51,6 @@ Rectangle {
5351 }
5452 }
5553
56− function setUser(username) {
57− AccountsService.user = username
58− LightDM.Greeter.authenticate(username)
59− }
60−
61− Connections {
62− target: LightDM.Greeter
63−
64− onShowPrompt: {
65− if (AccountsService.passwordDisplayHint === AccountsService.Numeric) {
66− pinPadCheckBox.checked = false
67− } else {
68− pinPadCheckBox.checked = true
69− }
70− lockscreen.infoText = text;
71− }
72− }
73−
7454 Rectangle {
7555 anchors.fill: parent
7656 anchors.leftMargin: lockscreen.width
@@ -151,17 +131,6 @@ Rectangle {
151131 id: enteredLabel
152132 }
153133 }
154− Button {
155− text: "start auth (1234)"
156− width: parent.width
157− onClicked: setUser("has-pin")
158− }
159− Button {
160− text: "start auth (password)"
161− width: parent.width
162− onClicked: setUser("has-password")
163− }
164−
165134 TextField {
166135 id: infoTextTextField
167136 width: parent.width
@@ -262,11 +231,11 @@ Rectangle {
262231
263232 function test_unlock_data() {
264233 return [
265− {tag: "numeric", alphanumeric: false, username: "has-pin", password: "1234", minPinLength: 4, maxPinLength: 4},
266− {tag: "alphanumeric", alphanumeric: true, username: "has-password", password: "password", minPinLength: -1, maxPinLength: -1},
267− {tag: "numeric (wrong)", alphanumeric: false, username: "has-pin", password: "4321", minPinLength: 4, maxPinLength: 4},
268− {tag: "alphanumeric (wrong)", alphanumeric: true, username: "has-password", password: "drowssap", minPinLength: -1, maxPinLength: -1},
269− {tag: "flexible length", alphanumeric: false, username: "has-pin", password: "1234", minPinLength: -1, maxPinLength: -1},
234+ {tag: "numeric", alphanumeric: false, password: "1234", minPinLength: 4, maxPinLength: 4},
235+ {tag: "alphanumeric", alphanumeric: true, password: "password", minPinLength: -1, maxPinLength: -1},
236+ {tag: "numeric (wrong)", alphanumeric: false, password: "4321", minPinLength: 4, maxPinLength: 4},
237+ {tag: "alphanumeric (wrong)", alphanumeric: true, password: "drowssap", minPinLength: -1, maxPinLength: -1},
238+ {tag: "flexible length", alphanumeric: false, password: "1234", minPinLength: -1, maxPinLength: -1},
270239 ]
271240 }
272241
@@ -274,7 +243,8 @@ Rectangle {
274243 enteredLabel.text = ""
275244 minPinLengthTextField.text = data.minPinLength
276245 maxPinLengthTextField.text = data.maxPinLength
277− setUser(data.username)
246+ pinPadCheckBox.checked = data.alphanumeric
247+ infoTextTextField.text = "Enter " + (data.alphanumeric ? "passphrase" : "passcode")
278248 waitForLockscreenReady();
279249
280250 var inputField = findChild(lockscreen, "pinentryField")