@@ -26,8 +26,6 @@ Item {
26 width: units.gu(40)
26 width: units.gu(40)
27 height: units.gu(80)
27 height: units.gu(80)
29− property ListModel searchHistory: ListModel {}
31 property var scopeStatus: {
29 property var scopeStatus: {
32 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
30 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
33 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
31 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
@@ -48,6 +46,7 @@ Item {
48 scopes : scopesModel
46 scopes : scopesModel
50 scopeMapper : scopeDelegateMapper
48 scopeMapper : scopeDelegateMapper
49+ searchHistory: ListModel {}
53 ScopeDelegateMapper {
52 ScopeDelegateMapper {
@@ -229,5 +228,19 @@ Item {
229 tryCompare(scopesModel.get(1), "isActive", data.active1);
228 tryCompare(scopesModel.get(1), "isActive", data.active1);
230 tryCompare(scopesModel.get(2), "isActive", data.active2);
229 tryCompare(scopesModel.get(2), "isActive", data.active2);
232+ function test_persistant_search_history() {
233+ dashContent.setCurrentScopeAtIndex(0, true, false);
235+ dashContent.searchHistory.append({"test": "test0"});
236+ dashContent.searchHistory.append({"test": "test1"});
237+ dashContent.searchHistory.append({"test": "test2"});
239+ dashContent.setCurrentScopeAtIndex(0, true, false);
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.");