on xenial help sign in
Merge unity8
commit4744a02f3fb3c8feff01a2a50f86f4ec638c7317 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 25 Aug 2015, 09:23 (11 years ago) parent72529cb3d6047c
5 files changed+26−29
debian/changelog+10 qml/Shell.qml+7−8 qml/Tutorial/Tutorial.qml−7 qml/Tutorial/TutorialContent.qml+2−9 tests/qmltests/Tutorial/tst_Tutorial.qml+7−5
debian/changelog+10
@@ -1,3 +1,13 @@
1+unity8 (8.11+15.04.20150821-0ubuntu1) vivid; urgency=medium
2+
3+ [ Michael Terry ]
4+ * Skip the tutorial entirely when in desktop mode. This fixes the
5+ emulator not being able to pass the tutorial.
6+ * Skip the tutorial entirely when in desktop mode. This fixes the
7+ emulator not being able to pass the tutorial.
8+
9+ -- CI Train Bot <ci-train-bot@canonical.com> Fri, 21 Aug 2015 14:34:50 +0000
10+
111unity8 (8.11+15.04.20150817-0ubuntu1) vivid; urgency=medium
212
313 [ Albert Astals Cid ]
qml/Shell.qml+7−8
@@ -367,20 +367,19 @@ Item {
367367 id: tutorial
368368 objectName: "tutorial"
369369 anchors.fill: parent
370− active: AccountsService.demoEdges
371− paused: LightDM.Greeter.active
372− launcher: launcher
373− panel: panel
374− edgeSize: shell.edgeSize
375370
376371 // EdgeDragAreas don't work with mice. So to avoid trapping the user,
377− // we'll tell the tutorial to avoid using them on the Desktop. The
372+ // we skip the tutorial on the Desktop to avoid using them. The
378373 // Desktop doesn't use the same spread design anyway. The tutorial is
379374 // all a bit of a placeholder on non-phone form factors right now.
380375 // When the design team gives us more guidance, we can do something
381376 // more clever here.
382− // TODO: use DeviceConfiguration instead of checking source
383− useEdgeDragArea: applicationsDisplayLoader.source != Qt.resolvedUrl("Stages/DesktopStage.qml")
377+ active: usageScenario != "desktop" && AccountsService.demoEdges
378+
379+ paused: LightDM.Greeter.active
380+ launcher: launcher
381+ panel: panel
382+ edgeSize: shell.edgeSize
384383
385384 onFinished: {
386385 AccountsService.demoEdges = false;
qml/Tutorial/Tutorial.qml−7
@@ -23,7 +23,6 @@ Item {
2323 property alias active: loader.active
2424 property bool paused
2525 property real edgeSize
26− property bool useEdgeDragArea
2726
2827 property Item launcher
2928 property Item panel
@@ -59,12 +58,6 @@ Item {
5958 value: root.edgeSize
6059 }
6160
62− Binding {
63− target: loader.item
64− property: "useEdgeDragArea"
65− value: root.useEdgeDragArea
66− }
67−
6861 Binding {
6962 target: loader.item
7063 property: "launcher"
qml/Tutorial/TutorialContent.qml+2−9
@@ -32,7 +32,6 @@ Item {
3232
3333 property bool paused: false
3434 property real edgeSize
35− property bool useEdgeDragArea
3635
3736 signal finished()
3837
@@ -78,17 +77,11 @@ Item {
7877 anchors.fill: parent
7978 textXOffset: root.launcher.panelWidth
8079 paused: !shown || root.paused
81− text: root.useEdgeDragArea ? i18n.tr("Tap here to continue.") : i18n.tr("Click here to finish.")
80+ text: i18n.tr("Tap here to continue.")
8281
8382 onFinished: {
8483 root.launcher.hide();
85− if (root.useEdgeDragArea) {
86− tutorialRight.show();
87− } else {
88− // Last two screens use EdgeDragArea (right edge spread and
89− // bottom edge). So just end tutorial here.
90− root.finish();
91− }
84+ tutorialRight.show();
9285 }
9386 }
9487
tests/qmltests/Tutorial/tst_Tutorial.qml+7−5
@@ -263,12 +263,14 @@ Item {
263263 goToPage(null);
264264 }
265265
266− function test_walkthroughOnDesktop() {
266+ function test_skipOnDesktop() {
267+ var tutorial = findChild(shell, "tutorial");
268+ tryCompare(tutorial, "active", true);
269+ tryCompare(tutorial, "running", true);
270+
267271 shell.usageScenario = "desktop";
268− var page = goToPage("tutorialLeftFinish");
269− var tick = findChild(page, "tick");
270− tap(tick);
271− checkFinished();
272+ tryCompare(tutorial, "active", false);
273+ tryCompare(tutorial, "running", false);
272274 }
273275
274276 function test_launcherShortDrag() {