@@ -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
@@ -286,5 +290,30 @@ Item {
286290 currentScope.setSearchInProgress(false);
287291 tryCompare(processingIndicator, "visible", false);
288292 }
293+
294+ function test_manage_dash_store_no_favorites() {
295+ // Show the manage dash
296+ touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
297+ var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
298+ tryCompare(bottomEdgeController, "progress", 1);
299+
300+ // clear the favorite scopes
301+ scopes.clearFavorites();
302+ var dashContentList = findChild(dash, "dashContentList");
303+ tryCompare(dashContentList, "count", 0);
304+
305+ var scopesList = findChild(dash, "scopesList");
306+ spy.target = scopesList.scope;
307+ spy.signalName = "performQuery";
308+
309+ // Do a search
310+ var scopesListPageHeader = findChild(scopesList, "pageHeader");
311+ var searchButton = findChild(scopesListPageHeader, "store_header_button");
312+ mouseClick(searchButton, 0, 0);
313+
314+ spy.wait();
315+ compare(spy.signalArguments[0][0], "scope://com.canonical.scopes.clickstore");
316+ tryCompare(bottomEdgeController, "progress", 0);
317+ }
289318 }
290319}