@@ -108,6 +108,8 @@ Item {
108108
109109 function init() {
110110 swipeAwayGreeter()
111+ shell.failedLoginsDelayAttempts = -1
112+ shell.maxFailedLogins = -1
111113 }
112114
113115 function cleanup() {
@@ -154,6 +156,7 @@ Item {
154156 }
155157
156158 function test_login() {
159+ sessionSpy.clear()
157160 tryCompare(sessionSpy, "count", 0)
158161 enterPin("1234")
159162 tryCompare(sessionSpy, "count", 1)
@@ -220,11 +223,27 @@ Item {
220223 tryCompare(AccountsService, "failedLogins", 0)
221224 }
222225
226+ function test_wrongEntries() {
227+ shell.failedLoginsDelayAttempts = 3
228+
229+ var placeHolder = findChild(shell, "pinentryFieldPlaceHolder")
230+ tryCompare(placeHolder, "text", "Enter your passcode")
231+
232+ enterPin("1111")
233+ tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
234+
235+ enterPin("1111")
236+ tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
237+
238+ enterPin("1111")
239+ tryCompare(placeHolder, "text", "Too many incorrect attempts\nPlease wait")
240+ }
241+
223242 function test_factoryReset() {
243+ shell.maxFailedLogins = 3
224244 resetSpy.clear()
225245
226246 enterPin("1111")
227−
228247 enterPin("1111")
229248 tryCompareFunction(function() {return findChild(root, "factoryResetWarningDialog") !== null}, true)
230249