@@ -971,16 +971,31 @@ Rectangle {
971971 // If we swipe too much we will trigger the spread mode
972972 // and we don't want that.
973973 var spreadView = findChild(shell, "spreadView");
974− var swipeLength = (spreadView.positionMarker1 * spreadView.width) * 0.5;
974+ verify(spreadView);
975975
976976 verify(ApplicationManager.count >= 2);
977977 var previousApp = ApplicationManager.get(1);
978978
979979 var touchStartX = shell.width - 1;
980980 var touchStartY = shell.height / 2;
981− touchFlick(shell,
982− touchStartX, touchStartY,
983− touchStartX - swipeLength, touchStartY);
981+
982+ var condition;
983+ if (applicationArguments.deviceName === "phone") {
984+ condition = function() {
985+ return spreadView.shiftedContentX > units.gu(2) &&
986+ spreadView.shiftedContentX < spreadView.positionMarker1 * spreadView.width;
987+ };
988+ } else {
989+ condition = function() {
990+ return spreadView.shiftedContentX > spreadView.width * spreadView.positionMarker1
991+ && spreadView.shiftedContentX < spreadView.width * spreadView.positionMarker2;
992+ };
993+ }
994+
995+ touchDragUntil(shell,
996+ touchStartX, touchStartY,
997+ -units.gu(1), 0,
998+ condition);
984999
9851000 // ensure the app switch animation has ended
9861001 tryCompare(spreadView, "shiftedContentX", 0);
@@ -1063,6 +1078,8 @@ Rectangle {
10631078
10641079 waitUntilShellIsInOrientation(root.physicalOrientation0);
10651080
1081+ waitForGreeterToStabilize();
1082+
10661083 swipeAwayGreeter();
10671084
10681085 var spreadRepeater = findChild(shell, "spreadRepeater");
@@ -1071,6 +1088,19 @@ Rectangle {
10711088 }
10721089 }
10731090
1091+ function waitForGreeterToStabilize() {
1092+ var greeter = findChild(shell, "greeter");
1093+ verify(greeter);
1094+
1095+ var loginList = findChild(greeter, "loginList");
1096+ // Only present in WideView
1097+ if (loginList) {
1098+ var userList = findChild(loginList, "userList");
1099+ verify(userList);
1100+ tryCompare(userList, "movingInternally", false);
1101+ }
1102+ }
1103+
10741104 // expectedAngle is in orientedShell's coordinate system
10751105 function checkAppSurfaceOrientation(app, expectedAngle) {
10761106 var surface = app.session.surface;