@@ -19,7 +19,7 @@ import QtTest 1.0
19import "../../../qml/Dash"
19import "../../../qml/Dash"
20import "../../../qml/Components"
20import "../../../qml/Components"
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22−import Unity 0.1
22+import Unity 0.2
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24import Utils 0.1
24import Utils 0.1
@@ -44,7 +44,6 @@ Item {
44 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
44 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
45 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
45 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
46 'home.scope': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
46 'home.scope': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
47− 'applications.scope': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
48 'MockScope5': { 'movementStarted': 0, 'positionedAtBeginning': 0 }
47 'MockScope5': { 'movementStarted': 0, 'positionedAtBeginning': 0 }
@@ -71,7 +70,6 @@ Item {
71 "MockScope1": Qt.resolvedUrl("qml/fake_scopeView1.qml"),
70 "MockScope1": Qt.resolvedUrl("qml/fake_scopeView1.qml"),
72 "MockScope2": Qt.resolvedUrl("qml/fake_scopeView2.qml"),
71 "MockScope2": Qt.resolvedUrl("qml/fake_scopeView2.qml"),
73 "home.scope": Qt.resolvedUrl("qml/fake_scopeView3.qml"),
72 "home.scope": Qt.resolvedUrl("qml/fake_scopeView3.qml"),
74− "applications.scope": Qt.resolvedUrl("qml/fake_scopeView4.qml")
76 genericScope: Qt.resolvedUrl("qml/fake_generic_scopeView.qml")
74 genericScope: Qt.resolvedUrl("qml/fake_generic_scopeView.qml")
@@ -86,9 +84,6 @@ Item {
86 scopeStatus["home.scope"].movementStarted = 0;
84 scopeStatus["home.scope"].movementStarted = 0;
87 scopeStatus["home.scope"].positionedAtBeginning = 0;
85 scopeStatus["home.scope"].positionedAtBeginning = 0;
89− scopeStatus["applications.scope"].movementStarted = 0;
90− scopeStatus["applications.scope"].positionedAtBeginning = 0;
92 scopeStatus["MockScope5"].movementStarted = 0;
87 scopeStatus["MockScope5"].movementStarted = 0;
93 scopeStatus["MockScope5"].positionedAtBeginning = 0;
88 scopeStatus["MockScope5"].positionedAtBeginning = 0;
@@ -143,7 +138,7 @@ Item {
143 compare(dashContentList.count, 0, "DashContent should have 0 items when it starts");
138 compare(dashContentList.count, 0, "DashContent should have 0 items when it starts");
144 compare(dashContentList.currentIndex, -1, "DashContent's currentIndex should be -1 while there have been no items in the model");
139 compare(dashContentList.currentIndex, -1, "DashContent's currentIndex should be -1 while there have been no items in the model");
146− tryCompare(scopeLoadedSpy, "count", 5);
141+ tryCompare(scopeLoadedSpy, "count", 4);
148 verify(dashContentList.currentIndex >= 0);
143 verify(dashContentList.currentIndex >= 0);
@@ -156,7 +151,7 @@ Item {
156 // pretend we're running after a model reset
151 // pretend we're running after a model reset
157 dashContentList.currentIndex = 27;
152 dashContentList.currentIndex = 27;
159− tryCompare(scopeLoadedSpy, "count", 5);
154+ tryCompare(scopeLoadedSpy, "count", 4);
161 verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < 5);
156 verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < 5);
@@ -167,7 +162,7 @@ Item {
167 var dashContentList = findChild(dashContent, "dashContentList");
162 var dashContentList = findChild(dashContent, "dashContentList");
168 verify(dashContentList != undefined)
163 verify(dashContentList != undefined)
170− tryCompare(scopeLoadedSpy, "count", 5);
165+ tryCompare(scopeLoadedSpy, "count", 4);
172 dashContentList.movementStarted();
167 dashContentList.movementStarted();
@@ -175,32 +170,30 @@ Item {
175 compare(scopeStatus["MockScope1"].movementStarted, 1, "MockScope1 should have emitted movementStarted signal when content list did.");
170 compare(scopeStatus["MockScope1"].movementStarted, 1, "MockScope1 should have emitted movementStarted signal when content list did.");
176 compare(scopeStatus["MockScope2"].movementStarted, 1, "MockScope2 should have emitted movementStarted signal when content list did.");
171 compare(scopeStatus["MockScope2"].movementStarted, 1, "MockScope2 should have emitted movementStarted signal when content list did.");
177 compare(scopeStatus["home.scope"].movementStarted, 1, "home.scope should have emitted movementStarted signal when content list did.");
172 compare(scopeStatus["home.scope"].movementStarted, 1, "home.scope should have emitted movementStarted signal when content list did.");
178− compare(scopeStatus["applications.scope"].movementStarted, 1, "applications.scope should have emitted movementStarted signal when content list did.");
179 compare(scopeStatus["MockScope5"].movementStarted, 1, "MockScope5 should have emitted movementStarted signal when content list did.");
173 compare(scopeStatus["MockScope5"].movementStarted, 1, "MockScope5 should have emitted movementStarted signal when content list did.");
182 function test_positioned_at_beginning_signal() {
176 function test_positioned_at_beginning_signal() {
183 dashContent.setCurrentScopeAtIndex(3, true, false);
177 dashContent.setCurrentScopeAtIndex(3, true, false);
185− tryCompare(scopeLoadedSpy, "count", 5);
179+ tryCompare(scopeLoadedSpy, "count", 4);
187 dashContent.positionedAtBeginning();
181 dashContent.positionedAtBeginning();
188 compare(scopeStatus["MockScope1"].positionedAtBeginning, 1, "MockScope1 should have emitted positionedAtBeginning signal when DashContent did.");
182 compare(scopeStatus["MockScope1"].positionedAtBeginning, 1, "MockScope1 should have emitted positionedAtBeginning signal when DashContent did.");
189 compare(scopeStatus["MockScope2"].positionedAtBeginning, 1, "MockScope2 should have emitted positionedAtBeginning signal when DashContent did.");
183 compare(scopeStatus["MockScope2"].positionedAtBeginning, 1, "MockScope2 should have emitted positionedAtBeginning signal when DashContent did.");
190 compare(scopeStatus["home.scope"].positionedAtBeginning, 1, "home.scope should have emitted positionedAtBeginning signal when DashContent did.");
184 compare(scopeStatus["home.scope"].positionedAtBeginning, 1, "home.scope should have emitted positionedAtBeginning signal when DashContent did.");
191− compare(scopeStatus["applications.scope"].positionedAtBeginning, 1, "applications.scope should have emitted positionedAtBeginning signal when DashContent did.");
192 compare(scopeStatus["MockScope5"].positionedAtBeginning, 1, "MockScope5 should have emitted positionedAtBeginning signal when DashContent did.");
185 compare(scopeStatus["MockScope5"].positionedAtBeginning, 1, "MockScope5 should have emitted positionedAtBeginning signal when DashContent did.");
195 function test_scope_loaded() {
188 function test_scope_loaded() {
196− tryCompare(scopeLoadedSpy, "count", 5);
189+ tryCompare(scopeLoadedSpy, "count", 4);
199 function test_content_end_reached() {
192 function test_content_end_reached() {
200 var dashContentList = findChild(dashContent, "dashContentList");
193 var dashContentList = findChild(dashContent, "dashContentList");
201 verify(dashContentList != undefined);
194 verify(dashContentList != undefined);
203− tryCompare(scopeLoadedSpy, "count", 5);
196+ tryCompare(scopeLoadedSpy, "count", 4);
204 dashContent.setCurrentScopeAtIndex(0, true, false);
197 dashContent.setCurrentScopeAtIndex(0, true, false);
205 dashContentList.currentItem.item.endReached();
198 dashContentList.currentItem.item.endReached();
@@ -242,8 +235,7 @@ Item {
242 {tag: "index0", index: 0, objectName: "fake_scopeView1"},
235 {tag: "index0", index: 0, objectName: "fake_scopeView1"},
243 {tag: "index1", index: 1, objectName: "fake_scopeView2"},
236 {tag: "index1", index: 1, objectName: "fake_scopeView2"},
244 {tag: "index2", index: 2, objectName: "fake_scopeView3"},
237 {tag: "index2", index: 2, objectName: "fake_scopeView3"},
245− {tag: "index3", index: 3, objectName: "fake_scopeView4"},
238+ {tag: "index3", index: 3, objectName: "fake_generic_scopeView"}
246− {tag: "index4", index: 4, objectName: "fake_generic_scopeView"}
@@ -263,7 +255,7 @@ Item {
263 function test_is_active(data) {
255 function test_is_active(data) {
264 var dashContentList = findChild(dashContent, "dashContentList");
256 var dashContentList = findChild(dashContent, "dashContentList");
266− tryCompare(scopeLoadedSpy, "count", 5);
258+ tryCompare(scopeLoadedSpy, "count", 4);
268 dashContent.setCurrentScopeAtIndex(data.select, true, false);
260 dashContent.setCurrentScopeAtIndex(data.select, true, false);
269 dashContent.visible = data.visible;
261 dashContent.visible = data.visible;