@@ -309,6 +309,18 @@ Rectangle {
309309 tryCompare(tutorialTop, "opacity", 1);
310310 }
311311
312+ function openTutorialLeftLong() {
313+ var tutorialLeftLong = findChild(shell, "tutorialLeftLong");
314+ var tutorialLeftLongTimer = findChild(tutorialLeftLong, "tutorialLeftLongTimer");
315+
316+ AccountsService.demoEdgesCompleted = ["left", "top"];
317+ ApplicationManager.startApplication("gallery-app");
318+
319+ tutorialLeftLongTimer.interval = 1;
320+ tryCompare(tutorialLeftLong, "shown", true);
321+ tryCompare(tutorialLeftLong, "opacity", 1);
322+ }
323+
312324 function openTutorialRight() {
313325 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
314326 var tutorialRight = findChild(shell, "tutorialRight");
@@ -414,6 +426,24 @@ Rectangle {
414426 tryCompare(AccountsService, "demoEdgesCompleted", ["left"]);
415427 }
416428
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");
433+
434+ verify(!tutorial.launcherLongSwipeEnabled);
435+
436+ openTutorialLeftLong();
437+ verify(tutorial.launcherLongSwipeEnabled);
438+
439+ openTutorialRight();
440+ verify(tutorial.launcherLongSwipeEnabled);
441+
442+ AccountsService.demoEdges = false;
443+ tryCompare(tutorial, "running", false);
444+ verify(tutorial.launcherLongSwipeEnabled);
445+ }
446+
417447 function test_tutorialTopEdges() {
418448 var tutorial = findChild(shell, "tutorial");
419449 var tutorialTop = findChild(tutorial, "tutorialTop");