@@ -1,5 +1,6 @@
2 * Copyright (C) 2013-2016 Canonical, Ltd.
2 * Copyright (C) 2013-2016 Canonical, Ltd.
3+ * Copyright (C) 2019 UBports Foundation
4 * This program is free software; you can redistribute it and/or modify
5 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * it under the terms of the GNU General Public License as published by
@@ -869,6 +870,30 @@ Rectangle {
869 tryCompare(launcher, "state", "visibleTemporary");
870 tryCompare(launcher, "state", "visibleTemporary");
873+ function waitUntilFocusedApplicationIsShowingItsSurface()
875+ var spreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
876+ var appState = findInvisibleChild(spreadDelegate, "applicationWindowStateGroup");
877+ tryCompare(appState, "state", "surface");
878+ var transitions = appState.transitions;
879+ for (var i = 0; i < transitions.length; ++i) {
880+ var transition = transitions[i];
881+ tryCompare(transition, "running", false, 2000);
885+ function swipeFromRightEdgeToShowAppSpread()
887+ // perform a right-edge drag to show the spread
888+ var touchStartX = shell.width - (shell.edgeSize / 2)
889+ var touchStartY = shell.height / 2;
890+ touchFlick(shell, touchStartX, touchStartY, units.gu(1) /* endX */, touchStartY /* endY */);
892+ // check if it's indeed showing the spread
893+ var stage = findChild(shell, "stage");
894+ tryCompare(stage, "state", "spread");
872 function test_snapDecisionDismissalReturnsFocus() {
897 function test_snapDecisionDismissalReturnsFocus() {
873 loadShell("phone");
898 loadShell("phone");
874 swipeAwayGreeter();
899 swipeAwayGreeter();
@@ -1351,30 +1376,6 @@ Rectangle {
1351 tryCompare(topmostSurfaceItem, "touchReleaseCount", 0);
1376 tryCompare(topmostSurfaceItem, "touchReleaseCount", 0);
1354− function waitUntilFocusedApplicationIsShowingItsSurface()
1356− var spreadDelegate = findChild(shell, "appDelegate_" + topLevelSurfaceList.idAt(0));
1357− var appState = findInvisibleChild(spreadDelegate, "applicationWindowStateGroup");
1358− tryCompare(appState, "state", "surface");
1359− var transitions = appState.transitions;
1360− for (var i = 0; i < transitions.length; ++i) {
1361− var transition = transitions[i];
1362− tryCompare(transition, "running", false, 2000);
1366− function swipeFromRightEdgeToShowAppSpread()
1368− // perform a right-edge drag to show the spread
1369− var touchStartX = shell.width - (shell.edgeSize / 2)
1370− var touchStartY = shell.height / 2;
1371− touchFlick(shell, touchStartX, touchStartY, units.gu(1) /* endX */, touchStartY /* endY */);
1373− // check if it's indeed showing the spread
1374− var stage = findChild(shell, "stage");
1375− tryCompare(stage, "state", "spread");
1378 function test_physicalHomeKeyPressDoesNothingWithActiveGreeter() {
1379 function test_physicalHomeKeyPressDoesNothingWithActiveGreeter() {
1379 loadShell("phone");
1380 loadShell("phone");
@@ -2652,13 +2653,7 @@ Rectangle {
2652 var cursor = findChild(shell, "cursor");
2653 var cursor = findChild(shell, "cursor");
2653 var indicators = findChild(shell, "indicators");
2654 var indicators = findChild(shell, "indicators");
2655− // Open indicators
2656+ showIndicators();
2656− var touchX = shell.width - units.gu(5);
2658− touchX /* fromX */, indicators.minimizedPanelHeight * 0.5 /* fromY */,
2659− touchX /* toX */, shell.height * 0.9 /* toY */,
2660− true /* beginTouch */, true /* endTouch */);
2661− tryCompare(indicators, "fullyOpened", true);
2663 // push the right edge
2658 // push the right edge
2664 mouseMove(shell, shell.width - 1, units.gu(10));
2659 mouseMove(shell, shell.width - 1, units.gu(10));