@@ -91,5 +91,36 @@ Item {
91 verify(dashContentList != undefined);
91 verify(dashContentList != undefined);
92 tryCompare(dashContentList, "currentIndex", data.visualIndex);
92 tryCompare(dashContentList, "currentIndex", data.visualIndex);
95+ function test_dash_overview_show_select_same_favorite() {
96+ // Wait for stuff to be loaded
97+ tryCompare(scopes, "loaded", true);
98+ var dashContentList = findChild(dash, "dashContentList");
99+ tryCompare(dashContentList, "count", 6);
100+ var mockScope1Loader = findChild(dash, "MockScope1 loader");
101+ tryCompareFunction(function() { return mockScope1Loader.item != null; }, true);
103+ // Show the overview
104+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, dash.height - units.gu(18));
105+ var overviewController = findInvisibleChild(dash, "overviewController");
106+ tryCompare(overviewController, "progress", 1);
108+ // Make sure tab is where it should
109+ var scopesOverview = findChild(dash, "scopesOverview");
110+ compare(scopesOverview.currentTab, 0);
112+ // Make sure stuff is loaded
113+ var scopesOverviewFavoritesRepeater = findChild(dash, "scopesOverviewFavoritesRepeater");
114+ tryCompare(scopesOverviewFavoritesRepeater, "count", 6);
115+ tryCompareFunction(function() { return scopesOverviewFavoritesRepeater.itemAt(0).item != null; }, true);
116+ waitForRendering(scopesOverviewFavoritesRepeater.itemAt(0).item);
118+ // Click in first item
119+ mouseClick(scopesOverviewFavoritesRepeater.itemAt(0).item, 0, 0);
121+ // Make sure animation went back
122+ tryCompare(overviewController, "progress", 0);
123+ compare(dashContentList.currentIndex, 0);