@@ -43,9 +43,6 @@ Item {
43 id: dashContent
43 id: dashContent
44 anchors.fill: parent
44 anchors.fill: parent
46− model: SortFilterProxyModel {
49 scopes : scopesModel
46 scopes : scopesModel
@@ -73,7 +70,7 @@ Item {
73 function loadScopes() {
70 function loadScopes() {
74 scopeLoadedSpy.clear();
71 scopeLoadedSpy.clear();
75 scopesModel.load();
72 scopesModel.load();
76− tryCompare(scopeLoadedSpy, "count", 10);
73+ tryCompare(scopeLoadedSpy, "count", 6);
79 function init() {
76 function init() {
@@ -117,7 +114,7 @@ Item {
118 loadScopes();
115 loadScopes();
120− compare(dashContentList.count, 10);
117+ compare(dashContentList.count, 6);
121 verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count);
118 verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count);
@@ -193,9 +190,9 @@ Item {
193 function test_scope_mapping_data() {
190 function test_scope_mapping_data() {
195 {tag: "index0", index: 0, objectName: "MockScope1"},
192 {tag: "index0", index: 0, objectName: "MockScope1"},
196− {tag: "index1", index: 1, objectName: "MockScope2"},
193+ {tag: "index1", index: 1, objectName: "clickscope"},
197− {tag: "index2", index: 2, objectName: "clickscope"},
194+ {tag: "index2", index: 2, objectName: "MockScope5"},
198− {tag: "index3", index: 3, objectName: "MockScope5"}
195+ {tag: "index3", index: 3, objectName: "SingleCategoryScope"}
@@ -269,117 +266,119 @@ Item {
269 verify(carouselLV.tileWidth / carouselLV.tileHeight == cardTool.components["art"]["aspect-ratio"]);
266 verify(carouselLV.tileWidth / carouselLV.tileHeight == cardTool.components["art"]["aspect-ratio"]);
272− function test_departments() {
269+ function test_navigations() {
273− var dashDepartments = findChild(dashContent, "dashDepartments");
270+ var dashContentList = findChild(dashContent, "dashContentList");
274− compare(dashDepartments.visible, true);
271+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
272+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
273+ tryCompare(dashNavigation, "visible", true);
275− compare(dashDepartments.showList, false);
274+ compare(dashNavigation.showList, false);
276− waitForRendering(dashDepartments);
275+ waitForRendering(dashNavigation);
277− mouseClick(dashDepartments, 0, 0);
276+ mouseClick(dashNavigation, 0, 0);
278− compare(dashDepartments.showList, true);
277+ compare(dashNavigation.showList, true);
280− var departmentListView = findChild(dashDepartments, "departmentListView");
279+ var navigationListView = findChild(dashNavigation, "navigationListView");
281− compare(departmentListView.count, 1);
280+ compare(navigationListView.count, 1);
282− tryCompare(departmentListView.currentItem.department, "loaded", true);
281+ tryCompare(navigationListView.currentItem.navigation, "loaded", true);
284− waitForRendering(departmentListView);
283+ waitForRendering(navigationListView);
285− waitForRendering(departmentListView.currentItem);
284+ waitForRendering(navigationListView.currentItem);
287− var allButton = findChild(dashDepartments, "allButton");
286+ var allButton = findChild(dashNavigation, "allButton");
288 compare(allButton.visible, false);
287 compare(allButton.visible, false);
290− var department = findChild(dashDepartments, "department0child3");
289+ var navigation = findChild(dashNavigation, "navigation0child3");
291− mouseClick(department, 0, 0);
290+ mouseClick(navigation, 0, 0);
292− compare(dashDepartments.showList, false);
291+ compare(dashNavigation.showList, false);
293− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle3");
292+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle3");
294− tryCompare(departmentListView.currentItem.department, "departmentId", "root");
293+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
296− mouseClick(dashDepartments, 0, 0);
295+ mouseClick(dashNavigation, 0, 0);
297− compare(dashDepartments.showList, true);
296+ compare(dashNavigation.showList, true);
298− waitForRendering(departmentListView);
297+ waitForRendering(navigationListView);
299− waitForRendering(departmentListView.currentItem);
298+ waitForRendering(navigationListView.currentItem);
300 compare(allButton.visible, true);
299 compare(allButton.visible, true);
302 mouseClick(allButton, 0, 0);
301 mouseClick(allButton, 0, 0);
303− compare(dashDepartments.showList, false);
302+ compare(dashNavigation.showList, false);
304− tryCompare(dashDepartments.currentDepartment, "departmentId", "root");
303+ tryCompare(dashNavigation.currentNavigation, "navigationId", "root");
305− tryCompare(departmentListView.currentItem.department, "departmentId", "root");
304+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
307− mouseClick(dashDepartments, 0, 0);
306+ mouseClick(dashNavigation, 0, 0);
308− compare(dashDepartments.showList, true);
307+ compare(dashNavigation.showList, true);
309− waitForRendering(departmentListView);
308+ waitForRendering(navigationListView);
310− waitForRendering(departmentListView.currentItem);
309+ waitForRendering(navigationListView.currentItem);
311 compare(allButton.visible, false);
310 compare(allButton.visible, false);
313− department = findChild(dashDepartments, "department0child2");
312+ navigation = findChild(dashNavigation, "navigation0child2");
314− mouseClick(department, 0, 0);
313+ mouseClick(navigation, 0, 0);
315− compare(dashDepartments.showList, true);
314+ compare(dashNavigation.showList, true);
316− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
315+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
317− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
316+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
319− var departmentList1 = findChild(dashDepartments, "department1");
318+ var navigationList1 = findChild(dashNavigation, "navigation1");
320− allButton = findChild(departmentList1, "allButton");
319+ allButton = findChild(navigationList1, "allButton");
321− var backButton = findChild(findChild(departmentList1, "department1"), "backButton");
320+ var backButton = findChild(findChild(navigationList1, "navigation1"), "backButton");
322 compare(allButton.visible, true);
321 compare(allButton.visible, true);
323 compare(backButton.visible, true);
322 compare(backButton.visible, true);
325− tryCompare(departmentListView, "contentX", departmentList1.x);
324+ tryCompare(navigationListView, "contentX", navigationList1.x);
326− waitForRendering(departmentListView);
325+ waitForRendering(navigationListView);
327 mouseClick(allButton, 0, 0);
326 mouseClick(allButton, 0, 0);
328− compare(dashDepartments.showList, false);
327+ compare(dashNavigation.showList, false);
329− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
328+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
330− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
329+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
332− mouseClick(dashDepartments, 0, 0);
331+ mouseClick(dashNavigation, 0, 0);
333− compare(dashDepartments.showList, true);
332+ compare(dashNavigation.showList, true);
334− waitForRendering(departmentListView);
333+ waitForRendering(navigationListView);
335− waitForRendering(departmentListView.currentItem);
334+ waitForRendering(navigationListView.currentItem);
336 compare(allButton.visible, true);
335 compare(allButton.visible, true);
337 compare(backButton.visible, true);
336 compare(backButton.visible, true);
339− tryCompare(departmentList1.department, "loaded", true);
338+ tryCompare(navigationList1.navigation, "loaded", true);
340− department = findChild(dashDepartments, "department1child2");
339+ navigation = findChild(dashNavigation, "navigation1child2");
341− mouseClick(department, 0, 0);
340+ mouseClick(navigation, 0, 0);
342− compare(dashDepartments.showList, false);
341+ compare(dashNavigation.showList, false);
343− tryCompare(dashDepartments.currentDepartment, "departmentId", "childmiddle22");
342+ tryCompare(dashNavigation.currentNavigation, "navigationId", "childmiddle22");
344− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
343+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
346− mouseClick(dashDepartments, 0, 0);
345+ mouseClick(dashNavigation, 0, 0);
347− compare(dashDepartments.showList, true);
346+ compare(dashNavigation.showList, true);
348− waitForRendering(departmentListView);
347+ waitForRendering(navigationListView);
349− waitForRendering(departmentListView.currentItem);
348+ waitForRendering(navigationListView.currentItem);
351− tryCompare(departmentList1.department, "loaded", true);
350+ tryCompare(navigationList1.navigation, "loaded", true);
352− department = findChild(dashDepartments, "department1child3");
351+ navigation = findChild(dashNavigation, "navigation1child3");
353− mouseClick(department, 0, 0);
352+ mouseClick(navigation, 0, 0);
354− compare(dashDepartments.showList, false);
353+ compare(dashNavigation.showList, false);
355− tryCompare(dashDepartments.currentDepartment, "departmentId", "childmiddle23");
354+ tryCompare(dashNavigation.currentNavigation, "navigationId", "childmiddle23");
356− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
355+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
358− mouseClick(dashDepartments, 0, 0);
357+ mouseClick(dashNavigation, 0, 0);
359− compare(dashDepartments.showList, true);
358+ compare(dashNavigation.showList, true);
360− waitForRendering(departmentListView);
359+ waitForRendering(navigationListView);
361− waitForRendering(departmentListView.currentItem);
360+ waitForRendering(navigationListView.currentItem);
362 mouseClick(backButton, 0, 0);
361 mouseClick(backButton, 0, 0);
364− tryCompare(dashDepartments.currentDepartment, "departmentId", "root");
363+ tryCompare(dashNavigation.currentNavigation, "navigationId", "root");
365− tryCompare(departmentListView.currentItem.department, "departmentId", "root");
364+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
366− compare(dashDepartments.showList, true);
365+ compare(dashNavigation.showList, true);
367− mouseClick(dashDepartments, 0, 0);
366+ mouseClick(dashNavigation, 0, 0);
368− compare(dashDepartments.showList, false);
367+ compare(dashNavigation.showList, false);
370− mouseClick(dashDepartments, 0, 0);
369+ mouseClick(dashNavigation, 0, 0);
371− compare(dashDepartments.showList, true);
370+ compare(dashNavigation.showList, true);
372− tryCompare(departmentListView.currentItem.department, "loaded", true);
371+ tryCompare(navigationListView.currentItem.navigation, "loaded", true);
373− department = findChild(dashDepartments, "department0child2");
372+ navigation = findChild(dashNavigation, "navigation0child2");
374− mouseClick(department, 0, 0);
373+ mouseClick(navigation, 0, 0);
375− compare(dashDepartments.showList, true);
374+ compare(dashNavigation.showList, true);
376− departmentList1 = findChild(dashDepartments, "department1");
375+ navigationList1 = findChild(dashNavigation, "navigation1");
377− compare(departmentList1.department.loaded, false);
376+ compare(navigationList1.navigation.loaded, false);
378− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
377+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
379− allButton = findChild(departmentList1, "allButton");
378+ allButton = findChild(navigationList1, "allButton");
380− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
379+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
381 mouseClick(allButton, 0, 0);
380 mouseClick(allButton, 0, 0);
382− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
381+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");