@@ -55,6 +55,16 @@ Item {
55 scopes.load();
55 scopes.load();
56 tryCompare(dashContentList, "currentIndex", 0);
56 tryCompare(dashContentList, "currentIndex", 0);
57 tryCompare(dashContentList, "count", 6);
57 tryCompare(dashContentList, "count", 6);
58+ tryCompare(scopes, "loaded", true);
59+ tryCompareFunction(function() {
60+ var mockScope1Loader = findChild(dash, "MockScope1 loader");
61+ return mockScope1Loader && mockScope1Loader.item != null; },
63+ tryCompareFunction(function() {
64+ var mockScope1Loader = findChild(dash, "MockScope1 loader");
65+ return mockScope1Loader && mockScope1Loader.status === Loader.Ready; },
67+ waitForRendering(findChild(dash, "MockScope1 loader").item);
60 function get_scope_data() {
70 function get_scope_data() {
@@ -92,15 +102,6 @@ Item {
94 function test_dash_overview_show_select_same_favorite() {
104 function test_dash_overview_show_select_same_favorite() {
95− // Wait for stuff to be loaded
96− tryCompare(scopes, "loaded", true);
97− var dashContentList = findChild(dash, "dashContentList");
98− tryCompare(dashContentList, "count", 6);
99− tryCompareFunction(function() {
100− var mockScope1Loader = findChild(dash, "MockScope1 loader");
101− return mockScope1Loader && mockScope1Loader.item != null; },
104 // Show the overview
105 // Show the overview
105 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
106 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
106 var overviewController = findInvisibleChild(dash, "overviewController");
107 var overviewController = findInvisibleChild(dash, "overviewController");
@@ -121,18 +122,12 @@ Item {
122 // Make sure animation went back
123 // Make sure animation went back
123 tryCompare(overviewController, "progress", 0);
124 tryCompare(overviewController, "progress", 0);
126+ var dashContentList = findChild(dash, "dashContentList");
124 compare(dashContentList.currentIndex, 0);
127 compare(dashContentList.currentIndex, 0);
127 function test_dash_overview_show_select_different_favorite() {
130 function test_dash_overview_show_select_different_favorite() {
128− // Wait for stuff to be loaded
129− tryCompare(scopes, "loaded", true);
130− var dashContentList = findChild(dash, "dashContentList");
131− tryCompare(dashContentList, "count", 6);
132− tryCompareFunction(function() { return findChild(dash, "MockScope1 loader") != null; }, true);
133− var mockScope1Loader = findChild(dash, "MockScope1 loader");
134− tryCompare(mockScope1Loader, "status", Loader.Ready);
136 // Show the overview
131 // Show the overview
137 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
132 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
138 var overviewController = findInvisibleChild(dash, "overviewController");
133 var overviewController = findInvisibleChild(dash, "overviewController");
@@ -153,19 +148,11 @@ Item {
154 // Make sure animation went back
149 // Make sure animation went back
155 tryCompare(overviewController, "progress", 0);
150 tryCompare(overviewController, "progress", 0);
151+ var dashContentList = findChild(dash, "dashContentList");
156 compare(dashContentList.currentIndex, 1);
152 compare(dashContentList.currentIndex, 1);
159 function test_dash_overview_all_temp_scope_done_from_all() {
155 function test_dash_overview_all_temp_scope_done_from_all() {
160− // Wait for stuff to be loaded
161− tryCompare(scopes, "loaded", true);
162− var dashContentList = findChild(dash, "dashContentList");
163− tryCompare(dashContentList, "count", 6);
164− tryCompareFunction(function() {
165− var mockScope1Loader = findChild(dash, "MockScope1 loader");
166− return mockScope1Loader && mockScope1Loader.item != null; },
169 // Show the overview
156 // Show the overview
170 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
157 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
171 var overviewController = findInvisibleChild(dash, "overviewController");
158 var overviewController = findInvisibleChild(dash, "overviewController");
@@ -227,20 +214,13 @@ Item {
227 tryCompare(overviewController, "progress", 0);
214 tryCompare(overviewController, "progress", 0);
229 // Original list is still on 0
216 // Original list is still on 0
217+ var dashContentList = findChild(dash, "dashContentList");
230 compare(dashContentList.currentIndex, 0);
218 compare(dashContentList.currentIndex, 0);
233 function test_temp_scope_dash_overview_all_search_temp_scope_favorite_from_all() {
221 function test_temp_scope_dash_overview_all_search_temp_scope_favorite_from_all() {
234− // Wait for stuff to be loaded
235− tryCompare(scopes, "loaded", true);
236− var dashContentList = findChild(dash, "dashContentList");
237− tryCompare(dashContentList, "count", 6);
238− tryCompareFunction(function() {
239− var mockScope1Loader = findChild(dash, "MockScope1 loader");
240− return mockScope1Loader && mockScope1Loader.item != null; },
243 // Swipe right to Apps scope
222 // Swipe right to Apps scope
223+ var dashContentList = findChild(dash, "dashContentList");
244 touchFlick(dash, dash.width - 1, units.gu(1), dash.width - units.gu(10), units.gu(1));
224 touchFlick(dash, dash.width - 1, units.gu(1), dash.width - units.gu(10), units.gu(1));
245 tryCompare(dashContentList, "contentX", dashContentList.width);
225 tryCompare(dashContentList, "contentX", dashContentList.width);
246 tryCompare(dashContentList, "currentIndex", 1);
226 tryCompare(dashContentList, "currentIndex", 1);
@@ -249,8 +229,7 @@ Item {
249 var categoryListView = findChild(dashContentList.currentItem, "categoryListView");
229 var categoryListView = findChild(dashContentList.currentItem, "categoryListView");
250 var dashCategory2 = findChild(categoryListView, "dashCategory2");
230 var dashCategory2 = findChild(categoryListView, "dashCategory2");
251 tryCompareFunction(function() {
231 tryCompareFunction(function() {
252− var d = findChild(dashCategory2, "delegate2");
253− if (d) return true;
232+ if (dashCategory2.y < 200) return true;
254 categoryListView.contentY += 100;
233 categoryListView.contentY += 100;
255 return false;
234 return false;
256 }, true);
235 }, true);
@@ -340,8 +319,6 @@ Item {
342 function test_processing_indicator() {
321 function test_processing_indicator() {
343− tryCompare(scopes, "loaded", true);
345 var processingIndicator = findChild(dash, "processingIndicator");
322 var processingIndicator = findChild(dash, "processingIndicator");
346 verify(processingIndicator, "Can't find the processing indicator.");
323 verify(processingIndicator, "Can't find the processing indicator.");