on xenial help sign in
tests: try to be more robust on some flacky tests
d341801Marco Trevisan (Treviño)
tests/qmltests/Dash/Previews/tst_Preview.qml+1
@@ -117,6 +117,7 @@ Rectangle {
117 var widget = findChild(preview, "widget-21");
117 var widget = findChild(preview, "widget-21");
118 var initialWidgetHeight = widget.height;
118 var initialWidgetHeight = widget.height;
119 var moreLessButton = findChild(widget, "moreLessButton");
119 var moreLessButton = findChild(widget, "moreLessButton");
120+ waitForRendering(moreLessButton);
120 mouseClick(moreLessButton);
121 mouseClick(moreLessButton);
121
122
122 // Wait for the combo to stop growing
123 // Wait for the combo to stop growing
tests/qmltests/Dash/tst_DashContent.qml+1
@@ -673,6 +673,7 @@ Item {
673 compare(dashContentList.currentIndex, 0);
673 compare(dashContentList.currentIndex, 0);
674 compare(dashContentList.indexAt(dashContentList.width * 1.5, 0), 1);
674 compare(dashContentList.indexAt(dashContentList.width * 1.5, 0), 1);
675 var nextScopeId = dashContentList.itemAt(dashContentList.width * 1.5, 0).item.scope.id;
675 var nextScopeId = dashContentList.itemAt(dashContentList.width * 1.5, 0).item.scope.id;
676+ waitForRendering(favoriteAction);
676 mouseClick(favoriteAction);
677 mouseClick(favoriteAction);
677 tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true);
678 tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true);
678 compare(dashContentList.currentIndex, 0);
679 compare(dashContentList.currentIndex, 0);
tests/qmltests/tst_OrientedShell.qml+2−2
@@ -495,7 +495,7 @@ Rectangle {
495 }
495 }
496
496
497 function cleanup() {
497 function cleanup() {
498− tryCompare(shell, "waitingOnGreeter", false); // make sure greeter didn't leave us in disabled state
498+ tryCompare(shell, "waitingOnGreeter", false, 10000); // make sure greeter didn't leave us in disabled state
499 shell = null;
499 shell = null;
500 topLevelSurfaceList = null;
500 topLevelSurfaceList = null;
501
501
@@ -1235,7 +1235,7 @@ Rectangle {
1235
1235
1236 swipeAwayGreeter();
1236 swipeAwayGreeter();
1237
1237
1238− verify(isAppSurfaceFocused(primarySurfaceId))
1238+ tryCompareFunction(function() { return isAppSurfaceFocused(primarySurfaceId)}, true, 10000)
1239
1239
1240 signalSpy.clear();
1240 signalSpy.clear();
1241 signalSpy.target = shell;
1241 signalSpy.target = shell;