on xenial help sign in
Stabilize flaky wizard tests Fixes: #1582994
c7c3825Lukáš Tinkl
tests/qmltests/Wizard/tst_Wizard.qml+3−12
@@ -144,7 +144,9 @@ Item {
144 var pages = findChild(wizard, "wizardPages");
144 var pages = findChild(wizard, "wizardPages");
145 var stack = findChild(pages, "pageStack");
145 var stack = findChild(pages, "pageStack");
146 // don't simply call tryCompare here, because stack.currentPage will be swapped out itself
146 // don't simply call tryCompare here, because stack.currentPage will be swapped out itself
147− tryCompareFunction(function() { return stack.currentPage.objectName; }, name);
147+ tryCompareFunction(function() { return stack.currentPage.objectName; }, name, 15000);
148+ var contentAnimation = findInvisibleChild(stack.currentPage, "contentAnimation");
149+ tryCompareFunction(function() { return contentAnimation.running; }, false);
148 tryCompare(stack.currentPage, "opacity", 1.0);
150 tryCompare(stack.currentPage, "opacity", 1.0);
149 tryCompare(stack.currentPage, "enabled", true);
151 tryCompare(stack.currentPage, "enabled", true);
150 tryCompare(stack.currentPage, "skipValid", true);
152 tryCompare(stack.currentPage, "skipValid", true);
@@ -153,17 +155,6 @@ Item {
153 return stack.currentPage;
155 return stack.currentPage;
154 }
156 }
155
157
156− function verifyPageIsBlocked(name) {
157− var pages = findChild(wizard, "wizardPages");
158− var stack = findChild(pages, "pageStack");
159− // don't simply call tryCompare here, because stack.currentPage will be swapped out itself
160− tryCompareFunction(function() { return stack.currentPage.objectName; }, name);
161− tryCompare(stack.currentPage, "enabled", false);
162− tryCompare(stack.currentPage, "skipValid", false);
163− waitForRendering(stack.currentPage);
164− return stack.currentPage;
165− }
166−
167 function goToPage(name, skipSim, skipLocation, skipReporting) {
158 function goToPage(name, skipSim, skipLocation, skipReporting) {
168 if (skipSim === undefined) {
159 if (skipSim === undefined) {
169 skipSim = false;
160 skipSim = false;