on xenial help sign in
stabilize the test
commit334e341fa84366536d029826f9509a892e8a629a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 8 Dec 2016, 16:21 (10 years ago) parentc45dee0
1 file changed+7−17
tests/qmltests/Launcher/tst_Drawer.qml+7−17
tests/qmltests/Launcher/tst_Drawer.qml+7−17
@@ -87,12 +87,6 @@ StyledItem {
8787 }
8888 }
8989
90− Binding {
91− target: launcher
92− property: "panelWidth"
93− value: units.gu(Math.round(widthSlider.value))
94− }
95−
9690 UnityTestCase {
9791 id: testCase
9892 when: windowShown
@@ -115,6 +109,7 @@ StyledItem {
115109 tryCompareFunction( function(){ return drawer.x === 0; }, true );
116110 tryCompare(launcher, "state", "drawer");
117111 tryCompare(launcher, "drawerShown", true);
112+ return drawer;
118113 }
119114
120115 function revealByEdgePush() {
@@ -175,11 +170,9 @@ StyledItem {
175170 function test_hideByDraggingDrawer(data) {
176171 launcher.lockedVisible = !data.autohide;
177172
178− dragDrawerIntoView();
173+ var drawer = dragDrawerIntoView();
179174 waitForRendering(launcher);
180175
181− var drawer = findChild(launcher, "drawer");
182−
183176 mouseFlick(root, drawer.width - units.gu(1), drawer.height / 2, units.gu(2), drawer.height / 2, true, true);
184177
185178 tryCompare(drawer.anchors, "rightMargin", 0);
@@ -188,9 +181,7 @@ StyledItem {
188181 }
189182
190183 function test_hideByClickingOutside() {
191− dragDrawerIntoView();
192−
193− var drawer = findChild(launcher, "drawer");
184+ var drawer = dragDrawerIntoView();
194185
195186 mouseClick(root, drawer.width + units.gu(1), root.height / 2);
196187
@@ -249,11 +240,10 @@ StyledItem {
249240 compare(launcher.lastSelectedApplication, "camera-app");
250241 }
251242
252− function test_directSearch() {
253− dragDrawerIntoView();
254− var drawer = findChild(launcher, "drawer");
255− verify(!!drawer);
256−
243+ function test_searchDirectly() {
244+ var drawer = dragDrawerIntoView();
245+ waitForRendering(launcher);
246+ waitUntilTransitionsEnd(launcher);
257247 tryCompare(drawer, "focus", true);
258248
259249 var searchField = findChild(drawer, "searchField");