@@ -102,7 +102,6 @@ Item {
102102 }
103103
104104 Component.onCompleted: {
105− theme.name = "Ubuntu.Components.Themes.SuruDark";
106105 setup();
107106 }
108107
@@ -208,13 +207,6 @@ Item {
208207 if (name === page.objectName) return page;
209208 tap(findChild(page, "nameInput"));
210209 typeString("foobar");
211− tap(findChild(page, "passInput"));
212− typeString("12345678");
213− var pass2Input = findChild(page, "pass2Input");
214− // give it a bit of time to finish the scroll-into-view animation
215− tryCompareFunction(function() { return pass2Input !== null; }, true);
216− tap(pass2Input);
217− typeString("12345678");
218210 tap(findChild(page, "forwardButton"));
219211
220212 page = waitForPage("passwdPage");
@@ -300,21 +292,31 @@ Item {
300292 waitForPage("wifiPage"); // thus skipping passwdPage
301293 }
302294
295+ function verifyAnimationsNotRunning(page) {
296+ var contentAnimation = findInvisibleChild(page, "contentAnimation");
297+ var secondaryAnimation = findInvisibleChild(page, "secondaryAnimation");
298+ tryCompare(contentAnimation, "running", false);
299+ tryCompare(secondaryAnimation, "running", false);
300+ }
301+
303302 function test_passwdPasscode() {
304303 var page = goToPage("passwdPage");
305− tap(findChild(page, "passwdDelegate2")); // passcode option
304+ tap(findChild(page, "passwdDelegate1")); // passcode option
306305 tap(findChild(page, "forwardButton"));
307306 page = waitForPage("passcodeSetPage");
307+ verifyAnimationsNotRunning(page);
308308
309309 enterPasscode("1111");
310310 page = waitForPage("passcodeConfirmPage");
311+ verifyAnimationsNotRunning(page);
311312
312− // make sure we go back to 'set' page not 'type' page
313313 tap(findChild(page, "backButton"));
314314 page = waitForPage("passcodeSetPage");
315+ verifyAnimationsNotRunning(page);
315316
316317 enterPasscode("1111");
317318 page = waitForPage("passcodeConfirmPage");
319+ verifyAnimationsNotRunning(page);
318320
319321 enterPasscode("1112");
320322 var error = findChild(page, "wrongNoticeLabel");
@@ -337,47 +339,29 @@ Item {
337339
338340 function test_passwdPassphrase() {
339341 var page = goToPage("passwdPage");
340− tap(findChild(page, "passwdDelegate1")); // password option
342+ tap(findChild(page, "passwdDelegate0")); // password option
341343 tap(findChild(page, "forwardButton"));
342344 page = waitForPage("passwdSetPage");
343345
344346 var passwdField = findChild(page, "passwordField");
345347 verify(passwdField);
346348 tap(passwdField);
349+ waitUntilTransitionsEnd(passwdField);
347350 typeString("aaa");
348− var continueButton = findChild(page, "okButton");
349− tryCompare(continueButton, "enabled", false);
351+ var continueButton = findChild(page, "forwardButton");
352+ tryCompare(page, "passwordsMatching", false);
350353
351354 tap(passwdField);
355+ waitUntilTransitionsEnd(passwdField);
352356 passwdField.selectAll(); // overwrite the text
353357 typeString("12345678");
354− tap(continueButton);
355− wait(200);
356−
357− // make sure we go back to 'set' page not 'type' page
358− var back = findChild(page, "cancelButton");
359− tap(back);
360− wait(200);
358+ tryCompare(page, "passwordsMatching", false);
361359
362− passwdField = findChild(page, "passwordField");
363− tryCompareFunction(function() {return !!passwdField}, true);
364− tap(passwdField);
365− typeString("aaab");
366−
367− continueButton = findChild(page, "okButton");
368− tryCompare(continueButton, "enabled", false);
369− var error = findChild(page, "infoLabel");
370− tryCompareFunction(function() { return error.text !== ""; }, true);
371−
372− tap(passwdField);
373− passwdField.selectAll(); // overwrite the text
374− typeString("12345678");
375− tap(continueButton);
376− wait(200);
377−
378− tap(passwdField);
379− passwdField.selectAll(); // overwrite the text
360+ var passwd2Field = findChild(page, "password2Field");
361+ tap(passwd2Field);
362+ waitUntilTransitionsEnd(passwd2Field);
380363 typeString("12345678");
364+ tryCompare(continueButton, "enabled", true);
381365 tap(continueButton);
382366
383367 // now finish up
@@ -395,7 +379,7 @@ Item {
395379
396380 function test_passwdSwipe() {
397381 var page = goToPage("passwdPage");
398− tap(findChild(page, "passwdDelegate3")); // swipe option
382+ tap(findChild(page, "passwdDelegate2")); // swipe option
399383
400384 // now finish up
401385 tap(findChild(page, "forwardButton"));
@@ -405,10 +389,7 @@ Item {
405389 waitUntilTransitionsEnd(page);
406390 tap(findChild(page, "finishButton"));
407391
408− tryCompare(setSecuritySpy, "count", 1);
409− //compare(setSecuritySpy.signalArguments[0][0], ""); // FIXME the swipe method collides with the account password
410− //compare(setSecuritySpy.signalArguments[0][1], "");
411− compare(setSecuritySpy.signalArguments[0][2], UbuntuSecurityPrivacyPanel.Swipe);
392+ tryCompare(setSecuritySpy, "count", 0); // not called for swipe method
412393 }
413394
414395 function test_locationGpsOnly() {
@@ -501,50 +482,10 @@ Item {
501482
502483 function test_accountPage() {
503484 var page = goToPage("accountPage");
504− var password1 = findChild(page, "passInput");
505− var password2 = findChild(page, "pass2Input");
506485 var forwardButton = findChild(page, "forwardButton");
507486
508487 tap(findChild(page, "nameInput"));
509488 typeString("foobar");
510−
511− verify(forwardButton.enabled, false); // no passwords yet
512−
513− tap(password1);
514− typeString("12345");
515−
516− verify(forwardButton.enabled, false); // password too short
517−
518− tap(password2);
519− typeString("12345678");
520−
521− verify(forwardButton.enabled, false); // passwords don't match
522−
523− tap(password1);
524− password1.selectAll();
525− typeString("12345678");
526−
527− verify(forwardButton.enabled, true); // now they match
528−
529− var pages = findChild(wizard, "wizardPages");
530− var security = findInvisibleChild(pages, "securityPrivacy");
531− setSecuritySpy.target = security;
532−
533− // now finish up
534− tap(forwardButton);
535− page = waitForPage("passwdPage");
536− tap(findChild(page, "passwdDelegate0")); // account option
537− tap(findChild(page, "forwardButton"));
538− page = waitForPage("reportingPage");
539− tap(findChild(page, "forwardButton"));
540− page = waitForPage("finishedPage");
541− waitUntilTransitionsEnd(page);
542− tap(findChild(page, "finishButton"));
543−
544− tryCompare(setSecuritySpy, "count", 1);
545− compare(setSecuritySpy.signalArguments[0][0], "");
546− compare(setSecuritySpy.signalArguments[0][1], "12345678");
547− compare(setSecuritySpy.signalArguments[0][2], UbuntuSecurityPrivacyPanel.Passphrase);
548489 }
549490 }
550491}