@@ -108,6 +108,8 @@ Item {
109 function init() {
109 function init() {
110 swipeAwayGreeter()
110 swipeAwayGreeter()
111+ shell.failedLoginsDelayAttempts = -1
112+ shell.maxFailedLogins = -1
113 function cleanup() {
115 function cleanup() {
@@ -154,6 +156,7 @@ Item {
156 function test_login() {
158 function test_login() {
157 tryCompare(sessionSpy, "count", 0)
160 tryCompare(sessionSpy, "count", 0)
158 enterPin("1234")
161 enterPin("1234")
159 tryCompare(sessionSpy, "count", 1)
162 tryCompare(sessionSpy, "count", 1)
@@ -220,11 +223,27 @@ Item {
220 tryCompare(AccountsService, "failedLogins", 0)
223 tryCompare(AccountsService, "failedLogins", 0)
226+ function test_wrongEntries() {
227+ shell.failedLoginsDelayAttempts = 3
229+ var placeHolder = findChild(shell, "pinentryFieldPlaceHolder")
230+ tryCompare(placeHolder, "text", "Enter your passcode")
233+ tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
236+ tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
239+ tryCompare(placeHolder, "text", "Too many incorrect attempts\nPlease wait")
223 function test_factoryReset() {
242 function test_factoryReset() {
243+ shell.maxFailedLogins = 3
224 resetSpy.clear()
244 resetSpy.clear()
226 enterPin("1111")
246 enterPin("1111")
228 enterPin("1111")
247 enterPin("1111")
229 tryCompareFunction(function() {return findChild(root, "factoryResetWarningDialog") !== null}, true)
248 tryCompareFunction(function() {return findChild(root, "factoryResetWarningDialog") !== null}, true)