on xenial help sign in
added tests for leftEdgeDrag, with and without launcher
commit845953d99e995734c56490ebb59ec7006414fe1b authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 10 Sep 2013, 13:34 (13 years ago) parent474b700
1 file changed+26−1
tests/qmltests/tst_Shell.qml+26−1
tests/qmltests/tst_Shell.qml+26−1
@@ -114,6 +114,27 @@ Item {
114114 checkRightEdgeDragWithNoRunningApps();
115115 }
116116
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+
117138 function test_suspend() {
118139 var greeter = findChild(shell, "greeter");
119140
@@ -223,7 +244,11 @@ Item {
223244 function dragLauncherIntoView() {
224245 var launcherPanel = findChild(shell, "launcherPanel");
225246 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+
227252 tryCompare(launcherPanel, "x", 0);
228253 }
229254