on xenial help sign in
Fix shell test; don't disable tutorial if we receive a call during the wizard
3ffa45aMichael Terry
qml/Shell.qml+3−4
@@ -114,10 +114,9 @@ Item {
114 }
114 }
115 function _onMainAppChanged(appId) {
115 function _onMainAppChanged(appId) {
116 if (wizard.active && appId != "" && appId != "unity8-dash") {
116 if (wizard.active && appId != "" && appId != "unity8-dash") {
117− // If this happens on first boot, we may be in edge
117+ // If this happens on first boot, we may be in the
118− // tutorial or wizard while receiving a call. But a call
118+ // wizard while receiving a call. But a call is more
119− // is more important than wizard so just bail out of those.
119+ // important than the wizard so just bail out of it.
120− tutorial.finish();
121 wizard.hide();
120 wizard.hide();
122 }
121 }
123
122
qml/Tutorial/Tutorial.qml+1−1
@@ -26,7 +26,7 @@ import AccountsService 0.1
26Item {
26Item {
27 id: root
27 id: root
28
28
29− property alias active: loader.active
29+ readonly property alias active: loader.active
30
30
31 property Item launcher
31 property Item launcher
32 property Item panel
32 property Item panel
tests/qmltests/tst_Shell.qml−10
@@ -1232,13 +1232,10 @@ Rectangle {
1232
1232
1233 function test_wizardEarlyExit() {
1233 function test_wizardEarlyExit() {
1234 Wizard.System.wizardEnabled = true;
1234 Wizard.System.wizardEnabled = true;
1235− AccountsService.demoEdges = true;
1236 loadShell("phone");
1235 loadShell("phone");
1237
1236
1238 var wizard = findChild(shell, "wizard");
1237 var wizard = findChild(shell, "wizard");
1239− var tutorial = findChild(shell, "tutorial");
1240 tryCompare(wizard, "active", true);
1238 tryCompare(wizard, "active", true);
1241− tryCompare(tutorial, "running", true);
1242 tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "unity8-dash");
1239 tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "unity8-dash");
1243
1240
1244 // Make sure we stay running when there's no top level window (can happen for
1241 // Make sure we stay running when there's no top level window (can happen for
@@ -1251,14 +1248,12 @@ Rectangle {
1251
1248
1252 tryCompare(topLevelSurfaceList, "count", 0);
1249 tryCompare(topLevelSurfaceList, "count", 0);
1253 compare(wizard.shown, true);
1250 compare(wizard.shown, true);
1254− compare(tutorial.running, true);
1255
1251
1256 // And make sure we stay running when dash comes back again
1252 // And make sure we stay running when dash comes back again
1257 var dashSurfaceId = topLevelSurfaceList.nextId;
1253 var dashSurfaceId = topLevelSurfaceList.nextId;
1258 ApplicationManager.startApplication(dashApplication.appId);
1254 ApplicationManager.startApplication(dashApplication.appId);
1259 waitUntilAppWindowIsFullyLoaded(dashSurfaceId);
1255 waitUntilAppWindowIsFullyLoaded(dashSurfaceId);
1260 compare(wizard.shown, true);
1256 compare(wizard.shown, true);
1261− compare(tutorial.running, true);
1262
1257
1263 // And make sure we stop when some other surface shows app
1258 // And make sure we stop when some other surface shows app
1264 var gallerySurfaceId = topLevelSurfaceList.nextId;
1259 var gallerySurfaceId = topLevelSurfaceList.nextId;
@@ -1266,12 +1261,7 @@ Rectangle {
1266 waitUntilAppWindowIsFullyLoaded(gallerySurfaceId);
1261 waitUntilAppWindowIsFullyLoaded(gallerySurfaceId);
1267 tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "gallery-app");
1262 tryCompareFunction(function() { return topLevelSurfaceList.applicationAt(0).appId; }, "gallery-app");
1268 compare(wizard.shown, false);
1263 compare(wizard.shown, false);
1269− compare(tutorial.running, false);
1270− tryCompare(AccountsService, "demoEdges", false);
1271 tryCompare(Wizard.System, "wizardEnabled", false);
1264 tryCompare(Wizard.System, "wizardEnabled", false);
1272−
1273− var tutorialLeft = findChild(tutorial, "tutorialLeft");
1274− compare(tutorialLeft, null); // should be destroyed with tutorial
1275 }
1265 }
1276
1266
1277 function test_tutorialPausedDuringGreeter() {
1267 function test_tutorialPausedDuringGreeter() {