@@ -17,6 +17,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19import AccountsService 0.1
19import AccountsService 0.1
20import LightDM 0.1 as LightDM
21import LightDM 0.1 as LightDM
21import Ubuntu.Components 1.1
22import Ubuntu.Components 1.1
22import Unity.Application 0.1
23import Unity.Application 0.1
@@ -45,6 +46,11 @@ Item {
51+ schema.id: "com.canonical.Unity8"
48 Component.onCompleted: {
54 Component.onCompleted: {
49 // must set the mock mode before loading the Shell
55 // must set the mock mode before loading the Shell
50 LightDM.Greeter.mockMode = "single-pin";
56 LightDM.Greeter.mockMode = "single-pin";
@@ -112,6 +118,7 @@ Item {
113 function init() {
119 function init() {
114 tryCompare(shell, "enabled", true); // enabled by greeter when ready
120 tryCompare(shell, "enabled", true); // enabled by greeter when ready
121+ unity8Settings.usageMode = "Staged";
115 AccountsService.demoEdges = false;
122 AccountsService.demoEdges = false;
116 AccountsService.demoEdges = true;
123 AccountsService.demoEdges = true;
117 swipeAwayGreeter();
124 swipeAwayGreeter();
@@ -185,17 +192,19 @@ Item {
187 function checkRightEdge() {
194 function checkRightEdge() {
195+ if (unity8Settings.usageMode === "Staged") {
188− touchFlick(shell, shell.width, halfHeight, halfWidth, halfHeight);
196+ touchFlick(shell, shell.width, halfHeight, halfWidth, halfHeight);
190− var stage = findChild(shell, "stage");
198+ var stage = findChild(shell, "stage");
191− var spreadView = findChild(stage, "spreadView");
199+ var spreadView = findChild(stage, "spreadView");
192− tryCompare(spreadView, "phase", 0);
200+ tryCompare(spreadView, "phase", 0);
195 function checkBottomEdge() {
204 function checkBottomEdge() {
196 // Can't actually check effect of swipe, since dash isn't really loaded
205 // Can't actually check effect of swipe, since dash isn't really loaded
197 var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader");
206 var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader");
198− tryCompare(applicationsDisplayLoader.item, "interactive", false);
207+ tryCompare(applicationsDisplayLoader, "interactive", false);
201 function checkFinished() {
210 function checkFinished() {
@@ -256,6 +265,14 @@ Item {
256 goToPage(null);
265 goToPage(null);
268+ function test_walkthroughOnDesktop() {
269+ unity8Settings.usageMode = "Windowed";
270+ var page = goToPage("tutorialLeftFinish");
271+ var tick = findChild(page, "tick");
259 function test_launcherShortDrag() {
276 function test_launcherShortDrag() {
260 // goToPage does a normal launcher pull. But here we want to test
277 // goToPage does a normal launcher pull. But here we want to test
261 // just barely pulling the launcher out and letting go (i.e. not
278 // just barely pulling the launcher out and letting go (i.e. not