on xenial help sign in
Simplify setCurrentScope test.
990c345Michał Sawicz
tests/qmltests/Dash/tst_Dash.qml+4−7
@@ -316,13 +316,10 @@ Item {
316 var startY = dash.height / 2;
316 var startY = dash.height / 2;
317 var stopX = units.gu(1)
317 var stopX = units.gu(1)
318 var stopY = startY;
318 var stopY = startY;
319− var retry = 0;
320− while (dashContentList.currentIndex != 2 && retry <= 2) {
321− mouseFlick(dash, startX, startY, stopX, stopY)
322− waitForRendering(dashContentList)
319+ waitForRendering(dashContentList)
323− retry++;
320+ mouseFlick(dash, startX, startY, stopX, stopY);
324− }
321+ mouseFlick(dash, startX, startY, stopX, stopY);
325− compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2 in 10 retries");
322+ compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
326 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
323 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
327 dashCommunicatorService.mockSetCurrentScope("clickscope", true, true);
324 dashCommunicatorService.mockSetCurrentScope("clickscope", true, true);
328 tryCompare(dashContentList, "currentIndex", 1)
325 tryCompare(dashContentList, "currentIndex", 1)