on xenial help sign in
Convert while into tryCompareFunction

The while should eventually always finish but we have seen cases in which the tests run for 3 hours in GenericScopeView so it may be here. Turn it into a tryCompareFunction to see if that's the case Approved by: Michał Sawicz

commitb978a0b88e6a912727f43fa61e4400b85cfccc55 authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 29 Jan 2016, 11:51 (11 years ago) parente71aa8f58c539e
1 file changed+6−5
tests/qmltests/Dash/tst_GenericScopeView.qml+6−5
tests/qmltests/Dash/tst_GenericScopeView.qml+6−5
@@ -107,11 +107,12 @@ Item {
107107 {
108108 var categoryListView = findChild(genericScopeView, "categoryListView");
109109 waitForRendering(categoryListView);
110− while (!categoryListView.atYEnd) {
111− mouseFlick(genericScopeView, genericScopeView.width/2, genericScopeView.height - units.gu(8),
112− genericScopeView.width/2, genericScopeView.y)
113− tryCompare(categoryListView, "moving", false);
114− }
110+ tryCompareFunction(function() {
111+ mouseFlick(genericScopeView, genericScopeView.width/2, genericScopeView.height - units.gu(8),
112+ genericScopeView.width/2, genericScopeView.y)
113+ tryCompare(categoryListView, "moving", false);
114+ return categoryListView.atYEnd;
115+ }, true);
115116 }
116117
117118 function test_isActive() {