@@ -400,6 +400,101 @@ Item {
400 tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
400 tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
403+ function goToSecondLevel() {
404+ var dashContentList = findChild(dashContent, "dashContentList");
405+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
406+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
407+ var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
408+ var searchButton = findChild(dashContentList.currentItem, "search_header_button");
409+ var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
410+ compare(peExtraPanel.visible, false);
411+ mouseClick(searchButton);
412+ tryCompare(peExtraPanel, "visible", true);
414+ var navigationListView = findChild(dashNavigation, "navigationListView");
415+ tryCompareFunction(function() {
416+ return navigationListView.currentItem &&
417+ navigationListView.currentItem.navigation &&
418+ navigationListView.currentItem.navigation.loaded; }, true);
419+ waitForRendering(navigationListView);
420+ waitForRendering(navigationListView.currentItem);
422+ var navigation4 = findChild(dashNavigation, "navigation0child4");
423+ mouseClick(navigation4);
424+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle4");
425+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle4");
426+ tryCompare(dashNavigation.currentNavigation, "loaded", true);
428+ waitForRendering(navigationListView);
429+ waitForRendering(navigationListView.currentItem);
431+ var navigation44 = findChild(dashNavigation, "navigation1child4");
432+ mouseClick(navigation44);
433+ tryCompare(dashNavigation.currentNavigation, "navigationId", "childmiddle44");
434+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "childmiddle44");
435+ tryCompare(dashNavigation.currentNavigation, "loaded", true);
437+ waitForRendering(navigationListView);
438+ waitForRendering(navigationListView.currentItem);
440+ // header 0 is hidden
441+ var header0 = findChild(dashNavigation, "dashNavigationHeader0");
442+ compare(header0.height, 0);
445+ function test_navigationSecondLevelToRoot() {
448+ var dashContentList = findChild(dashContent, "dashContentList");
449+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
450+ var navigationListView = findChild(dashNavigation, "navigationListView");
451+ var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
453+ // Go directly to the root pressing the back button of header1
454+ var header1 = findChild(dashNavigation, "dashNavigationHeader1");
455+ compare(header1.backVisible, true);
456+ mouseClick(findChild(header1, "backButton"));
458+ tryCompare(dashNavigation.currentNavigation, "navigationId", "root");
459+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "root");
460+ compare(peExtraPanel.visible, true);
463+ function test_navigationSecondLevelToFirstName() {
466+ var dashContentList = findChild(dashContent, "dashContentList");
467+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
468+ var navigationListView = findChild(dashNavigation, "navigationListView");
469+ var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
471+ // Go directly to the first pressing the header1
472+ var header1 = findChild(dashNavigation, "dashNavigationHeader1");
473+ mouseClick(header1);
475+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle4");
476+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle4");
477+ compare(peExtraPanel.visible, false);
480+ function test_navigationSecondLevelToFirstBack() {
483+ var dashContentList = findChild(dashContent, "dashContentList");
484+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
485+ var navigationListView = findChild(dashNavigation, "navigationListView");
486+ var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
488+ // Go back to the first level pressing the back button of header2
489+ var header2 = findChild(dashNavigation, "dashNavigationHeader2");
490+ compare(header2.backVisible, true);
491+ mouseClick(findChild(header2, "backButton"));
493+ tryCompare(dashNavigation.currentNavigation, "navigationId", "middle4");
494+ tryCompare(navigationListView.currentItem.navigation, "navigationId", "middle4");
495+ compare(peExtraPanel.visible, true);
403 function test_searchHint() {
498 function test_searchHint() {
404 var dashContentList = findChild(dashContent, "dashContentList");
499 var dashContentList = findChild(dashContent, "dashContentList");
405 verify(dashContentList !== null);
500 verify(dashContentList !== null);