@@ -43,9 +43,6 @@ Item {
4343 id: dashContent
4444 anchors.fill: parent
4545
46− model: SortFilterProxyModel {
47− model: scopesModel
48− }
4946 scopes : scopesModel
5047 }
5148
@@ -73,7 +70,7 @@ Item {
7370 function loadScopes() {
7471 scopeLoadedSpy.clear();
7572 scopesModel.load();
76− tryCompare(scopeLoadedSpy, "count", 10);
73+ tryCompare(scopeLoadedSpy, "count", 6);
7774 }
7875
7976 function init() {
@@ -117,7 +114,7 @@ Item {
117114
118115 loadScopes();
119116
120− compare(dashContentList.count, 10);
117+ compare(dashContentList.count, 6);
121118 verify(dashContentList.currentIndex >= 0 && dashContentList.currentIndex < dashContentList.count);
122119 }
123120
@@ -193,9 +190,9 @@ Item {
193190 function test_scope_mapping_data() {
194191 return [
195192 {tag: "index0", index: 0, objectName: "MockScope1"},
196− {tag: "index1", index: 1, objectName: "MockScope2"},
197− {tag: "index2", index: 2, objectName: "clickscope"},
198− {tag: "index3", index: 3, objectName: "MockScope5"}
193+ {tag: "index1", index: 1, objectName: "clickscope"},
194+ {tag: "index2", index: 2, objectName: "MockScope5"},
195+ {tag: "index3", index: 3, objectName: "SingleCategoryScope"}
199196 ]
200197 }
201198
@@ -269,117 +266,119 @@ Item {
269266 verify(carouselLV.tileWidth / carouselLV.tileHeight == cardTool.components["art"]["aspect-ratio"]);
270267 }
271268
272− function test_departments() {
273− var dashDepartments = findChild(dashContent, "dashDepartments");
274− compare(dashDepartments.visible, true);
275− compare(dashDepartments.showList, false);
276− waitForRendering(dashDepartments);
277− mouseClick(dashDepartments, 0, 0);
278− compare(dashDepartments.showList, true);
279−
280− var departmentListView = findChild(dashDepartments, "departmentListView");
281− compare(departmentListView.count, 1);
282− tryCompare(departmentListView.currentItem.department, "loaded", true);
283−
284− waitForRendering(departmentListView);
285− waitForRendering(departmentListView.currentItem);
286−
287− var allButton = findChild(dashDepartments, "allButton");
269+ function test_navigations() {
270+ var dashContentList = findChild(dashContent, "dashContentList");
271+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
272+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
273+ tryCompare(dashNavigation, "visible", true);
274+ compare(dashNavigation.showList, false);
275+ waitForRendering(dashNavigation);
276+ mouseClick(dashNavigation, 0, 0);
277+ compare(dashNavigation.showList, true);
278+
279+ var navigationListView = findChild(dashNavigation, "navigationListView");
280+ compare(navigationListView.count, 1);
281+ tryCompare(navigationListView.currentItem.navigation, "loaded", true);
282+
283+ waitForRendering(navigationListView);
284+ waitForRendering(navigationListView.currentItem);
285+
286+ var allButton = findChild(dashNavigation, "allButton");
288287 compare(allButton.visible, false);
289288
290− var department = findChild(dashDepartments, "department0child3");
291− mouseClick(department, 0, 0);
292− compare(dashDepartments.showList, false);
293− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle3");
294− tryCompare(departmentListView.currentItem.department, "departmentId", "root");
289+ var navigation = findChild(dashNavigation, "navigation0child3");
290+ mouseClick(navigation, 0, 0);
291+ compare(dashNavigation.showList, false);
292+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle3");
293+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
295294
296− mouseClick(dashDepartments, 0, 0);
297− compare(dashDepartments.showList, true);
298− waitForRendering(departmentListView);
299− waitForRendering(departmentListView.currentItem);
295+ mouseClick(dashNavigation, 0, 0);
296+ compare(dashNavigation.showList, true);
297+ waitForRendering(navigationListView);
298+ waitForRendering(navigationListView.currentItem);
300299 compare(allButton.visible, true);
301300
302301 mouseClick(allButton, 0, 0);
303− compare(dashDepartments.showList, false);
304− tryCompare(dashDepartments.currentDepartment, "departmentId", "root");
305− tryCompare(departmentListView.currentItem.department, "departmentId", "root");
306−
307− mouseClick(dashDepartments, 0, 0);
308− compare(dashDepartments.showList, true);
309− waitForRendering(departmentListView);
310− waitForRendering(departmentListView.currentItem);
302+ compare(dashNavigation.showList, false);
303+ tryCompare(dashNavigation.currentNavigation, "navigationId", "root");
304+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
305+
306+ mouseClick(dashNavigation, 0, 0);
307+ compare(dashNavigation.showList, true);
308+ waitForRendering(navigationListView);
309+ waitForRendering(navigationListView.currentItem);
311310 compare(allButton.visible, false);
312311
313− department = findChild(dashDepartments, "department0child2");
314− mouseClick(department, 0, 0);
315− compare(dashDepartments.showList, true);
316− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
317− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
312+ navigation = findChild(dashNavigation, "navigation0child2");
313+ mouseClick(navigation, 0, 0);
314+ compare(dashNavigation.showList, true);
315+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
316+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
318317
319− var departmentList1 = findChild(dashDepartments, "department1");
320− allButton = findChild(departmentList1, "allButton");
321− var backButton = findChild(findChild(departmentList1, "department1"), "backButton");
318+ var navigationList1 = findChild(dashNavigation, "navigation1");
319+ allButton = findChild(navigationList1, "allButton");
320+ var backButton = findChild(findChild(navigationList1, "navigation1"), "backButton");
322321 compare(allButton.visible, true);
323322 compare(backButton.visible, true);
324323
325− tryCompare(departmentListView, "contentX", departmentList1.x);
326− waitForRendering(departmentListView);
324+ tryCompare(navigationListView, "contentX", navigationList1.x);
325+ waitForRendering(navigationListView);
327326 mouseClick(allButton, 0, 0);
328− compare(dashDepartments.showList, false);
329− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
330− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
331−
332− mouseClick(dashDepartments, 0, 0);
333− compare(dashDepartments.showList, true);
334− waitForRendering(departmentListView);
335− waitForRendering(departmentListView.currentItem);
327+ compare(dashNavigation.showList, false);
328+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
329+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
330+
331+ mouseClick(dashNavigation, 0, 0);
332+ compare(dashNavigation.showList, true);
333+ waitForRendering(navigationListView);
334+ waitForRendering(navigationListView.currentItem);
336335 compare(allButton.visible, true);
337336 compare(backButton.visible, true);
338337
339− tryCompare(departmentList1.department, "loaded", true);
340− department = findChild(dashDepartments, "department1child2");
341− mouseClick(department, 0, 0);
342− compare(dashDepartments.showList, false);
343− tryCompare(dashDepartments.currentDepartment, "departmentId", "childmiddle22");
344− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
345−
346− mouseClick(dashDepartments, 0, 0);
347− compare(dashDepartments.showList, true);
348− waitForRendering(departmentListView);
349− waitForRendering(departmentListView.currentItem);
350−
351− tryCompare(departmentList1.department, "loaded", true);
352− department = findChild(dashDepartments, "department1child3");
353− mouseClick(department, 0, 0);
354− compare(dashDepartments.showList, false);
355− tryCompare(dashDepartments.currentDepartment, "departmentId", "childmiddle23");
356− tryCompare(departmentListView.currentItem.department, "departmentId", "middle2");
357−
358− mouseClick(dashDepartments, 0, 0);
359− compare(dashDepartments.showList, true);
360− waitForRendering(departmentListView);
361− waitForRendering(departmentListView.currentItem);
338+ tryCompare(navigationList1.navigation, "loaded", true);
339+ navigation = findChild(dashNavigation, "navigation1child2");
340+ mouseClick(navigation, 0, 0);
341+ compare(dashNavigation.showList, false);
342+ tryCompare(dashNavigation.currentNavigation, "navigationId", "childmiddle22");
343+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
344+
345+ mouseClick(dashNavigation, 0, 0);
346+ compare(dashNavigation.showList, true);
347+ waitForRendering(navigationListView);
348+ waitForRendering(navigationListView.currentItem);
349+
350+ tryCompare(navigationList1.navigation, "loaded", true);
351+ navigation = findChild(dashNavigation, "navigation1child3");
352+ mouseClick(navigation, 0, 0);
353+ compare(dashNavigation.showList, false);
354+ tryCompare(dashNavigation.currentNavigation, "navigationId", "childmiddle23");
355+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle2");
356+
357+ mouseClick(dashNavigation, 0, 0);
358+ compare(dashNavigation.showList, true);
359+ waitForRendering(navigationListView);
360+ waitForRendering(navigationListView.currentItem);
362361 mouseClick(backButton, 0, 0);
363362
364− tryCompare(dashDepartments.currentDepartment, "departmentId", "root");
365− tryCompare(departmentListView.currentItem.department, "departmentId", "root");
366− compare(dashDepartments.showList, true);
367− mouseClick(dashDepartments, 0, 0);
368− compare(dashDepartments.showList, false);
369−
370− mouseClick(dashDepartments, 0, 0);
371− compare(dashDepartments.showList, true);
372− tryCompare(departmentListView.currentItem.department, "loaded", true);
373− department = findChild(dashDepartments, "department0child2");
374− mouseClick(department, 0, 0);
375− compare(dashDepartments.showList, true);
376− departmentList1 = findChild(dashDepartments, "department1");
377− compare(departmentList1.department.loaded, false);
378− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
379− allButton = findChild(departmentList1, "allButton");
380− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
363+ tryCompare(dashNavigation.currentNavigation, "navigationId", "root");
364+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
365+ compare(dashNavigation.showList, true);
366+ mouseClick(dashNavigation, 0, 0);
367+ compare(dashNavigation.showList, false);
368+
369+ mouseClick(dashNavigation, 0, 0);
370+ compare(dashNavigation.showList, true);
371+ tryCompare(navigationListView.currentItem.navigation, "loaded", true);
372+ navigation = findChild(dashNavigation, "navigation0child2");
373+ mouseClick(navigation, 0, 0);
374+ compare(dashNavigation.showList, true);
375+ navigationList1 = findChild(dashNavigation, "navigation1");
376+ compare(navigationList1.navigation.loaded, false);
377+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
378+ allButton = findChild(navigationList1, "allButton");
379+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
381380 mouseClick(allButton, 0, 0);
382− tryCompare(dashDepartments.currentDepartment, "departmentId", "middle2");
381+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
383382 }
384383
385384 function test_searchHint() {