Merge lp:~mterry/unity8/wizard-dash-reset into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 1637
Merged at revision: 1667
Proposed branch: lp:~mterry/unity8/wizard-dash-reset
Merge into: lp:unity8
Prerequisite: lp:~mterry/unity8/unlock-sim-after-wizard
Diff against target: 69 lines (+32/-5)
3 files modified
qml/Shell.qml (+1/-1)
tests/mocks/Unity/Application/ApplicationManager.cpp (+0/-4)
tests/qmltests/tst_Shell.qml (+31/-0)
To merge this branch: bzr merge lp:~mterry/unity8/wizard-dash-reset
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+251117@code.launchpad.net

Commit message

Don't close wizard & edge tutorial when the unity8-dash closes

As happens when the user switches languages in the wizard! (LP: #1425484)

Description of the change

Don't close wizard & edge tutorial when the unity8-dash closes (as happens when the user switches languages in the wizard!) (LP: #1425484)

== Checklist ==

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 Yes, the prerequisite https://code.launchpad.net/~mterry/unity8/unlock-sim-after-wizard/+merge/251005

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 Yes

 * Did you make sure that your branch does not contain spurious tags?
 Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 NA

 * If you changed the UI, has there been a design review?
 NA

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

* Did CI run pass? If not, please explain why.
No. Failing autopilot test seems unrelated.

* Did you make sure that the branch does not contain spurious tags?
Yes.

review: Approve
Revision history for this message
MichaƂ Sawicz (saviq) wrote :

Text conflict in tests/qmltests/tst_Shell.qml
1 conflicts encountered.

Please remerge with prerequisite.

lp:~mterry/unity8/wizard-dash-reset updated
1638. By Michael Terry

Merge from prereq

Revision history for this message
Michael Terry (mterry) wrote :

> Please remerge with prerequisite.

Done.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Shell.qml'
2--- qml/Shell.qml 2015-03-10 14:25:31 +0000
3+++ qml/Shell.qml 2015-03-10 14:25:31 +0000
4@@ -192,7 +192,7 @@
5 onFocusedApplicationIdChanged: {
6 var appId = ApplicationManager.focusedApplicationId;
7
8- if (tutorial.running && appId != "unity8-dash") {
9+ if (tutorial.running && appId != "" && appId != "unity8-dash") {
10 // If this happens on first boot, we may be in edge
11 // tutorial or wizard while receiving a call. But a call
12 // is more important than wizard so just bail out of those.
13
14=== modified file 'tests/mocks/Unity/Application/ApplicationManager.cpp'
15--- tests/mocks/Unity/Application/ApplicationManager.cpp 2015-02-20 19:37:30 +0000
16+++ tests/mocks/Unity/Application/ApplicationManager.cpp 2015-03-10 14:25:31 +0000
17@@ -241,10 +241,6 @@
18
19 bool ApplicationManager::stopApplication(const QString &appId)
20 {
21- if (appId == "unity8-dash") {
22- return false;
23- }
24-
25 ApplicationInfo *application = findApplication(appId);
26 if (application == nullptr)
27 return false;
28
29=== modified file 'tests/qmltests/tst_Shell.qml'
30--- tests/qmltests/tst_Shell.qml 2015-03-10 14:25:31 +0000
31+++ tests/qmltests/tst_Shell.qml 2015-03-10 14:25:31 +0000
32@@ -957,6 +957,37 @@
33 compare(unlockAllModemsSpy.count, 1);
34 }
35
36+ function test_wizardEarlyExit() {
37+ Wizard.System.wizardEnabled = true;
38+ AccountsService.demoEdges = true;
39+ loadShell("phone");
40+
41+ var wizard = findChild(shell, "wizard");
42+ var tutorial = findChild(shell, "tutorial");
43+ tryCompare(wizard, "active", true);
44+ tryCompare(tutorial, "running", true);
45+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
46+
47+ // Make sure we stay running when nothing focused (can happen for
48+ // a moment when we restart the dash after switching language)
49+ ApplicationManager.stopApplication("unity8-dash");
50+ tryCompare(ApplicationManager, "focusedApplicationId", "");
51+ compare(wizard.shown, true);
52+ compare(tutorial.running, true);
53+
54+ // And make sure we stay running when dash focused again
55+ ApplicationManager.startApplication("unity8-dash");
56+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
57+ compare(wizard.shown, true);
58+ compare(tutorial.running, true);
59+
60+ // And make sure we stop when something else is focused
61+ ApplicationManager.startApplication("gallery-app");
62+ tryCompare(ApplicationManager, "focusedApplicationId", "gallery-app");
63+ compare(wizard.shown, false);
64+ compare(tutorial.running, false);
65+ }
66+
67 function test_tapOnRightEdgeReachesApplicationSurface() {
68 loadShell("phone");
69 swipeAwayGreeter();

Subscribers

People subscribed via source and target branches