on xenial help sign in
Fix shell test; don't disable tutorial if we receive a call during the wizard
commit3ffa45a44f1e3e42c5fb97f2bf15e517d8d3be1e authorMichael Terry <michael.terry@canonical.com> dateFri 20 May 2016, 09:12 (10 years ago) parentf39312b
3 files changed+4−15
qml/Shell.qml+3−4 qml/Tutorial/Tutorial.qml+1−1 tests/qmltests/tst_Shell.qml−10
qml/Shell.qml+3−4
@@ -114,10 +114,9 @@ Item {
114114 }
115115 function _onMainAppChanged(appId) {
116116 if (wizard.active && appId != "" && appId != "unity8-dash") {
117− // If this happens on first boot, we may be in edge
118− // tutorial or wizard while receiving a call. But a call
119− // is more important than wizard so just bail out of those.
120− tutorial.finish();
117+ // If this happens on first boot, we may be in the
118+ // wizard while receiving a call. But a call is more
119+ // important than the wizard so just bail out of it.
121120 wizard.hide();
122121 }
123122
qml/Tutorial/Tutorial.qml+1−1
@@ -26,7 +26,7 @@ import AccountsService 0.1
2626Item {
2727 id: root
2828
29− property alias active: loader.active
29+ readonly property alias active: loader.active
3030
3131 property Item launcher
3232 property Item panel
tests/qmltests/tst_Shell.qml−10
@@ -1232,13 +1232,10 @@ Rectangle {
12321232
12331233 function test_wizardEarlyExit() {
12341234 Wizard.System.wizardEnabled = true;
1235− AccountsService.demoEdges = true;
12361235 loadShell("phone");
12371236
12381237 var wizard = findChild(shell, "wizard");
1239− var tutorial = findChild(shell, "tutorial");
12401238 tryCompare(wizard, "active", true);
1241− tryCompare(tutorial, "running", true);
12421239 tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "unity8-dash");
12431240
12441241 // Make sure we stay running when there's no top level window (can happen for
@@ -1251,14 +1248,12 @@ Rectangle {
12511248
12521249 tryCompare(topLevelSurfaceList, "count", 0);
12531250 compare(wizard.shown, true);
1254− compare(tutorial.running, true);
12551251
12561252 // And make sure we stay running when dash comes back again
12571253 var dashSurfaceId = topLevelSurfaceList.nextId;
12581254 ApplicationManager.startApplication(dashApplication.appId);
12591255 waitUntilAppWindowIsFullyLoaded(dashSurfaceId);
12601256 compare(wizard.shown, true);
1261− compare(tutorial.running, true);
12621257
12631258 // And make sure we stop when some other surface shows app
12641259 var gallerySurfaceId = topLevelSurfaceList.nextId;
@@ -1266,12 +1261,7 @@ Rectangle {
12661261 waitUntilAppWindowIsFullyLoaded(gallerySurfaceId);
12671262 tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "gallery-app");
12681263 compare(wizard.shown, false);
1269− compare(tutorial.running, false);
1270− tryCompare(AccountsService, "demoEdges", false);
12711264 tryCompare(Wizard.System, "wizardEnabled", false);
1272−
1273− var tutorialLeft = findChild(tutorial, "tutorialLeft");
1274− compare(tutorialLeft, null); // should be destroyed with tutorial
12751265 }
12761266
12771267 function test_tutorialPausedDuringGreeter() {