on xenial help sign in
add regression tests
2f0f2faMichael Zanetti
tests/qmltests/tst_Shell.qml+13−6
@@ -109,10 +109,11 @@ Item {
109
109
110 function test_leftEdgeDrag_data() {
110 function test_leftEdgeDrag_data() {
111 return [
111 return [
112− {tag: "without launcher", 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},
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},
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},
115− {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true}
116+ {tag: "long swipe", revealLauncher: false, swipeLength: units.gu(27), appHides: true, focusedApp: "unity8-dash", launcherHides: false}
116 ];
117 ];
117 }
118 }
118
119
@@ -120,16 +121,22 @@ Item {
120 dragLauncherIntoView();
121 dragLauncherIntoView();
121 tapOnAppIconInLauncher();
122 tapOnAppIconInLauncher();
122 waitUntilApplicationWindowIsFullyVisible();
123 waitUntilApplicationWindowIsFullyVisible();
124+ ApplicationManager.focusApplication(data.focusedApp)
125+ waitUntilApplicationWindowIsFullyVisible();
123
126
124 if (data.revealLauncher) {
127 if (data.revealLauncher) {
125 dragLauncherIntoView();
128 dragLauncherIntoView();
126 }
129 }
127
130
128 swipeFromLeftEdge(data.swipeLength);
131 swipeFromLeftEdge(data.swipeLength);
129− if (data.appHides)
132+ if (data.appHides) {
130 waitUntilDashIsFocused();
133 waitUntilDashIsFocused();
131− else
134+ } else {
132 waitUntilApplicationWindowIsFullyVisible();
135 waitUntilApplicationWindowIsFullyVisible();
136+ }
137+
138+ var launcher = findChild(shell, "launcherPanel");
139+ tryCompare(launcher, "x", data.launcherHides ? -launcher.width : 0)
133 }
140 }
134
141
135 function test_suspend() {
142 function test_suspend() {