@@ -15,6 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18+import Ubuntu.Components 1.0
1819import QtTest 1.0
1920import AccountsService 0.1
2021import GSettings 1.0
@@ -28,7 +29,7 @@ import "../../qml"
2829
2930Item {
3031 id: root
31− width: shell.width
32+ width: shell.width + units.gu(20)
3233 height: shell.height
3334
3435 QtObject {
@@ -49,6 +50,20 @@ Item {
4950
5051 Shell {
5152 id: shell
53+ maxFailedLogins: maxRetriesTextField.text
54+ }
55+ Column {
56+ anchors { top: parent.top; right: parent.right; bottom: parent.bottom; margins:units.gu(1) }
57+ width: units.gu(18)
58+
59+ Label {
60+ text: "Max retries:"
61+ color: "black"
62+ }
63+ TextField {
64+ id: maxRetriesTextField
65+ text: "-1"
66+ }
5267 }
5368
5469 SignalSpy {
@@ -74,7 +89,7 @@ Item {
7489 function init() {
7590 swipeAwayGreeter()
7691 shell.failedLoginsDelayAttempts = -1
77− shell.maxFailedLogins = -1
92+ maxRetriesTextField.text = "-1"
7893 }
7994
8095 function cleanup() {
@@ -139,7 +154,7 @@ Item {
139154 function test_emergencyCall() {
140155 var greeter = findChild(shell, "greeter")
141156 var lockscreen = findChild(shell, "lockscreen")
142− var emergencyButton = findChild(lockscreen, "emergencyCallIcon")
157+ var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
143158 var panel = findChild(shell, "panel")
144159 var indicators = findChild(shell, "indicators")
145160 var launcher = findChild(shell, "launcher")
@@ -170,7 +185,7 @@ Item {
170185
171186 function test_emergencyCallCrash() {
172187 var lockscreen = findChild(shell, "lockscreen")
173− var emergencyButton = findChild(lockscreen, "emergencyCallIcon")
188+ var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
174189 mouseClick(emergencyButton, units.gu(1), units.gu(1))
175190
176191 tryCompare(lockscreen, "shown", false)
@@ -180,7 +195,7 @@ Item {
180195
181196 function test_emergencyCallAppLaunch() {
182197 var lockscreen = findChild(shell, "lockscreen")
183− var emergencyButton = findChild(lockscreen, "emergencyCallIcon")
198+ var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
184199 mouseClick(emergencyButton, units.gu(1), units.gu(1))
185200
186201 tryCompare(lockscreen, "shown", false)
@@ -201,21 +216,21 @@ Item {
201216 function test_wrongEntries() {
202217 shell.failedLoginsDelayAttempts = 3
203218
204− var placeHolder = findChild(shell, "pinentryFieldPlaceHolder")
205− tryCompare(placeHolder, "text", "Enter your passcode")
219+ var placeHolder = findChild(shell, "wrongNoticeLabel")
220+ tryCompare(placeHolder, "text", "Incorrect passcode")
206221
207222 enterPin("1111")
208− tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
223+ tryCompare(placeHolder, "text", "Incorrect passcode")
209224
210225 enterPin("1111")
211− tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
226+ tryCompare(placeHolder, "text", "Incorrect passcode")
212227
213228 enterPin("1111")
214− tryCompare(placeHolder, "text", "Too many incorrect attempts\nPlease wait")
229+ tryCompare(placeHolder, "text", "Too many incorrect attempts")
215230 }
216231
217232 function test_factoryReset() {
218− shell.maxFailedLogins = 3
233+ maxRetriesTextField.text = "3"
219234 resetSpy.clear()
220235
221236 enterPin("1111")