on xenial help sign in
Need this for the tests to pass locally after new chnage
commit5612925b46b8e8460a5f5007ef4d5e8f595354b5 authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 21 Nov 2016, 15:10 (10 years ago) parent3ad24fa
2 files changed+7−6
tests/qmltests/Dash/tst_Dash.qml+4−3 tests/qmltests/Launcher/tst_Launcher.qml+3−3
tests/qmltests/Dash/tst_Dash.qml+4−3
@@ -310,8 +310,9 @@ Item {
310310 var stopX = units.gu(1)
311311 var stopY = startY;
312312 waitForRendering(dashContentList)
313− mouseFlick(dash, startX, startY, stopX, stopY);
314− mouseFlick(dash, startX, startY, stopX, stopY);
313+ mouseFlick(dash, startX, startY, stopX, stopY, true, true, units.gu(200));
314+ compare(dashContentList.currentIndex, 1, "Could not flick to scope id 1");
315+ mouseFlick(dash, startX, startY, stopX, stopY, units.gu(200));
315316 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
316317 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
317318 dashCommunicatorService.mockSetCurrentScope(0, true, false);
@@ -411,7 +412,7 @@ Item {
411412 compare(dashContentList.currentItem.scopeId, "clickscope");
412413
413414 // Move to second scope
414− mouseFlick(dash, dash.width / 2, units.gu(2), dash.width / 5, units.gu(2));
415+ mouseFlick(dash, dash.width / 2, units.gu(2), dash.width / 5, units.gu(2), true, true, units.gu(20));
415416 tryCompare(dashContentList, "currentIndex", 1);
416417 compare(dashContentList.currentItem.scopeId, "MockScope1");
417418 }
tests/qmltests/Launcher/tst_Launcher.qml+3−3
@@ -813,7 +813,7 @@ Rectangle {
813813
814814 // Dragging a bit (> 1.5 gu)
815815 newMouseX -= units.gu(2)
816− mouseFlick(launcher, currentMouseX, currentMouseY, newMouseX, newMouseY, false, false, 100)
816+ mouseFlick(launcher, currentMouseX, currentMouseY, newMouseX, newMouseY, false, false)
817817 currentMouseX = newMouseX
818818
819819 // Other items need to expand and become 0.6 opaque
@@ -821,8 +821,8 @@ Rectangle {
821821 tryCompare(item0, "itemOpacity", 0.6)
822822
823823 // Dragging a bit more
824− newMouseY += initialItemHeight * 1.5
825− mouseFlick(launcher, currentMouseX, currentMouseY, newMouseX, newMouseY, false, false, 100)
824+ newMouseY += initialItemHeight * 1.25
825+ mouseFlick(launcher, currentMouseX, currentMouseY, newMouseX, newMouseY, false, false)
826826 currentMouseY = newMouseY
827827
828828 tryCompare(findChild(draggedItem, "dropIndicator"), "opacity", 1)