@@ -34,6 +34,7 @@ import Powerd 0.1
3434import Wizard 0.1 as Wizard
3535
3636import "../../qml"
37+import "Stages"
3738
3839Rectangle {
3940 id: root
@@ -102,19 +103,6 @@ Rectangle {
102103 GSettingsController.setUsageMode("com.canonical.Unity8", "Staged")
103104 }
104105 }
105− },
106− State {
107− name: "desktop"
108− PropertyChanges {
109− target: shellLoader
110− width: units.gu(100)
111− height: units.gu(71)
112− }
113− StateChangeScript {
114− script: {
115− GSettingsController.setUsageMode("com.canonical.Unity8", "Windowed")
116− }
117− }
118106 }
119107 ]
120108
@@ -143,19 +131,16 @@ Rectangle {
143131 Column {
144132 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
145133 spacing: units.gu(1)
146− Row {
147− anchors { left: parent.left; right: parent.right }
148− Button {
149− text: "Show Greeter"
150− activeFocusOnPress: false
151− onClicked: {
152− if (shellLoader.status !== Loader.Ready)
153− return;
154−
155− var greeter = testCase.findChild(shellLoader.item, "greeter");
156− if (!greeter.shown) {
157− LightDM.Greeter.showGreeter();
158− }
134+ Button {
135+ text: "Show Greeter"
136+ activeFocusOnPress: false
137+ onClicked: {
138+ if (shellLoader.status !== Loader.Ready)
139+ return;
140+
141+ var greeter = testCase.findChild(shellLoader.item, "greeter");
142+ if (!greeter.shown) {
143+ LightDM.Greeter.showGreeter();
159144 }
160145 }
161146 }
@@ -175,13 +160,32 @@ Rectangle {
175160 anchors { left: parent.left; right: parent.right }
176161 activeFocusOnPress: false
177162 text: "Size"
178− model: ["phone", "tablet", "desktop"]
163+ model: ["phone", "tablet"]
179164 onSelectedIndexChanged: {
180165 shellLoader.active = false;
181166 shellLoader.state = model[selectedIndex];
182167 shellLoader.active = true;
183168 }
184− MouseTouchEmulationCheckbox { color: "white" }
169+ }
170+ MouseTouchEmulationCheckbox {
171+ id: mouseEmulation
172+ checked: true
173+ color: "white"
174+ }
175+
176+ Column {
177+ anchors { left: parent.left; right: parent.right }
178+ spacing: units.gu(1)
179+
180+ Label { text: "Applications"; font.bold: true }
181+
182+ Repeater {
183+ id: appRepeater
184+ model: ApplicationManager.availableApplications
185+ ApplicationCheckBox {
186+ appId: modelData
187+ }
188+ }
185189 }
186190 }
187191 }
@@ -260,6 +264,7 @@ Rectangle {
260264 }
261265
262266 function cleanup() {
267+ mouseEmulation.checked = true;
263268 tryCompare(shell, "enabled", true); // make sure greeter didn't leave us in disabled state
264269 tearDown();
265270 }
@@ -1144,8 +1149,7 @@ Rectangle {
11441149 loadShell("phone");
11451150 swipeAwayGreeter();
11461151 AccountsService.backgroundFile = data.accounts;
1147− var backgroundSettings = findInvisibleChild(shell, "backgroundSettings");
1148− backgroundSettings.pictureUri = data.gsettings;
1152+ GSettingsController.setPictureUri("org.gnome.desktop.background", data.gsettings);
11491153
11501154 if (data.output === "defaultBackground") {
11511155 tryCompare(shell, "background", shell.defaultBackground);
@@ -1202,5 +1206,18 @@ Rectangle {
12021206 tryCompare(passwordInput, "focus", true)
12031207 }
12041208 }
1209+
1210+ function test_stageLoader_data() {
1211+ return [
1212+ {tag: "phone", source: "Stages/PhoneStage.qml"},
1213+ {tag: "tablet", source: "Stages/TabletStage.qml"}
1214+ ]
1215+ }
1216+
1217+ function test_stageLoader(data) {
1218+ loadShell(data.tag);
1219+ var stageLoader = findChild(shell, "applicationsDisplayLoader");
1220+ verify(String(stageLoader.source).indexOf(data.source) >= 0);
1221+ }
12051222 }
12061223}