on xenial help sign in
tests: try to be more robust on some flacky tests
commitd341801045f2fb2df73e5a75fec49ee10fc9737d authorMarco Trevisan (Treviño) <mail@3v1n0.net> dateSat 12 Nov 2016, 17:33 (10 years ago) parent2d54145
3 files changed+4−2
tests/qmltests/Dash/Previews/tst_Preview.qml+1 tests/qmltests/Dash/tst_DashContent.qml+1 tests/qmltests/tst_OrientedShell.qml+2−2
tests/qmltests/Dash/Previews/tst_Preview.qml+1
@@ -117,6 +117,7 @@ Rectangle {
117117 var widget = findChild(preview, "widget-21");
118118 var initialWidgetHeight = widget.height;
119119 var moreLessButton = findChild(widget, "moreLessButton");
120+ waitForRendering(moreLessButton);
120121 mouseClick(moreLessButton);
121122
122123 // Wait for the combo to stop growing
tests/qmltests/Dash/tst_DashContent.qml+1
@@ -673,6 +673,7 @@ Item {
673673 compare(dashContentList.currentIndex, 0);
674674 compare(dashContentList.indexAt(dashContentList.width * 1.5, 0), 1);
675675 var nextScopeId = dashContentList.itemAt(dashContentList.width * 1.5, 0).item.scope.id;
676+ waitForRendering(favoriteAction);
676677 mouseClick(favoriteAction);
677678 tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true);
678679 compare(dashContentList.currentIndex, 0);
tests/qmltests/tst_OrientedShell.qml+2−2
@@ -495,7 +495,7 @@ Rectangle {
495495 }
496496
497497 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
499499 shell = null;
500500 topLevelSurfaceList = null;
501501
@@ -1235,7 +1235,7 @@ Rectangle {
12351235
12361236 swipeAwayGreeter();
12371237
1238− verify(isAppSurfaceFocused(primarySurfaceId))
1238+ tryCompareFunction(function() { return isAppSurfaceFocused(primarySurfaceId)}, true, 10000)
12391239
12401240 signalSpy.clear();
12411241 signalSpy.target = shell;