@@ -101,207 +101,137 @@ Item {
104−// function test_dash_overview_show_select_same_favorite() {
104+ function test_manage_dash_select_same_favorite() {
105−// // Show the overview
105+ // Show the manage dash
106−// 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, units.gu(2));
107−// var overviewController = findInvisibleChild(dash, "overviewController");
107+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
108−// tryCompare(overviewController, "progress", 1);
108+ tryCompare(bottomEdgeController, "progress", 1);
110−// // Make sure tab is where it should
110+ // Make sure stuff is loaded
111−// var scopesOverview = findChild(dash, "scopesOverview");
111+ var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites");
112−// compare(scopesOverview.currentTab, 0);
112+ var favScopesListCategoryList = findChild(favScopesListCategory, "scopesListCategoryInnerList");
113−//
113+ tryCompare(favScopesListCategoryList, "currentIndex", 0);
114−// // Make sure stuff is loaded
114+
115−// var scopesOverviewFavoritesRepeater = findChild(dash, "scopesOverviewFavoritesRepeater");
116−// tryCompare(scopesOverviewFavoritesRepeater, "count", 6);
117−// tryCompareFunction(function() { return scopesOverviewFavoritesRepeater.itemAt(0).item != null; }, true);
118−// waitForRendering(scopesOverviewFavoritesRepeater.itemAt(0).item);
120−// // Click in first item
115+ // Click in first item
121−// mouseClick(scopesOverviewFavoritesRepeater.itemAt(0).item, 0, 0);
116+ mouseClick(favScopesListCategoryList.currentItem, 0, 0);
123−// // Make sure animation went back
118+ // Make sure animation went back
124−// tryCompare(overviewController, "progress", 0);
119+ tryCompare(bottomEdgeController, "progress", 0);
126−// var dashContentList = findChild(dash, "dashContentList");
121+ var dashContentList = findChild(dash, "dashContentList");
127−// compare(dashContentList.currentIndex, 0);
122+ compare(dashContentList.currentIndex, 0);
130−// function test_dash_overview_show_select_different_favorite() {
125+ function test_manage_dash_select_different_favorite() {
131−// // Show the overview
126+ // Show the manage dash
132−// touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
127+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
133−// var overviewController = findInvisibleChild(dash, "overviewController");
128+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
134−// tryCompare(overviewController, "progress", 1);
129+ tryCompare(bottomEdgeController, "progress", 1);
136−// // Make sure tab is where it should
131+ // Make sure stuff is loaded
137−// var scopesOverview = findChild(dash, "scopesOverview");
132+ var favScopesListCategory = findChild(dash, "scopesListCategoryfavorites");
138−// compare(scopesOverview.currentTab, 0);
133+ var favScopesListCategoryList = findChild(favScopesListCategory, "scopesListCategoryInnerList");
139−//
134+ tryCompare(favScopesListCategoryList, "currentIndex", 0);
140−// // Make sure stuff is loaded
135+
141−// var scopesOverviewFavoritesRepeater = findChild(dash, "scopesOverviewFavoritesRepeater");
142−// tryCompare(scopesOverviewFavoritesRepeater, "count", 6);
143−// tryCompareFunction(function() { return scopesOverviewFavoritesRepeater.itemAt(0).item != null; }, true);
144−// waitForRendering(scopesOverviewFavoritesRepeater.itemAt(1).item);
146−// // Click in first item
136+ // Click in second item
147−// mouseClick(scopesOverviewFavoritesRepeater.itemAt(1).item, 0, 0);
137+ favScopesListCategoryList.currentIndex = 1;
148−//
138+ mouseClick(favScopesListCategoryList.currentItem, 0, 0);
149−// // Make sure animation went back
140+ // Make sure animation went back
150−// tryCompare(overviewController, "progress", 0);
141+ tryCompare(bottomEdgeController, "progress", 0);
151−// var dashContentList = findChild(dash, "dashContentList");
142+ var dashContentList = findChild(dash, "dashContentList");
152−// compare(dashContentList.currentIndex, 1);
143+ compare(dashContentList.currentIndex, 1);
155−// function test_dash_overview_all_temp_scope_done_from_all() {
146+ function test_manage_dash_select_non_favorite() {
156−// // Show the overview
147+ // Show the manage dash
157−// touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
148+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
158−// var overviewController = findInvisibleChild(dash, "overviewController");
149+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
159−// tryCompare(overviewController, "progress", 1);
150+ tryCompare(bottomEdgeController, "progress", 1);
161−// // Make sure tab is where it should
152+ // Make sure stuff is loaded
162−// var scopesOverview = findChild(dash, "scopesOverview");
153+ var nonfavScopesListCategory = findChild(dash, "scopesListCategoryother");
163−// compare(scopesOverview.currentTab, 0);
154+ var nonfavScopesListCategoryList = findChild(nonfavScopesListCategory, "scopesListCategoryInnerList");
164−//
155+ tryCompare(nonfavScopesListCategoryList, "currentIndex", 0);
165−// // Make sure stuff is loaded
156+
166−// var scopesOverviewFavoritesRepeater = findChild(dash, "scopesOverviewFavoritesRepeater");
157+ // Click on a non favorite scope
167−// tryCompare(scopesOverviewFavoritesRepeater, "count", 6);
158+ mouseClick(nonfavScopesListCategoryList.currentItem, 0, 0);
168−// tryCompareFunction(function() { return scopesOverviewFavoritesRepeater.itemAt(0).item != null; }, true);
159+
169−// waitForRendering(scopesOverviewFavoritesRepeater.itemAt(1).item);
160+ // Check the bottom edge (manage dash) is disabled from temp scope
170−//
161+ var overviewDragHandle = findChild(dash, "overviewDragHandle");
171−// // Click on the all tab
162+ compare(overviewDragHandle.enabled, false);
172−// var scopesOverviewAllTabButton = findChild(dash, "scopesOverviewAllTabButton");
163+
173−// mouseClick(scopesOverviewAllTabButton, 0, 0);
175−// // Wait for all tab to be enabled (animation finish)
176−// var scopesOverviewAllView = findChild(dash, "scopesOverviewRepeaterChild1");
177−// tryCompare(scopesOverviewAllView, "enabled", true);
179−// // Click in the middle of the black bar (nothing happens)
180−// var bottomBar = findChild(scopesOverview, "bottomBar");
181−// mouseClick(bottomBar, bottomBar.width / 2, bottomBar.height / 2);
182−// // Check temp scope is not there
164+ // Check temp scope is there
183−// var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
165+ var dashTempScopeItem = findChild(dash, "dashTempScopeItem");
184−// expectFailContinue("", "Clicking in the middle of bottom bar should not open a temp scope");
166+ tryCompare(dashTempScopeItem, "x", 0);
185−// tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
167+ tryCompare(dashTempScopeItem, "visible", true);
187−// // Click on a temp scope
169+ // Check the manage dash is gone
188−// var tempScopeCard = findChild(scopesOverviewAllView, "delegate1");
170+ tryCompare(bottomEdgeController, "progress", 0);
189−// mouseClick(tempScopeCard, 0, 0);
171+
191−// // Check the bottom edge (overview) is disabled from temp scope
173+ var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
192−// var overviewDragHandle = findChild(dash, "overviewDragHandle");
174+ var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "backButton");
193−// compare(overviewDragHandle.enabled, false);
175+ mouseClick(backButton, 0, 0);
195−// // Check temp scope is there
177+ // Check temp scope is gone
196−// tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
178+ tryCompare(dashTempScopeItem, "x", dash.width);
197−// tryCompare(scopesOverviewTempScopeItem, "enabled", true);
179+ tryCompare(dashTempScopeItem, "visible", false);
199−// // Go back
181+ // Original list is still on 0
200−// var scopesOverviewTempScopeItemHeader = findChild(scopesOverviewTempScopeItem, "scopePageHeader");
182+ var dashContentList = findChild(dash, "dashContentList");
201−// var backButton = findChild(findChild(scopesOverviewTempScopeItemHeader, "innerPageHeader"), "backButton");
183+ compare(dashContentList.currentIndex, 0);
202−// mouseClick(backButton, 0, 0);
184+ }
204−// // Check temp scope is gone
186+ function test_manage_dash_search_temp_scope() {
205−// var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
206−// tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope == null; }, true);
207−// tryCompare(scopesOverviewTempScopeItem, "enabled", false);
210−// var scopesOverviewDoneButton = findChild(scopesOverview, "scopesOverviewDoneButton");
211−// mouseClick(scopesOverviewDoneButton, 0, 0);
213−// // Check the dash overview is gone
214−// tryCompare(overviewController, "progress", 0);
216−// // Original list is still on 0
217−// var dashContentList = findChild(dash, "dashContentList");
218−// compare(dashContentList.currentIndex, 0);
221−// function test_temp_scope_dash_overview_all_search_temp_scope_favorite_from_all() {
222−// // Swipe right to Apps scope
223−// var dashContentList = findChild(dash, "dashContentList");
224−// touchFlick(dash, dash.width - 1, units.gu(1), dash.width - units.gu(10), units.gu(1));
225−// tryCompare(dashContentList, "contentX", dashContentList.width);
226−// tryCompare(dashContentList, "currentIndex", 1);
228−// // Click on card that opens temp scope
229−// var categoryListView = findChild(dashContentList.currentItem, "categoryListView");
230−// var dashCategory2 = findChild(categoryListView, "dashCategory2");
231−// tryCompareFunction(function() {
232−// if (dashCategory2.y < 200) return true;
233−// categoryListView.contentY += 100;
236−// var card2 = findChild(dashCategory2, "delegate2");
237−// waitForRendering(card2);
238−// mouseClick(card2, card2.width / 2, card2.height / 2);
240−// // Wait for temp scope to be there
241−// var dashTempScopeItem = findChild(dash, "dashTempScopeItem");
242−// tryCompare(dashTempScopeItem, "x", 0);
244−// // Show the overview
187+ // Show the manage dash
245−// touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
188+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
246−// var overviewController = findInvisibleChild(dash, "overviewController");
189+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
247−// tryCompare(overviewController, "progress", 1);
190+ tryCompare(bottomEdgeController, "progress", 1);
249−// // Make sure tab is where it should
250−// var scopesOverview = findChild(dash, "scopesOverview");
251−// compare(scopesOverview.currentTab, 1);
253−// // Do a search
192+ // Do a search
254−// var scopesOverviewPageHeader = findChild(scopesOverview, "scopesOverviewPageHeader");
193+ var scopesList = findChild(dash, "scopesList");
194+ var scopesListPageHeader = findChild(scopesList, "pageHeader");
255−// var searchButton = findChild(scopesOverviewPageHeader, "search_header_button");
195+ var searchButton = findChild(scopesListPageHeader, "search_header_button");
256−// mouseClick(searchButton, 0, 0);
196+ mouseClick(searchButton, 0, 0);
258−// // Type something
198+ // Type something
259−// keyClick(Qt.Key_H);
199+ keyClick(Qt.Key_H);
261−// // Check results grid is there and the other lists are not
201+ // Click on a temp scope in the search
262−// var searchResultsViewer = findChild(scopesOverview, "searchResultsViewer");
202+ tryCompareFunction( function() { return findChild(scopesList, "scopesListCategorysearchA") != null; }, true);
263−// var scopesOverviewRepeater = findChild(dash, "scopesOverviewRepeater");
264−// tryCompare(searchResultsViewer, "opacity", 1);
265−// tryCompare(scopesOverviewRepeater, "count", 0);
267−// // Click on a temp scope in the search
268−// var dashCategorysearchA = findChild(searchResultsViewer, "dashCategorysearchA");
203+ var dashCategorysearchA = findChild(scopesList, "scopesListCategorysearchA");
269−// var cardTempScope = findChild(dashCategorysearchA, "delegate2");
204+ tryCompareFunction( function() { return findChild(dashCategorysearchA, "delegate2") != null; }, true);
270−// verify(cardTempScope, "Could not find delegate2");
205+ var cardTempScope = findChild(dashCategorysearchA, "delegate2");
272−// waitForRendering(cardTempScope);
207+ waitForRendering(cardTempScope);
273−// mouseClick(cardTempScope, cardTempScope.width / 2, cardTempScope.height / 2);
208+ mouseClick(cardTempScope, cardTempScope.width / 2, cardTempScope.height / 2);
275−// // Check the bottom edge (overview) is disabled from temp scope
210+ // Check the bottom edge (overview) is disabled from temp scope
276−// var overviewDragHandle = findChild(dash, "overviewDragHandle");
211+ var overviewDragHandle = findChild(dash, "overviewDragHandle");
277−// compare(overviewDragHandle.enabled, false);
212+ compare(overviewDragHandle.enabled, false);
279−// // Check temp scope is there
214+ // Check temp scope is there
280−// var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
215+ var dashTempScopeItem = findChild(dash, "dashTempScopeItem");
281−// tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope != null; }, true);
216+ tryCompare(dashTempScopeItem, "x", 0);
282−// tryCompare(scopesOverviewTempScopeItem, "enabled", true);
217+ tryCompare(dashTempScopeItem, "visible", true);
219+ // Check the manage dash is gone
220+ tryCompare(bottomEdgeController, "progress", 0);
284−// // Go back
222+ // Go back
285−// var scopesOverviewTempScopeItemHeader = findChild(scopesOverviewTempScopeItem, "scopePageHeader");
223+ var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
286−// var backButton = findChild(findChild(scopesOverviewTempScopeItemHeader, "innerPageHeader"), "backButton");
224+ var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "backButton");
287−// mouseClick(backButton, 0, 0);
225+ mouseClick(backButton, 0, 0);
289−// // Check temp scope is gone
227+ // Check temp scope is gone
290−// var scopesOverviewTempScopeItem = findChild(dash, "scopesOverviewTempScopeItem");
228+ tryCompare(dashTempScopeItem, "x", dash.width);
291−// tryCompareFunction( function() { return scopesOverviewTempScopeItem.scope == null; }, true);
229+ tryCompare(dashTempScopeItem, "visible", false);
292−// tryCompare(scopesOverviewTempScopeItem, "enabled", false);
230+
293−//
231+ // Original list is still on 0
294−// // Press on a favorite
232+ var dashContentList = findChild(dash, "dashContentList");
295−// var dashCategorysearchB = findChild(searchResultsViewer, "dashCategorysearchB");
296−// var cardFavSearch = findChild(dashCategorysearchB, "delegate3");
297−// mouseClick(cardFavSearch, 0, 0);
299−// // Check the dash overview is gone
300−// tryCompare(overviewController, "progress", 0);
302−// // Original list went to the favorite
303−// compare(dashContentList.currentIndex, 0);
233+ compare(dashContentList.currentIndex, 0);
306 function test_setCurrentScope() {
236 function test_setCurrentScope() {
307 var dashContentList = findChild(dash, "dashContentList");
237 var dashContentList = findChild(dash, "dashContentList");