on xenial help sign in
Stabilize flaky wizard tests Fixes: #1582994

Approved by: Michael Terry

commitc7c3825a18e6f4b3500063dfcbad4a3aa29951b4 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 20 May 2016, 08:44 (10 years ago) parenta3bf85fc1a539b
1 file changed+3−12
tests/qmltests/Wizard/tst_Wizard.qml+3−12
tests/qmltests/Wizard/tst_Wizard.qml+3−12
@@ -144,7 +144,9 @@ Item {
144144 var pages = findChild(wizard, "wizardPages");
145145 var stack = findChild(pages, "pageStack");
146146 // 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);
148150 tryCompare(stack.currentPage, "opacity", 1.0);
149151 tryCompare(stack.currentPage, "enabled", true);
150152 tryCompare(stack.currentPage, "skipValid", true);
@@ -153,17 +155,6 @@ Item {
153155 return stack.currentPage;
154156 }
155157
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−
167158 function goToPage(name, skipSim, skipLocation, skipReporting) {
168159 if (skipSim === undefined) {
169160 skipSim = false;