@@ -309,6 +309,18 @@ Rectangle {
309 tryCompare(tutorialTop, "opacity", 1);
309 tryCompare(tutorialTop, "opacity", 1);
312+ function openTutorialLeftLong() {
313+ var tutorialLeftLong = findChild(shell, "tutorialLeftLong");
314+ var tutorialLeftLongTimer = findChild(tutorialLeftLong, "tutorialLeftLongTimer");
316+ AccountsService.demoEdgesCompleted = ["left", "top"];
317+ ApplicationManager.startApplication("gallery-app");
319+ tutorialLeftLongTimer.interval = 1;
320+ tryCompare(tutorialLeftLong, "shown", true);
321+ tryCompare(tutorialLeftLong, "opacity", 1);
312 function openTutorialRight() {
324 function openTutorialRight() {
313 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
325 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
314 var tutorialRight = findChild(shell, "tutorialRight");
326 var tutorialRight = findChild(shell, "tutorialRight");
@@ -414,6 +426,24 @@ Rectangle {
414 tryCompare(AccountsService, "demoEdgesCompleted", ["left"]);
426 tryCompare(AccountsService, "demoEdgesCompleted", ["left"]);
429+ function test_tutorialLongLeftSwipeDisabled() {
430+ // Test that a long left swipe is disabled until we get to or pass
431+ // the long left tutorial.
432+ var tutorial = findChild(shell, "tutorial");
434+ verify(!tutorial.launcherLongSwipeEnabled);
436+ openTutorialLeftLong();
437+ verify(tutorial.launcherLongSwipeEnabled);
439+ openTutorialRight();
440+ verify(tutorial.launcherLongSwipeEnabled);
442+ AccountsService.demoEdges = false;
443+ tryCompare(tutorial, "running", false);
444+ verify(tutorial.launcherLongSwipeEnabled);
417 function test_tutorialTopEdges() {
447 function test_tutorialTopEdges() {
418 var tutorial = findChild(shell, "tutorial");
448 var tutorial = findChild(shell, "tutorial");
419 var tutorialTop = findChild(tutorial, "tutorialTop");
449 var tutorialTop = findChild(tutorial, "tutorialTop");