on xenial help sign in
add regression tests
commit2f0f2fa2d54fea18b4a66fa3c665d9801906aaf8 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 2 Sep 2014, 15:18 (12 years ago) parentb786ccc
1 file changed+13−6
tests/qmltests/tst_Shell.qml+13−6
tests/qmltests/tst_Shell.qml+13−6
@@ -109,10 +109,11 @@ Item {
109109
110110 function test_leftEdgeDrag_data() {
111111 return [
112− {tag: "without launcher", revealLauncher: false, swipeLength: units.gu(27), appHides: true},
113− {tag: "with launcher", revealLauncher: true, swipeLength: units.gu(27), appHides: true},
114− {tag: "small swipe", revealLauncher: false, swipeLength: units.gu(25), appHides: false},
115− {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true}
112+ {tag: "without launcher", revealLauncher: false, swipeLength: units.gu(27), appHides: true, focusedApp: "dialer-app", launcherHides: true},
113+ {tag: "with launcher", revealLauncher: true, swipeLength: units.gu(27), appHides: true, focusedApp: "dialer-app", launcherHides: true},
114+ {tag: "small swipe", revealLauncher: false, swipeLength: units.gu(25), appHides: false, focusedApp: "dialer-app", launcherHides: false},
115+ {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true, focusedApp: "dialer-app", launcherHides: true},
116+ {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true, focusedApp: "unity8-dash", launcherHides: false}
116117 ];
117118 }
118119
@@ -120,16 +121,22 @@ Item {
120121 dragLauncherIntoView();
121122 tapOnAppIconInLauncher();
122123 waitUntilApplicationWindowIsFullyVisible();
124+ ApplicationManager.focusApplication(data.focusedApp)
125+ waitUntilApplicationWindowIsFullyVisible();
123126
124127 if (data.revealLauncher) {
125128 dragLauncherIntoView();
126129 }
127130
128131 swipeFromLeftEdge(data.swipeLength);
129− if (data.appHides)
132+ if (data.appHides) {
130133 waitUntilDashIsFocused();
131− else
134+ } else {
132135 waitUntilApplicationWindowIsFullyVisible();
136+ }
137+
138+ var launcher = findChild(shell, "launcherPanel");
139+ tryCompare(launcher, "x", data.launcherHides ? -launcher.width : 0)
133140 }
134141
135142 function test_suspend() {