on xenial help sign in
some test fixing
commitf2a51f53f7946087ad4b3ae5c8300850eecb6b1b authorLukáš Tinkl <lukas.tinkl@canonical.com> dateSat 21 Nov 2015, 19:13 (11 years ago) parent29b6000
4 files changed+37−25
qml/Wizard/Pages/50-timezone.qml+2−1 qml/Wizard/Pages/60-uaccount-signup.qml+1−1 qml/Wizard/Pages/75-report-check.qml+1−1 tests/qmltests/Wizard/tst_Wizard.qml+33−22
qml/Wizard/Pages/50-timezone.qml+2−1
@@ -124,6 +124,7 @@ LocalComponents.Page {
124124
125125 LocalComponents.WizardTextField {
126126 id: searchField
127+ objectName: "tzFilter"
127128 anchors.left: parent.left
128129 anchors.right: parent.right
129130 anchors.leftMargin: leftMargin
@@ -151,7 +152,7 @@ LocalComponents.Page {
151152
152153 ListView {
153154 id: tzList;
154−
155+ objectName: "tzList"
155156 boundsBehavior: Flickable.StopAtBounds
156157 clip: true
157158 currentIndex: -1
qml/Wizard/Pages/60-uaccount-signup.qml+1−1
@@ -21,7 +21,7 @@ import AccountsService 0.1
2121import ".." as LocalComponents
2222
2323LocalComponents.Page {
24− objectName: "ubuntuAccountSignUpPage"
24+ objectName: "accountPage"
2525
2626 title: i18n.tr("Create Device Account")
2727 customTitle: true
qml/Wizard/Pages/75-report-check.qml+1−1
@@ -22,7 +22,7 @@ import ".." as LocalComponents
2222
2323LocalComponents.Page {
2424 id: reportCheckPage
25− objectName: "reportCheckPage"
25+ objectName: "reportingPage"
2626
2727 title: webview.visible ? i18n.tr("Privacy Policy") : i18n.tr("Help Us Improve")
2828 forwardButtonSourceComponent: !webview.visible ? forwardButton : null
tests/qmltests/Wizard/tst_Wizard.qml+33−22
@@ -178,11 +178,6 @@ Item {
178178 tap(findChild(page, "forwardButton"));
179179 }
180180
181− page = waitForPage("passwdPage");
182− if (name === page.objectName) return page;
183− tap(findChild(page, "passwdDelegate0"));
184− tap(findChild(page, "forwardButton"));
185−
186181 page = waitForPage("wifiPage");
187182 if (name === page.objectName) return page;
188183 tap(findChild(page, "forwardButton"));
@@ -193,6 +188,22 @@ Item {
193188 tap(findChild(page, "forwardButton"));
194189 }
195190
191+ page = waitForPage("tzPage");
192+ if (name === page.objectName) return page;
193+ tap(findChild(page, "tzFilter"));
194+ typeString("London");
195+ var tzList = findChild(page, "tzList");
196+ verify(tzList);
197+ tzList.itemAt(0, 0).clicked();
198+ tap(findChild(page, "forwardButton"));
199+
200+ // TODO account page
201+
202+ page = waitForPage("passwdPage");
203+ if (name === page.objectName) return page;
204+ tap(findChild(page, "passwdDelegate3")); // swipe
205+ tap(findChild(page, "forwardButton"));
206+
196207 if (!skipReporting) {
197208 page = waitForPage("reportingPage");
198209 if (name === page.objectName) return page;
@@ -237,27 +248,27 @@ Item {
237248
238249 function test_simUnavailableSkip() {
239250 MockQOfono.available = false;
240− goToPage("passwdPage", true);
251+ goToPage("wifiPage", true);
241252 }
242253
243254 function test_simNoModemsSkip() {
244255 MockQOfono.setModems([], [], []);
245− goToPage("passwdPage", true);
256+ goToPage("wifiPage", true);
246257 }
247258
248259 function test_simFirstSkip() {
249260 MockQOfono.setModems(["a", "b"], [true, false], []);
250− goToPage("passwdPage", true);
261+ goToPage("wifiPage", true);
251262 }
252263
253264 function test_simSecondSkip() {
254265 MockQOfono.setModems(["a", "b"], [false, true], []);
255− goToPage("passwdPage", true);
266+ goToPage("wifiPage", true);
256267 }
257268
258269 function test_simBothSkip() {
259270 MockQOfono.setModems(["a", "b"], [true, true], []);
260− goToPage("passwdPage", true);
271+ goToPage("wifiPage", true);
261272 }
262273
263274 function test_simWaitOnManagerAsync() {
@@ -302,7 +313,7 @@ Item {
302313
303314 // Now just wait for timeout
304315 compare(timeout.running, true);
305− waitForPage("passwdPage");
316+ waitForPage("wifiPage");
306317 compare(timeout.running, false);
307318 }
308319
@@ -339,7 +350,7 @@ Item {
339350
340351 // now finish up
341352 tap(findChild(page, "forwardButton"));
342− page = waitForPage("locationPage");
353+ page = waitForPage("reportingPage");
343354 tap(findChild(page, "forwardButton"));
344355 page = waitForPage("finishedPage");
345356 tap(findChild(page, "forwardButton"));
@@ -390,7 +401,7 @@ Item {
390401
391402 // now finish up
392403 tap(findChild(page, "forwardButton"));
393− page = waitForPage("locationPage");
404+ page = waitForPage("reportingPage");
394405 tap(findChild(page, "forwardButton"));
395406 page = waitForPage("finishedPage");
396407 tap(findChild(page, "forwardButton"));
@@ -439,9 +450,9 @@ Item {
439450
440451 function test_locationGpsOnly() {
441452 var page = goToPage("locationPage");
442− var gpsCheck = findChild(page, "gpsCheck");
443− var hereCheck = findChild(page, "hereCheck");
444− var nopeCheck = findChild(page, "nopeCheck");
453+ var gpsCheck = findChild(page, "gpsCheckLabel");
454+ var hereCheck = findChild(page, "hereCheckLabel");
455+ var nopeCheck = findChild(page, "nopeCheckLabel");
445456
446457 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
447458 activateLocationSpy.target = locationActionGroup.location;
@@ -460,9 +471,9 @@ Item {
460471
461472 function test_locationNope() {
462473 var page = goToPage("locationPage");
463− var gpsCheck = findChild(page, "gpsCheck");
464− var hereCheck = findChild(page, "hereCheck");
465− var nopeCheck = findChild(page, "nopeCheck");
474+ var gpsCheck = findChild(page, "gpsCheckLabel");
475+ var hereCheck = findChild(page, "hereCheckLabel");
476+ var nopeCheck = findChild(page, "nopeCheckLabel");
466477
467478 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
468479 activateLocationSpy.target = locationActionGroup.location;
@@ -481,9 +492,9 @@ Item {
481492
482493 function test_locationHere() {
483494 var page = goToPage("locationPage");
484− var gpsCheck = findChild(page, "gpsCheck");
485− var hereCheck = findChild(page, "hereCheck");
486− var nopeCheck = findChild(page, "nopeCheck");
495+ var gpsCheck = findChild(page, "gpsCheckLabel");
496+ var hereCheck = findChild(page, "hereCheckLabel");
497+ var nopeCheck = findChild(page, "nopeCheckLabel");
487498
488499 var locationActionGroup = findInvisibleChild(page, "locationActionGroup");
489500 activateLocationSpy.target = locationActionGroup.location;