on xenial help sign in
fixup failing wizard tests
c9588dfLukáš Tinkl
tests/qmltests/Wizard/tst_Wizard.qml+13−12
@@ -158,13 +158,16 @@ Item {
158 return stack.currentPage;
158 return stack.currentPage;
159 }
159 }
160
160
161− function goToPage(name, skipSim, skipLocation) {
161+ function goToPage(name, skipSim, skipLocation, skipReporting) {
162 if (skipSim === undefined) {
162 if (skipSim === undefined) {
163 skipSim = false;
163 skipSim = false;
164 }
164 }
165 if (skipLocation === undefined) {
165 if (skipLocation === undefined) {
166 skipLocation = false;
166 skipLocation = false;
167 }
167 }
168+ if (skipReporting === undefined) {
169+ skipReporting = false;
170+ }
168
171
169 var page = waitForPage("languagePage");
172 var page = waitForPage("languagePage");
170 if (name === page.objectName) return page;
173 if (name === page.objectName) return page;
@@ -191,9 +194,11 @@ Item {
191 tap(findChild(page, "forwardButton"));
194 tap(findChild(page, "forwardButton"));
192 }
195 }
193
196
197+ if (!skipReporting) {
194− page = waitForPage("reportingPage");
198+ page = waitForPage("reportingPage");
195− if (name === page.objectName) return page;
199+ if (name === page.objectName) return page;
196− tap(findChild(page, "forwardButton"));
200+ tap(findChild(page, "forwardButton"));
201+ }
197
202
198 page = waitForPage("finishedPage");
203 page = waitForPage("finishedPage");
199 if (name === page.objectName) return page;
204 if (name === page.objectName) return page;
@@ -337,8 +342,6 @@ Item {
337 tap(findChild(page, "forwardButton"));
342 tap(findChild(page, "forwardButton"));
338 page = waitForPage("locationPage");
343 page = waitForPage("locationPage");
339 tap(findChild(page, "forwardButton"));
344 tap(findChild(page, "forwardButton"));
340− page = waitForPage("reportingPage");
341− tap(findChild(page, "forwardButton"));
342 page = waitForPage("finishedPage");
345 page = waitForPage("finishedPage");
343 tap(findChild(page, "forwardButton"));
346 tap(findChild(page, "forwardButton"));
344
347
@@ -390,8 +393,6 @@ Item {
390 tap(findChild(page, "forwardButton"));
393 tap(findChild(page, "forwardButton"));
391 page = waitForPage("locationPage");
394 page = waitForPage("locationPage");
392 tap(findChild(page, "forwardButton"));
395 tap(findChild(page, "forwardButton"));
393− page = waitForPage("reportingPage");
394− tap(findChild(page, "forwardButton"));
395 page = waitForPage("finishedPage");
396 page = waitForPage("finishedPage");
396 tap(findChild(page, "forwardButton"));
397 tap(findChild(page, "forwardButton"));
397
398
@@ -402,7 +403,7 @@ Item {
402 }
403 }
403
404
404 function test_passwdSwipe() {
405 function test_passwdSwipe() {
405− goToPage(null);
406+ goToPage(null, false, false, true);
406
407
407 tryCompare(setSecuritySpy, "count", 1);
408 tryCompare(setSecuritySpy, "count", 1);
408 compare(setSecuritySpy.signalArguments[0][0], "");
409 compare(setSecuritySpy.signalArguments[0][0], "");
@@ -412,12 +413,12 @@ Item {
412
413
413 function test_locationSkipNoPath() {
414 function test_locationSkipNoPath() {
414 AccountsService.hereLicensePath = "";
415 AccountsService.hereLicensePath = "";
415− goToPage("reportingPage", false, true);
416+ goToPage("finishedPage", false, true, true);
416 }
417 }
417
418
418 function test_locationSkipNoFiles() {
419 function test_locationSkipNoFiles() {
419 AccountsService.hereLicensePath = Qt.resolvedUrl("nolicenses");
420 AccountsService.hereLicensePath = Qt.resolvedUrl("nolicenses");
420− goToPage("reportingPage", false, true);
421+ goToPage("finishedPage", false, true, true);
421 }
422 }
422
423
423 function test_locationWaitOnPath() {
424 function test_locationWaitOnPath() {
@@ -434,7 +435,7 @@ Item {
434 compare(stack.currentPage.skipValid, false);
435 compare(stack.currentPage.skipValid, false);
435
436
436 AccountsService.hereLicensePath = "";
437 AccountsService.hereLicensePath = "";
437− waitForPage("reportingPage");
438+ waitForPage("finishedPage", false, false, true);
438 }
439 }
439
440
440 function test_locationGpsOnly() {
441 function test_locationGpsOnly() {