@@ -26,8 +26,6 @@ Item {
2626 width: units.gu(40)
2727 height: units.gu(80)
2828
29− property ListModel searchHistory: ListModel {}
30−
3129 property var scopeStatus: {
3230 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
3331 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
@@ -48,6 +46,7 @@ Item {
4846 scopes : scopesModel
4947
5048 scopeMapper : scopeDelegateMapper
49+ searchHistory: ListModel {}
5150 }
5251
5352 ScopeDelegateMapper {
@@ -229,5 +228,19 @@ Item {
229228 tryCompare(scopesModel.get(1), "isActive", data.active1);
230229 tryCompare(scopesModel.get(2), "isActive", data.active2);
231230 }
231+
232+ function test_persistant_search_history() {
233+ dashContent.setCurrentScopeAtIndex(0, true, false);
234+
235+ dashContent.searchHistory.append({"test": "test0"});
236+ dashContent.searchHistory.append({"test": "test1"});
237+ dashContent.searchHistory.append({"test": "test2"});
238+
239+ dashContent.setCurrentScopeAtIndex(0, true, false);
240+
241+ compare(dashContent.searchHistory.get(0).test, "test0", "First search entry differs.");
242+ compare(dashContent.searchHistory.get(1).test, "test1", "Second search entry differs.");
243+ compare(dashContent.searchHistory.get(2).test, "test2", "Third search entry differs.");
244+ }
232245 }
233246}