@@ -34,12 +34,11 @@ Rectangle {
3434 anchors.fill: parent
3535 anchors.rightMargin: units.gu(40)
3636 infoText: infoTextTextField.text
37− retryText: retryCountTextField.text
3837 errorText: errorTextTextField.text
3938 alphaNumeric: pinPadCheckBox.checked
4039 minPinLength: minPinLengthTextField.text
4140 maxPinLength: maxPinLengthTextField.text
42− username: "Lola"
41+ delayMinutes: delayMinutesTextField.text
4342 background: "../../../qml/graphics/phone_background.jpg"
4443 }
4544
@@ -121,12 +120,12 @@ Rectangle {
121120 }
122121 Row {
123122 TextField {
124− id: retryCountTextField
123+ id: delayMinutesTextField
125124 width: units.gu(7)
126− text: "3 retries left"
125+ text: "0"
127126 }
128127 Label {
129− text: "Retries left"
128+ text: "Delay Minutes"
130129 }
131130 }
132131 Label {
@@ -193,6 +192,7 @@ Rectangle {
193192
194193 function cleanup() {
195194 lockscreen.clear(false);
195+ delayMinutesTextField.text = "0"
196196 }
197197
198198 function waitForLockscreenReady() {
@@ -237,8 +237,8 @@ Rectangle {
237237
238238 function test_labels_data() {
239239 return [
240− {tag: "numeric", alphanumeric: false, infoText: "Please enter your PIN", username: "foobar" },
241− {tag: "alphanumeric", alphanumeric: true, infoText: "Please enter your password", username: "Lola" }
240+ {tag: "numeric", alphanumeric: false, infoText: "Please enter your PIN" },
241+ {tag: "alphanumeric", alphanumeric: true, infoText: "Please enter your password" }
242242 ]
243243 }
244244
@@ -246,15 +246,9 @@ Rectangle {
246246 pinPadCheckBox.checked = data.alphanumeric
247247 lockscreen.infoText = data.infoText
248248 waitForLockscreenReady();
249− if (data.alphanumeric) {
250− compare(findChild(lockscreen, "pinentryField").placeholderText, data.infoText, "Placeholdertext is not what it should be")
251− compare(findChild(lockscreen, "greeterLabel").text, "Hello " + data.username, "Greeter is not set correctly")
252− } else {
253− compare(findChild(lockscreen, "infoTextLabel").text, data.infoText, "Placeholdertext is not what it should be")
254− }
249+ compare(findChild(lockscreen, "infoTextLabel").text, data.infoText, "Placeholdertext is not what it should be")
255250 }
256251
257−
258252 function test_unlock_data() {
259253 return [
260254 {tag: "numeric", alphanumeric: false, username: "has-pin", password: "1234", minPinLength: 4, maxPinLength: 4},
@@ -274,8 +268,7 @@ Rectangle {
274268
275269 var inputField = findChild(lockscreen, "pinentryField")
276270 if (data.alphanumeric) {
277− mouseClick(inputField, units.gu(1), units.gu(1))
278− tryCompare(inputField, "focus", true);
271+ tryCompare(inputField, "activeFocus", true);
279272 typeString(data.password)
280273 keyClick(Qt.Key_Enter)
281274 } else {
@@ -305,7 +298,6 @@ Rectangle {
305298
306299 var inputField = findChild(lockscreen, "pinentryField")
307300 if (data.alphanumeric) {
308− mouseClick(inputField, units.gu(1), units.gu(1))
309301 tryCompare(inputField, "activeFocus", true);
310302 typeString("1")
311303 } else {
@@ -419,22 +411,6 @@ Rectangle {
419411 }
420412 }
421413
422− function test_retryDisplay_data() {
423− return [
424− {tag: "empty", retryText: " "},
425− {tag: "3 retries left", retryText: "3 retries left"},
426− ]
427− }
428−
429− function test_retryDisplay(data) {
430− pinPadCheckBox.checked = false
431− waitForLockscreenReady();
432−
433− retryCountTextField.text = data.retryText;
434− var label = findChild(lockscreen, "retryLabel")
435− compare(label.text, data.retryText);
436− }
437−
438414 function test_infoPopup() {
439415 verify(findChild(root, "infoPopup") === null);
440416 lockscreen.showInfoPopup("foo", "bar");
@@ -470,6 +446,13 @@ Rectangle {
470446 var label = findChild(lockscreen, "infoTextLabel")
471447 compare(label.text, data.text);
472448 }
449+
450+ function test_delayMinutes() {
451+ delayMinutesTextField.text = "4"
452+ waitForLockscreenReady()
453+ var label = findChild(lockscreen, "deviceLockedLabel")
454+ compare(label.text, "Device Locked")
455+ }
473456 }
474457
475458 SignalSpy {