on xenial help sign in
Expand tests
commitda65b643487c84af76b2a14960c4233ad8a487f9 authorMichael Terry <michael.terry@canonical.com> dateTue 20 Oct 2015, 13:40 (11 years ago) parentf377eaf
2 files changed+254−193
qml/Tutorial/TutorialContent.qml+6−20 tests/qmltests/Tutorial/tst_Tutorial.qml+248−173
qml/Tutorial/TutorialContent.qml+6−20
@@ -74,6 +74,7 @@ Item {
7474
7575 Timer {
7676 id: tutorialTopTimer
77+ objectName: "tutorialTopTimer"
7778 interval: 60000
7879 onTriggered: if (tutorialTop.isReady && !tutorialTop.shown) tutorialTop.show()
7980 }
@@ -86,16 +87,6 @@ Item {
8687 onSkippedChanged: if (skipped && shown) hide()
8788 onIsReadyChanged: if (isReady) tutorialTopTimer.start()
8889 onFinished: AccountsService.markDemoEdgeCompleted("top")
89−
90− Connections {
91− target: panel.indicators
92− ignoreUnknownSignals: true // panel might be null initially
93− onFullyOpenedChanged: {
94− if (panel.indicators.fullyOpened) {
95− AccountsService.markDemoEdgeCompleted("top");
96− }
97− }
98− }
9990 }
10091
10192 TutorialRight {
@@ -112,6 +103,7 @@ Item {
112103
113104 Timer {
114105 id: tutorialRightTimer
106+ objectName: "tutorialRightTimer"
115107 interval: 3000
116108 onTriggered: if (tutorialRight.isReady && !tutorialRight.shown) tutorialRight.show()
117109 }
@@ -124,15 +116,6 @@ Item {
124116 onSkippedChanged: if (skipped && shown) hide()
125117 onIsReadyChanged: if (isReady) tutorialRightTimer.start()
126118 onFinished: AccountsService.markDemoEdgeCompleted("right")
127−
128− Connections {
129− target: stage
130− onDragProgressChanged: {
131− if (stage.dragProgress >= 0.1) {
132− AccountsService.markDemoEdgeCompleted("right");
133− }
134− }
135− }
136119 }
137120
138121 TutorialBottom {
@@ -147,11 +130,14 @@ Item {
147130 (ApplicationManager.focusedApplicationId == "dialer-app" ||
148131 ApplicationManager.focusedApplicationId == "webbrowser-app" ||
149132 ApplicationManager.focusedApplicationId == "messaging-app" ||
133+ ApplicationManager.focusedApplicationId == "address-book-app" ||
150134 ApplicationManager.focusedApplicationId == "camera-app" ||
151− ApplicationManager.focusedApplicationId == "clock-app")
135+ ApplicationManager.focusedApplicationId == "calculator-app" ||
136+ ApplicationManager.focusedApplicationId == "ubuntu-clock-app")
152137
153138 Timer {
154139 id: tutorialBottomTimer
140+ objectName: "tutorialBottomTimer"
155141 interval: 3000
156142 onTriggered: if (tutorialBottom.isReady && !tutorialBottom.shown) tutorialBottom.show()
157143 }
tests/qmltests/Tutorial/tst_Tutorial.qml+248−173
@@ -114,10 +114,14 @@ Item {
114114 function init() {
115115 tryCompare(shell, "enabled", true); // enabled by greeter when ready
116116
117+ var greeter = findChild(shell, "greeter");
118+ tryCompare(greeter, "shown", true);
119+
117120 AccountsService.demoEdges = false;
118121 AccountsService.demoEdgesCompleted = [];
119122 AccountsService.demoEdges = true;
120− //swipeAwayGreeter();
123+
124+ tryCompare(greeter, "shown", false);
121125 }
122126
123127 function cleanup() {
@@ -165,6 +169,45 @@ Item {
165169 waitForRendering(greeter);
166170 }
167171
172+ function openTutorialTop() {
173+ var tutorialLeft = findChild(shell, "tutorialLeft");
174+ var tutorialTop = findChild(shell, "tutorialTop");
175+ var tutorialTopTimer = findInvisibleChild(tutorialTop, "tutorialTopTimer");
176+
177+ tutorialTopTimer.interval = 1;
178+ AccountsService.demoEdgesCompleted = ["left"];
179+
180+ tryCompare(tutorialLeft, "visible", false);
181+ tryCompare(tutorialTop, "shown", true);
182+ tryCompare(tutorialTop, "opacity", 1);
183+ }
184+
185+ function openTutorialRight() {
186+ var tutorialLeft = findChild(shell, "tutorialLeft");
187+ var tutorialRight = findChild(shell, "tutorialRight");
188+
189+ AccountsService.demoEdgesCompleted = ["left", "top"];
190+ ApplicationManager.startApplication("dialer-app");
191+ ApplicationManager.startApplication("camera-app");
192+ ApplicationManager.startApplication("messaging-app");
193+
194+ tryCompare(tutorialLeft, "visible", false);
195+ tryCompare(tutorialRight, "shown", true);
196+ tryCompare(tutorialRight, "opacity", 1);
197+ }
198+
199+ function openTutorialBottom() {
200+ var tutorialLeft = findChild(shell, "tutorialLeft");
201+ var tutorialBottom = findChild(shell, "tutorialBottom");
202+
203+ AccountsService.demoEdgesCompleted = ["left", "top", "right"];
204+ ApplicationManager.startApplication("dialer-app");
205+
206+ tryCompare(tutorialLeft, "visible", false);
207+ tryCompare(tutorialBottom, "shown", true);
208+ tryCompare(tutorialBottom, "opacity", 1);
209+ }
210+
168211 function test_longPressDismissesTutorialPage() {
169212 var tutorialLeft = findChild(shell, "tutorialLeft");
170213
@@ -196,228 +239,260 @@ Item {
196239 verify(!panel.indicators.available);
197240 }
198241
199− function waitForPage(name) {
200− waitForRendering(findChild(shell, name));
201− var page = findChild(shell, name);
202− tryCompare(page, "shown", true);
203− tryCompare(page.showAnimation, "running", false);
204− return page;
205− }
242+ function test_tutorialLeftFinish() {
243+ var tutorial = findChild(shell, "tutorial");
244+ var tutorialLeft = findChild(tutorial, "tutorialLeft");
245+ var launcher = findChild(shell, "launcher");
206246
207− function checkTopEdge() {
208− touchFlick(shell, halfWidth, 0, halfWidth, halfHeight);
247+ touchFlick(shell, 0, halfHeight, halfWidth, halfHeight);
209248
210− var panel = findChild(shell, "panel");
211− tryCompare(panel.indicators, "fullyClosed", true);
249+ tryCompare(tutorialLeft, "shown", false);
250+ tryCompare(AccountsService, "demoEdgesCompleted", ["left"]);
251+ tryCompare(launcher, "state", "visible");
212252 }
213253
214− function checkLeftEdge() {
215− touchFlick(shell, 0, halfHeight, halfWidth, halfHeight);
216−
254+ function test_tutorialLeftShortDrag() {
255+ // Here we want to test just barely pulling the launcher out and
256+ // letting go (i.e. not triggering the "progress" property of
257+ // Launcher).
258+ var tutorialLeft = findChild(shell, "tutorialLeft");
217259 var launcher = findChild(shell, "launcher");
218− tryCompare(launcher, "state", "");
219− }
220260
221− function checkRightEdge() {
222− if (shell.usageScenario === "phone") {
223− touchFlick(shell, shell.width, halfHeight, halfWidth, halfHeight);
261+ // Confirm fade during drag
262+ touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.4, halfHeight, true, false);
263+ // compare opacity with a bound rather than hard 0.6 because progress doesn't
264+ // always match the drag perfectly (takes a moment for drag to kick in)
265+ tryCompareFunction(function() {
266+ return tutorialLeft.opacity >= 0.6 && tutorialLeft.opacity < 0.7;
267+ }, true);
268+ touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.4, halfHeight, false, true);
224269
225− var stage = findChild(shell, "stage");
226− var spreadView = findChild(stage, "spreadView");
227− tryCompare(spreadView, "phase", 0);
228− }
229− }
230270
231− function checkBottomEdge() {
232− // Can't actually check effect of swipe, since dash isn't really loaded
233− var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader");
234− tryCompare(applicationsDisplayLoader, "interactive", false);
271+ // Make sure we don't do anything if we don't pull the launcher
272+ // out much.
273+ touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.4, halfHeight);
274+ tryCompare(launcher, "state", ""); // should remain hidden
275+ tryCompare(tutorialLeft, "shown", true); // and we should still be on left
276+
277+
278+ // Now drag out but not past launcher itself
279+ touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.9, halfHeight);
280+
281+ tryCompare(tutorialLeft, "shown", false);
282+ tryCompare(AccountsService, "demoEdgesCompleted", ["left"]);
283+ tryCompare(launcher, "state", "visible");
235284 }
236285
237− function checkFinished() {
238− tryCompare(AccountsService, "demoEdges", false);
286+ function test_tutorialLeftLongDrag() {
287+ // Just confirm that a long drag ("dash" drag) doesn't confuse us
239288
240− var tutorial = findChild(shell, "tutorial");
241− tryCompare(tutorial, "running", false);
289+ // So that we actually switch to dash and launcher hides
290+ ApplicationManager.startApplication("dialer-app");
242291
243292 var launcher = findChild(shell, "launcher");
244− tryCompare(launcher, "shown", false);
245− }
293+ var tutorialLeft = findChild(shell, "tutorialLeft");
294+ touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
246295
247− function goToPage(name) {
248− var page = waitForPage("tutorialLeft");
249− checkTopEdge();
250− checkRightEdge();
251− checkBottomEdge();
252− if (name === "tutorialLeft") return page;
253− touchFlick(shell, 0, halfHeight, halfWidth, halfHeight);
296+ tryCompare(tutorialLeft, "shown", false);
297+ tryCompare(AccountsService, "demoEdgesCompleted", ["left"]);
298+ }
254299
255− page = waitForPage("tutorialLeftFinish");
256− if (name === "tutorialLeftFinish") return page;
257− var tick = findChild(page, "tick");
258− tap(tick);
259−
260− page = waitForPage("tutorialRight");
261− checkTopEdge();
262− checkLeftEdge();
263− checkBottomEdge();
264− if (name === "tutorialRight") return page;
265− touchFlick(shell,
266− shell.width, halfHeight,
267− halfWidth, halfHeight,
268− true /* beginTouch */, true /* endTouch */,
269− 20 /* speed */, 50 /* iterations */);
270− var overlay = findChild(page, "overlay");
271− tryCompare(overlay, "shown", true);
272− var tick = findChild(page, "tick");
273− tap(tick);
274−
275− var page = waitForPage("tutorialBottom");
276− checkTopEdge();
277− checkLeftEdge();
278− checkRightEdge();
279− if (name === "tutorialBottom") return page;
280− touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
300+ function test_tutorialTopEdges() {
301+ var tutorial = findChild(shell, "tutorial");
302+ var tutorialTop = findChild(tutorial, "tutorialTop");
303+ var launcher = findChild(shell, "launcher");
304+ var stage = findChild(shell, "stage");
305+ var panel = findChild(shell, "panel");
281306
282− var page = waitForPage("tutorialBottomFinish");
283− checkTopEdge();
284− checkLeftEdge();
285− checkRightEdge();
286− checkBottomEdge();
287− if (name === "tutorialBottomFinish") return page;
288− var tick = findChild(page, "tick");
289− tap(tick);
307+ openTutorialTop();
290308
291− checkFinished();
292− return null;
309+ tryCompare(tutorial, "running", true);
310+ verify(!tutorial.launcherEnabled);
311+ verify(!tutorial.spreadEnabled);
312+ verify(tutorial.panelEnabled);
313+ verify(tutorialTop.shown);
314+ verify(!launcher.available);
315+ verify(!stage.spreadEnabled);
316+ verify(panel.indicators.available);
293317 }
294318
295− function disabled_test_walkthrough() {
296− goToPage(null);
319+ function test_tutorialTopFinish() {
320+ var tutorial = findChild(shell, "tutorial");
321+ var tutorialTop = findChild(tutorial, "tutorialTop");
322+ var panel = findChild(shell, "panel");
323+
324+ openTutorialTop();
325+ touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
326+
327+ tryCompare(tutorialTop, "shown", false);
328+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top"]);
329+ tryCompare(panel.indicators, "fullyOpened", true);
297330 }
298331
299− function disabled_test_skipOnDesktop() {
332+ function test_tutorialTopShortDrag() {
300333 var tutorial = findChild(shell, "tutorial");
301− tryCompare(tutorial, "active", true);
302− tryCompare(tutorial, "running", true);
334+ var tutorialTop = findChild(tutorial, "tutorialTop");
335+ var panel = findChild(shell, "panel");
303336
304− shell.usageScenario = "desktop";
305− tryCompare(tutorial, "active", false);
306− tryCompare(tutorial, "running", false);
337+ openTutorialTop();
338+ touchFlick(shell, halfWidth, 0, halfWidth, shell.height * 0.4, true, false);
339+ // compare opacity with a bound rather than hard 0.6 because progress doesn't
340+ // always match the drag perfectly (takes a moment for drag to kick in)
341+ tryCompareFunction(function() {
342+ return tutorialTop.opacity >= 0.6 && tutorialTop.opacity < 0.7;
343+ }, true);
344+ touchFlick(shell, halfWidth, 0, halfWidth, shell.height * 0.4, false, true);
345+
346+ compare(tutorialTop.shown, true);
307347 }
308348
309− function disabled_test_launcherShortDrag() {
310− // goToPage does a normal launcher pull. But here we want to test
311− // just barely pulling the launcher out and letting go (i.e. not
312− // triggering the "progress" property of Launcher).
349+ function test_tutorialTopAutoSkipped() {
350+ // Test that we skip the tutorial if user uses top edge themselves
313351
314− var left = goToPage("tutorialLeft");
352+ var tutorialLeft = findChild(shell, "tutorialLeft");
353+ var tutorialTop = findChild(shell, "tutorialTop");
354+ AccountsService.demoEdgesCompleted = ["left"];
355+ tryCompare(tutorialLeft, "visible", false);
356+ verify(!tutorialTop.shown);
315357
316− // Make sure we don't do anything if we don't pull the launcher
317− // out much.
358+ touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
359+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top"]);
360+ }
361+
362+ function test_tutorialRightEdges() {
363+ var tutorial = findChild(shell, "tutorial");
364+ var tutorialRight = findChild(tutorial, "tutorialRight");
318365 var launcher = findChild(shell, "launcher");
319− touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.4, halfHeight);
320− tryCompare(launcher, "state", ""); // should remain hidden
321− tryCompare(left, "shown", true); // and we should still be on left
366+ var stage = findChild(shell, "stage");
367+ var panel = findChild(shell, "panel");
322368
323− // Now drag out but not past launcher itself
324− touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.9, halfHeight);
369+ openTutorialRight();
325370
326− waitForPage("tutorialLeftFinish");
371+ tryCompare(tutorial, "running", true);
372+ verify(!tutorial.launcherEnabled);
373+ verify(tutorial.spreadEnabled);
374+ verify(!tutorial.panelEnabled);
375+ verify(tutorialRight.shown);
376+ verify(!launcher.available);
377+ verify(stage.spreadEnabled);
378+ verify(!panel.indicators.available);
327379 }
328380
329− function disabled_test_launcherLongDrag() {
330− // goToPage does a normal launcher pull. But here we want to test
331− // a full pull across the page.
332−
333− var left = goToPage("tutorialLeft");
381+ function test_tutorialRightFinish() {
382+ var tutorial = findChild(shell, "tutorial");
383+ var tutorialRight = findChild(tutorial, "tutorialRight");
384+ var stage = findChild(shell, "stage");
334385
335− var launcher = findChild(shell, "launcher");
336− touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
386+ openTutorialRight();
387+ touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
337388
338− var errorTextLabel = findChild(left, "errorTextLabel");
339− var errorTitleLabel = findChild(left, "errorTitleLabel");
340− tryCompare(launcher, "state", ""); // launcher goes away
341− tryCompare(left, "shown", true); // still on left page
342− tryCompare(errorTextLabel, "opacity", 1); // show error
343− tryCompare(errorTitleLabel, "opacity", 1); // show error
389+ tryCompare(tutorialRight, "shown", false);
390+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top", "right"]);
344391 }
345392
346− function disabled_test_launcherDragBack() {
347− // goToPage does a full launcher pull. But here we test pulling
348− // all the way out, then dragging back into place.
349−
350− var left = goToPage("tutorialLeft");
351− touchFlick(shell, 0, halfHeight, halfWidth, halfHeight, true, false);
352− touchFlick(shell, halfWidth, halfHeight, 0, halfHeight, false, true);
393+ function test_tutorialRightShortDrag() {
394+ var tutorial = findChild(shell, "tutorial");
395+ var tutorialRight = findChild(tutorial, "tutorialRight");
396+ var stage = findChild(shell, "stage");
353397
354− tryCompare(left, "shown", true); // and we should still be on left
398+ openTutorialRight();
399+ touchFlick(shell, shell.width, halfHeight, shell.width * 0.8, halfHeight, true, false);
400+ // compare opacity with a bound rather than hard 0.6 because progress doesn't
401+ // always match the drag perfectly (takes a moment for drag to kick in)
402+ tryCompareFunction(function() {
403+ return tutorialRight.opacity >= 0.6 && tutorialRight.opacity < 0.8;
404+ }, true);
405+ touchFlick(shell, shell.width, halfHeight, shell.width * 0.8, halfHeight, false, true);
406+
407+ compare(tutorialRight.shown, true);
355408 }
356409
357− function disabled_test_launcherNoDragGap() {
358− // See bug 1454882, where if you dragged the launcher while it was
359− // visible, you could pull it further than the edge of the screen.
410+ function test_tutorialRightDelay() {
411+ // Test that if we exit the top tutorial, we don't immediately
412+ // jump into right tutorial.
413+ var tutorialRight = findChild(shell, "tutorialRight");
414+ var tutorialRightTimer = findInvisibleChild(tutorialRight, "tutorialRightTimer");
360415
361− var left = goToPage("tutorialLeft");
362− var launcher = findChild(shell, "launcher");
363− var teaseAnimation = findInvisibleChild(left, "teaseAnimation");
364−
365− // Wait for launcher to be really out there
366− tryCompareFunction(function() {return launcher.x > teaseAnimation.maxBounce/2}, true);
367− verify(teaseAnimation.running);
368−
369− // Start a drag, make sure animation stops
370− touchFlick(shell, 0, halfHeight, units.gu(4), halfHeight, true, false);
371− verify(!teaseAnimation.running);
372− verify(launcher.visibleWidth > 0);
373− verify(launcher.x > 0);
374− compare(launcher.x, teaseAnimation.bounce);
375−
376− // Continue drag, make sure we don't create a gap on the left hand side
377− touchFlick(shell, units.gu(4), halfHeight, shell.width, halfHeight, false, false);
378− verify(!teaseAnimation.running);
379− compare(launcher.visibleWidth, launcher.panelWidth);
380− compare(launcher.x, 0);
381−
382− // Finish and make sure we continue animation
383− touchFlick(shell, shell.width, halfHeight, shell.width, halfHeight, false, true);
384− tryCompare(teaseAnimation, "running", true);
416+ tutorialRightTimer.interval = 1;
417+ openTutorialTop();
418+ ApplicationManager.startApplication("dialer-app");
419+ ApplicationManager.startApplication("camera-app");
420+ ApplicationManager.startApplication("messaging-app");
421+ tryCompare(ApplicationManager, "count", 3);
422+
423+ AccountsService.demoEdgesCompleted = ["left", "top"];
424+ verify(tutorialRightTimer.running);
425+ verify(!tutorialRight.shown);
426+ tryCompare(tutorialRight, "shown", true);
385427 }
386428
387− function disabled_test_spread() {
388− // Unfortunately, most of what we want to test of the spread is
389− // "did it render correctly?" but that's hard to test. So instead,
390− // just poke and prod it a little bit to see if some of the values
391− // we'd expect to be correct, are so.
429+ function test_tutorialRightAutoSkipped() {
430+ // Test that we skip the tutorial if user uses right edge themselves
392431
393− var right = goToPage("tutorialRight");
394− var stage = findChild(right, "stage");
395− var delegate0 = findChild(right, "appDelegate0");
432+ var tutorialLeft = findChild(shell, "tutorialLeft");
433+ AccountsService.demoEdgesCompleted = ["left"];
434+ tryCompare(tutorialLeft, "visible", false);
396435
397− tryCompare(stage, "dragProgress", 0);
398− touchFlick(shell, shell.width, halfHeight, shell.width * 0.8, halfHeight, true, false);
399− verify(stage.dragProgress > 0);
400− compare(stage.dragProgress, -delegate0.xTranslate);
401− touchFlick(shell, shell.width * 0.8, halfHeight, shell.width, halfHeight, false, true);
402− tryCompare(stage, "dragProgress", 0);
436+ touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
437+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "right"]);
438+ }
439+
440+ function test_tutorialBottomEdges() {
441+ var tutorial = findChild(shell, "tutorial");
442+ var tutorialBottom = findChild(tutorial, "tutorialBottom");
443+ var launcher = findChild(shell, "launcher");
444+ var stage = findChild(shell, "stage");
445+ var panel = findChild(shell, "panel");
403446
404− tryCompare(delegate0, "x", shell.width);
447+ openTutorialBottom();
405448
406− var screenshotImage = findChild(right, "screenshotImage");
407− tryCompare(screenshotImage, "source", Qt.resolvedUrl("../../../qml/Tutorial/graphics/facebook.png"));
408− tryCompare(screenshotImage, "visible", true);
449+ tryCompare(tutorial, "running", true);
450+ verify(!tutorial.launcherEnabled);
451+ verify(!tutorial.spreadEnabled);
452+ verify(!tutorial.panelEnabled);
453+ verify(tutorialBottom.shown);
454+ verify(!launcher.available);
455+ verify(!stage.spreadEnabled);
456+ verify(!panel.indicators.available);
409457 }
410458
411− function disabled_test_bottomShortDrag() {
412− var bottom = goToPage("tutorialBottom");
459+ /*function test_tutorialBottomFinish() {
460+ var tutorial = findChild(shell, "tutorial");
461+ var tutorialBottom = findChild(tutorial, "tutorialBottom");
462+
463+ openTutorialBottom();
464+ touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
465+
466+ tryCompare(tutorialBottom, "shown", false);
467+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top", "right", "bottom"]);
468+ tryCompare(AccountsService, "demoEdges", false);
469+ }*/
470+
471+ function test_tutorialBottomDelay() {
472+ // Test that if we exit the right tutorial, we don't immediately
473+ // jump into bottom tutorial.
474+ var tutorialBottom = findChild(shell, "tutorialBottom");
475+ var tutorialBottomTimer = findInvisibleChild(tutorialBottom, "tutorialBottomTimer");
476+
477+ tutorialBottomTimer.interval = 1;
478+ openTutorialRight();
479+ ApplicationManager.requestFocusApplication("dialer-app");
480+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
481+
482+ AccountsService.demoEdgesCompleted = ["left", "top", "right"];
483+ verify(tutorialBottomTimer.running);
484+ verify(!tutorialBottom.shown);
485+ tryCompare(tutorialBottom, "shown", true);
486+ }
413487
414− touchFlick(shell, halfWidth, shell.height, halfWidth, shell.height * 0.8);
488+ function disabled_test_skipOnDesktop() {
489+ var tutorial = findChild(shell, "tutorial");
490+ tryCompare(tutorial, "active", true);
491+ tryCompare(tutorial, "running", true);
415492
416− var errorTextLabel = findChild(bottom, "errorTextLabel");
417− var errorTitleLabel = findChild(bottom, "errorTitleLabel");
418− tryCompare(bottom, "shown", true); // still on bottom page
419− tryCompare(errorTextLabel, "opacity", 1); // show error
420− tryCompare(errorTitleLabel, "opacity", 1); // show error
493+ shell.usageScenario = "desktop";
494+ tryCompare(tutorial, "active", false);
495+ tryCompare(tutorial, "running", false);
421496 }
422497
423498 function disabled_test_interrupted() {