on xenial help sign in
added tests for leftEdgeDrag, with and without launcher
845953dMichael Zanetti
tests/qmltests/tst_Shell.qml+26−1
@@ -114,6 +114,27 @@ Item {
114 checkRightEdgeDragWithNoRunningApps();
114 checkRightEdgeDragWithNoRunningApps();
115 }
115 }
116
116
117+ function test_leftEdgeDrag_data() {
118+ return [
119+ {tag: "without launcher", revealLauncher: false},
120+ {tag: "with launcher", revealLauncher: true},
121+ ];
122+ }
123+
124+ function test_leftEdgeDrag(data) {
125+ dragLauncherIntoView();
126+ tapOnAppIconInLauncher();
127+ waitUntilApplicationWindowIsFullyVisible();
128+
129+ if (data.revealLauncher) {
130+ dragLauncherIntoView();
131+ }
132+
133+ swipeFromLeftEdge();
134+ cleanup();
135+ waitForUIToSettle();
136+ }
137+
117 function test_suspend() {
138 function test_suspend() {
118 var greeter = findChild(shell, "greeter");
139 var greeter = findChild(shell, "greeter");
119
140
@@ -223,7 +244,11 @@ Item {
223 function dragLauncherIntoView() {
244 function dragLauncherIntoView() {
224 var launcherPanel = findChild(shell, "launcherPanel");
245 var launcherPanel = findChild(shell, "launcherPanel");
225 verify(launcherPanel.x = - launcherPanel.width);
246 verify(launcherPanel.x = - launcherPanel.width);
226− swipeFromLeftEdge();
247+
248+ var touchStartX = 2;
249+ var touchStartY = shell.height / 2;
250+ touchFlick(shell, touchStartX, touchStartY, launcherPanel.width + units.gu(1), touchStartY);
251+
227 tryCompare(launcherPanel, "x", 0);
252 tryCompare(launcherPanel, "x", 0);
228 }
253 }
229
254