@@ -434,13 +434,52 @@ Item {
434 waitForRendering(navigationListView.currentItem);
434 waitForRendering(navigationListView.currentItem);
435 verify(!backButton.visible, "Back button should not be visible");
435 verify(!backButton.visible, "Back button should not be visible");
437− var navigationList1 = findChild(dashNavigationButton, "navigation1");
438− verify(navigationList1 === null, "There should be no second-level navigation");
437+ compare(navigationListView.count, 1, "There should be no second-level navigation");
440 mouseClick(dashNavigationButton, 0, 0);
439 mouseClick(dashNavigationButton, 0, 0);
441 compare(dashNavigationButton.showList, false);
440 compare(dashNavigationButton.showList, false);
443+ function test_navigationsClosing() {
444+ var dashContentList = findChild(dashContent, "dashContentList");
445+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
446+ var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
447+ tryCompare(dashNavigation, "visible", true);
448+ var dashNavigationButton = findChild(dashContentList.currentItem, "navigationButton");
449+ verify(dashNavigationButton, "Can't find navigation button");
450+ var dashAltNavigationButton = findChild(dashContentList.currentItem, "altNavigationButton");
451+ verify(dashAltNavigationButton, "Can't find alternative navigation button");
453+ waitForRendering(dashNavigationButton);
454+ waitForRendering(dashAltNavigationButton);
456+ compare(dashNavigationButton.showList, false);
457+ compare(dashAltNavigationButton.showList, false);
459+ mouseClick(dashNavigation, 0, 0);
460+ compare(dashNavigationButton.showList, false);
461+ compare(dashAltNavigationButton.showList, true);
463+ var navigationListView = findChild(dashAltNavigationButton, "navigationListView");
464+ tryCompare(navigationListView.currentItem.navigation, "loaded", true);
466+ mouseClick(dashNavigation, dashNavigationButton.x, 0);
467+ compare(dashNavigationButton.showList, false);
468+ compare(dashAltNavigationButton.showList, false);
470+ tryCompare(navigationListView, "visible", false);
472+ mouseClick(dashNavigation, dashNavigationButton.x, 0);
473+ compare(dashNavigationButton.showList, true);
474+ compare(dashAltNavigationButton.showList, false);
476+ navigationListView = findChild(dashNavigationButton, "navigationListView");
477+ tryCompare(navigationListView.currentItem.navigation, "loaded", true);
479+ mouseClick(dashNavigation, 0, 0);
480+ compare(dashNavigationButton.showList, false);
481+ compare(dashAltNavigationButton.showList, false);
445 function test_searchHint() {
484 function test_searchHint() {
446 var dashContentList = findChild(dashContent, "dashContentList");
485 var dashContentList = findChild(dashContent, "dashContentList");