on xenial help sign in
Stop the left edge tutorial from being shown when the bottom edge tutorial wants to be shown after receiving a call.

Approved by: Albert Astals Cid

commitfc57df559f34cdb08ba28934d41e15377f246598 authorMichael Terry <michael.terry@canonical.com> dateWed 23 Mar 2016, 09:49 (11 years ago) parent7fd52cbfa62a07
2 files changed+28−1
qml/Tutorial/TutorialContent.qml+3−1 tests/qmltests/Tutorial/tst_Tutorial.qml+25
qml/Tutorial/TutorialContent.qml+3−1
@@ -88,7 +88,8 @@ Item {
8888 hides: [launcher, panel.indicators]
8989 paused: root.paused
9090
91− isReady: !tutorialLeftLoader.skipped && !paused && !keyboardVisible
91+ isReady: !tutorialLeftLoader.skipped && !paused && !keyboardVisible &&
92+ !tutorialBottomLoader.shown && !tutorialBottomLoader.mightShow
9293
9394 // Use an idle timer here, because when constructed, all our isReady variables will be false.
9495 // Qml needs a moment to copy their values from Tutorial.qml. So we idle it and recheck.
@@ -277,6 +278,7 @@ Item {
277278
278279 skipped: tutorialBottomLoader.skipped
279280 isReady: !tutorialBottomLoader.skipped && !paused && !keyboardVisible &&
281+ !tutorialLeftLoader.shown && !tutorialLeftLongLoader.shown &&
280282 !tutorialTopLoader.shown && !tutorialRightLoader.shown &&
281283 tutorialBottomLoader.mightShow &&
282284 d.focusedApp.state === ApplicationInfoInterface.Running
tests/qmltests/Tutorial/tst_Tutorial.qml+25
@@ -682,6 +682,31 @@ Rectangle {
682682 verify(!tutorialLeft.paused);
683683 }
684684
685+ function test_dialerInterruptionWithNoOverlappingTutorials() {
686+ var tutorialLeft = findChild(shell, "tutorialLeft");
687+ var tutorialBottom = findChild(shell, "tutorialBottom");
688+ verify(tutorialLeft.shown);
689+
690+ // Start call, hiding left tutorial
691+ callManager.foregroundCall = phoneCall;
692+ tryCompare(tutorialLeft, "shown", false);
693+
694+ // Start dialer app
695+ ApplicationManager.startApplication("dialer-app");
696+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
697+ verify(!tutorialBottom.shown);
698+
699+ // Dismiss call, bottom tutorial should appear
700+ callManager.foregroundCall = null;
701+ tryCompare(tutorialBottom, "shown", true);
702+ verify(!tutorialLeft.shown);
703+
704+ // Get rid of bottom tutorial, left should now be shown
705+ touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
706+ tryCompare(tutorialBottom, "shown", false);
707+ tryCompare(tutorialLeft, "shown", true);
708+ }
709+
685710 function test_greeterInterruptsTutorial() {
686711 var tutorialLeft = findChild(shell, "tutorialLeft");
687712 verify(tutorialLeft.shown);