@@ -17,6 +17,7 @@
1717import QtQuick 2.0
1818import QtTest 1.0
1919import AccountsService 0.1
20+import GSettings 1.0
2021import LightDM 0.1 as LightDM
2122import Ubuntu.Components 1.1
2223import Unity.Application 0.1
@@ -45,6 +46,11 @@ Item {
4546 }
4647 }
4748
49+ GSettings {
50+ id: unity8Settings
51+ schema.id: "com.canonical.Unity8"
52+ }
53+
4854 Component.onCompleted: {
4955 // must set the mock mode before loading the Shell
5056 LightDM.Greeter.mockMode = "single-pin";
@@ -112,6 +118,7 @@ Item {
112118
113119 function init() {
114120 tryCompare(shell, "enabled", true); // enabled by greeter when ready
121+ unity8Settings.usageMode = "Staged";
115122 AccountsService.demoEdges = false;
116123 AccountsService.demoEdges = true;
117124 swipeAwayGreeter();
@@ -185,17 +192,19 @@ Item {
185192 }
186193
187194 function checkRightEdge() {
188− touchFlick(shell, shell.width, halfHeight, halfWidth, halfHeight);
195+ if (unity8Settings.usageMode === "Staged") {
196+ touchFlick(shell, shell.width, halfHeight, halfWidth, halfHeight);
189197
190− var stage = findChild(shell, "stage");
191− var spreadView = findChild(stage, "spreadView");
192− tryCompare(spreadView, "phase", 0);
198+ var stage = findChild(shell, "stage");
199+ var spreadView = findChild(stage, "spreadView");
200+ tryCompare(spreadView, "phase", 0);
201+ }
193202 }
194203
195204 function checkBottomEdge() {
196205 // Can't actually check effect of swipe, since dash isn't really loaded
197206 var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader");
198− tryCompare(applicationsDisplayLoader.item, "interactive", false);
207+ tryCompare(applicationsDisplayLoader, "interactive", false);
199208 }
200209
201210 function checkFinished() {
@@ -256,6 +265,14 @@ Item {
256265 goToPage(null);
257266 }
258267
268+ function test_walkthroughOnDesktop() {
269+ unity8Settings.usageMode = "Windowed";
270+ var page = goToPage("tutorialLeftFinish");
271+ var tick = findChild(page, "tick");
272+ tap(tick);
273+ checkFinished();
274+ }
275+
259276 function test_launcherShortDrag() {
260277 // goToPage does a normal launcher pull. But here we want to test
261278 // just barely pulling the launcher out and letting go (i.e. not