@@ -304,39 +304,39 @@ Rectangle {
306 function openTutorialTop() {
306 function openTutorialTop() {
307− var tutorialLeft = findChild(shell, "tutorialLeft");
307+ var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
308 var tutorialTop = findChild(shell, "tutorialTop");
308 var tutorialTop = findChild(shell, "tutorialTop");
309 var tutorialTopTimer = findInvisibleChild(tutorialTop, "tutorialTopTimer");
309 var tutorialTopTimer = findInvisibleChild(tutorialTop, "tutorialTopTimer");
311 tutorialTopTimer.interval = 1;
311 tutorialTopTimer.interval = 1;
312 AccountsService.demoEdgesCompleted = ["left"];
312 AccountsService.demoEdgesCompleted = ["left"];
314− tryCompare(tutorialLeft, "visible", false);
314+ tryCompare(tutorialLeftLoader, "active", false);
315 tryCompare(tutorialTop, "shown", true);
315 tryCompare(tutorialTop, "shown", true);
316 tryCompare(tutorialTop, "opacity", 1);
316 tryCompare(tutorialTop, "opacity", 1);
319 function openTutorialRight() {
319 function openTutorialRight() {
320− var tutorialLeft = findChild(shell, "tutorialLeft");
320+ var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
321 var tutorialRight = findChild(shell, "tutorialRight");
321 var tutorialRight = findChild(shell, "tutorialRight");
323 AccountsService.demoEdgesCompleted = ["left", "top"];
323 AccountsService.demoEdgesCompleted = ["left", "top"];
324 ApplicationManager.startApplication("gallery-app");
324 ApplicationManager.startApplication("gallery-app");
325 ApplicationManager.startApplication("facebook-webapp");
325 ApplicationManager.startApplication("facebook-webapp");
327− tryCompare(tutorialLeft, "visible", false);
327+ tryCompare(tutorialLeftLoader, "active", false);
328 tryCompare(tutorialRight, "shown", true);
328 tryCompare(tutorialRight, "shown", true);
329 tryCompare(tutorialRight, "opacity", 1);
329 tryCompare(tutorialRight, "opacity", 1);
332 function openTutorialBottom() {
332 function openTutorialBottom() {
333− var tutorialLeft = findChild(shell, "tutorialLeft");
333+ var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
334 var tutorialBottom = findChild(shell, "tutorialBottom");
334 var tutorialBottom = findChild(shell, "tutorialBottom");
336 AccountsService.demoEdgesCompleted = ["left", "top", "right"];
336 AccountsService.demoEdgesCompleted = ["left", "top", "right"];
337 ApplicationManager.startApplication("dialer-app");
337 ApplicationManager.startApplication("dialer-app");
339− tryCompare(tutorialLeft, "visible", false);
339+ tryCompare(tutorialLeftLoader, "active", false);
340 tryCompare(tutorialBottom, "shown", true);
340 tryCompare(tutorialBottom, "shown", true);
341 tryCompare(tutorialBottom, "opacity", 1);
341 tryCompare(tutorialBottom, "opacity", 1);
@@ -480,10 +480,10 @@ Rectangle {
480 function test_tutorialTopAutoSkipped() {
480 function test_tutorialTopAutoSkipped() {
481 // Test that we skip the tutorial if user uses top edge themselves
481 // Test that we skip the tutorial if user uses top edge themselves
483− var tutorialLeft = findChild(shell, "tutorialLeft");
483+ var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
484 var tutorialTop = findChild(shell, "tutorialTop");
484 var tutorialTop = findChild(shell, "tutorialTop");
485 AccountsService.demoEdgesCompleted = ["left"];
485 AccountsService.demoEdgesCompleted = ["left"];
486− tryCompare(tutorialLeft, "visible", false);
486+ tryCompare(tutorialLeftLoader, "active", false);
487 verify(!tutorialTop.shown);
487 verify(!tutorialTop.shown);
489 touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
489 touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
@@ -559,9 +559,9 @@ Rectangle {
559 function test_tutorialRightAutoSkipped() {
559 function test_tutorialRightAutoSkipped() {
560 // Test that we skip the tutorial if user uses right edge themselves
560 // Test that we skip the tutorial if user uses right edge themselves
562− var tutorialLeft = findChild(shell, "tutorialLeft");
562+ var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
563 AccountsService.demoEdgesCompleted = ["left"];
563 AccountsService.demoEdgesCompleted = ["left"];
564− tryCompare(tutorialLeft, "visible", false);
564+ tryCompare(tutorialLeftLoader, "active", false);
566 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
566 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
567 tryCompare(AccountsService, "demoEdgesCompleted", ["left", "right"]);
567 tryCompare(AccountsService, "demoEdgesCompleted", ["left", "right"]);
@@ -570,6 +570,7 @@ Rectangle {
570 function test_tutorialBottomEdges() {
570 function test_tutorialBottomEdges() {
571 var tutorial = findChild(shell, "tutorial");
571 var tutorial = findChild(shell, "tutorial");
572 var tutorialBottom = findChild(tutorial, "tutorialBottom");
572 var tutorialBottom = findChild(tutorial, "tutorialBottom");
573+ var tutorialLabel = findChild(tutorialBottom, "tutorialLabel");
573 var launcher = findChild(shell, "launcher");
574 var launcher = findChild(shell, "launcher");
574 var stage = findChild(shell, "stage");
575 var stage = findChild(shell, "stage");
575 var panel = findChild(shell, "panel");
576 var panel = findChild(shell, "panel");
@@ -584,6 +585,7 @@ Rectangle {
584 verify(!launcher.available);
585 verify(!launcher.available);
585 verify(!stage.spreadEnabled);
586 verify(!stage.spreadEnabled);
586 verify(!panel.indicators.available);
587 verify(!panel.indicators.available);
588+ compare(tutorialLabel.text, "Swipe up for recent calls");
589 function test_tutorialBottomFinish() {
591 function test_tutorialBottomFinish() {
@@ -594,15 +596,24 @@ Rectangle {
594 touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
596 touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
596 tryCompare(tutorialBottom, "shown", false);
598 tryCompare(tutorialBottom, "shown", false);
597− tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top", "right", "bottom"]);
599+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top", "right", "bottom-dialer-app"]);
601+ // OK, we did one, just confirm that when all are done, we mark whole tutorial as done.
598− tryCompare(AccountsService, "demoEdges", false);
602+ verify(AccountsService.demoEdges);
603+ AccountsService.demoEdgesCompleted = ["left", "top", "right",
604+ "bottom-address-book-app",
605+ "bottom-com.ubuntu.calculator_calculator",
606+ "bottom-com.ubuntu.clock_clock",
607+ "bottom-dialer-app",
608+ "bottom-messaging-app"];
609+ verify(!AccountsService.demoEdges);
601 function test_tutorialBottomAppearsBeforeRight() {
612 function test_tutorialBottomAppearsBeforeRight() {
602 // Confirm that if bottom edge and right edge would appear on the
613 // Confirm that if bottom edge and right edge would appear on the
603 // the same app open, bottom edge appears first. (this is a lightly
614 // the same app open, bottom edge appears first. (this is a lightly
604 // edited version of openTutorialRight)
615 // edited version of openTutorialRight)
605− var tutorialLeft = findChild(shell, "tutorialLeft");
616+ var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
606 var tutorialRight = findChild(shell, "tutorialRight");
617 var tutorialRight = findChild(shell, "tutorialRight");
607 var tutorialBottom = findChild(shell, "tutorialBottom");
618 var tutorialBottom = findChild(shell, "tutorialBottom");
@@ -610,10 +621,10 @@ Rectangle {
610 ApplicationManager.startApplication("gallery-app");
621 ApplicationManager.startApplication("gallery-app");
611 ApplicationManager.startApplication("dialer-app");
622 ApplicationManager.startApplication("dialer-app");
613− tryCompare(tutorialLeft, "visible", false);
624+ tryCompare(tutorialLeftLoader, "active", false);
614− tryCompare(tutorialRight, "visible", false);
615 tryCompare(tutorialBottom, "shown", true);
625 tryCompare(tutorialBottom, "shown", true);
616 tryCompare(tutorialBottom, "opacity", 1);
626 tryCompare(tutorialBottom, "opacity", 1);
627+ tryCompare(tutorialRight, "visible", false);
619 function test_tutorialBottomOnlyCoversSideStageOnTablet() {
630 function test_tutorialBottomOnlyCoversSideStageOnTablet() {
@@ -712,20 +723,20 @@ Rectangle {
712 function test_desktopOnlyShowsTutorialRight() {
723 function test_desktopOnlyShowsTutorialRight() {
713 loadShell("desktop");
724 loadShell("desktop");
715− var tutorialLeft = findChild(shell, "tutorialLeft");
726+ var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
716− var tutorialTop = findChild(shell, "tutorialTop");
727+ var tutorialTopLoader = findChild(shell, "tutorialTopLoader");
717− var tutorialRight = findChild(shell, "tutorialRight");
728+ var tutorialRightLoader = findChild(shell, "tutorialRightLoader");
718− var tutorialBottom = findChild(shell, "tutorialBottom");
729+ var tutorialBottomLoader = findChild(shell, "tutorialBottomLoader");
719− verify(tutorialLeft.skipped);
730+ verify(!tutorialLeftLoader.active);
720− verify(tutorialTop.skipped);
731+ verify(!tutorialTopLoader.active);
721− verify(!tutorialRight.skipped);
732+ verify(tutorialRightLoader.active);
722− verify(tutorialBottom.skipped);
733+ verify(!tutorialBottomLoader.active);
723 compare(AccountsService.demoEdgesCompleted, []);
734 compare(AccountsService.demoEdgesCompleted, []);
725 ApplicationManager.startApplication("dialer-app");
736 ApplicationManager.startApplication("dialer-app");
726 ApplicationManager.startApplication("camera-app");
737 ApplicationManager.startApplication("camera-app");
727− tryCompare(tutorialRight, "isReady", true);
738+ tryCompare(tutorialRightLoader.item, "isReady", true);
728− tryCompare(tutorialRight, "shown", true);
739+ tryCompare(tutorialRightLoader, "shown", true);
731 function test_oskDoesNotHideTutorial() {
742 function test_oskDoesNotHideTutorial() {