@@ -980,6 +980,11 @@ Rectangle {
980980 function test_launchLandscapeOnlyAppOverPortraitOnlyDashThenSwitchToDash() {
981981 loadShell("mako");
982982
983+ var dashSurfaceId = topLevelSurfaceList.nextId;
984+ var dashApp = ApplicationManager.startApplication("unity8-dash");
985+ verify(dashApp);
986+ waitUntilAppWindowIsFullyLoaded(dashSurfaceId);
987+
983988 // starts as portrait, as unity8-dash is portrait only
984989 tryCompare(shell, "transformRotationAngle", 0);
985990
@@ -999,7 +1004,10 @@ Rectangle {
9991004 var rotationStates = findInvisibleChild(orientedShell, "rotationStates");
10001005 waitUntilTransitionsEnd(rotationStates);
10011006
1002− performLeftEdgeSwipeToSwitchToDash();
1007+ performLeftEdgeSwipe();
1008+
1009+ // should have switched to dash
1010+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
10031011
10041012 // Should be back to portrait
10051013 tryCompare(shell, "transformRotationAngle", 0);
@@ -1391,7 +1399,7 @@ Rectangle {
13911399 waitUntilTransitionsEnd(rotationStates);
13921400 }
13931401
1394− function performLeftEdgeSwipeToSwitchToDash() {
1402+ function performLeftEdgeSwipe() {
13951403 var swipeLength = shell.width * 0.7;
13961404
13971405 var touchStartX = 1;
@@ -1399,8 +1407,6 @@ Rectangle {
13991407 touchFlick(shell,
14001408 touchStartX, touchStartY,
14011409 touchStartX + swipeLength, touchStartY);
1402−
1403− tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
14041410 }
14051411
14061412 function performEdgeSwipeToSwitchToPreviousApp() {