@@ -38,6 +38,10 @@ Item {
3838 anchors.fill: parent
3939 }
4040
41+ SignalSpy {
42+ id: spy
43+ }
44+
4145 UT.UnityTestCase {
4246 name: "Dash"
4347 when: windowShown
@@ -262,5 +266,30 @@ Item {
262266 currentScope.setSearchInProgress(false);
263267 tryCompare(processingIndicator, "visible", false);
264268 }
269+
270+ function test_manage_dash_store_no_favorites() {
271+ // Show the manage dash
272+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
273+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
274+ tryCompare(bottomEdgeController, "progress", 1);
275+
276+ // clear the favorite scopes
277+ scopes.clearFavorites();
278+ var dashContentList = findChild(dash, "dashContentList");
279+ tryCompare(dashContentList, "count", 0);
280+
281+ var scopesList = findChild(dash, "scopesList");
282+ spy.target = scopesList.scope;
283+ spy.signalName = "performQuery";
284+
285+ // Do a search
286+ var scopesListPageHeader = findChild(scopesList, "pageHeader");
287+ var searchButton = findChild(scopesListPageHeader, "store_header_button");
288+ mouseClick(searchButton, 0, 0);
289+
290+ spy.wait();
291+ compare(spy.signalArguments[0][0], "scope://com.canonical.scopes.clickstore");
292+ tryCompare(bottomEdgeController, "progress", 0);
293+ }
265294 }
266295}