on xenial help sign in
Better
ad55782Albert Astals
tests/qmltests/Dash/tst_DashContent.qml+2−7
@@ -34,12 +34,6 @@ Item {
34 'MockScope5': { 'movementStarted': 0, 'positionedAtBeginning': 0 }
34 'MockScope5': { 'movementStarted': 0, 'positionedAtBeginning': 0 }
35 }
35 }
36
36
37− Item {
38− // make PageHeader happy
39− id: greeter
40− signal shownChanged
41− }
42−
43 Scopes {
37 Scopes {
44 id: scopesModel
38 id: scopesModel
45 }
39 }
@@ -105,6 +99,7 @@ Item {
105 when: windowShown
99 when: windowShown
106
100
107 function init() {
101 function init() {
102+ scopesModel.clear();
108 scopesModel.load();
103 scopesModel.load();
109 }
104 }
110
105
@@ -161,7 +156,7 @@ Item {
161 var dashContentList = findChild(dashContent, "dashContentList");
156 var dashContentList = findChild(dashContent, "dashContentList");
162 verify(dashContentList != undefined);
157 verify(dashContentList != undefined);
163
158
164− tryCompareFunction(function() {return dashContentList.currentItem.item !== null;}, true);
159+ tryCompare(scopeLoadedSpy, "count", 5);
165 dashContent.setCurrentScopeAtIndex(0, true, false);
160 dashContent.setCurrentScopeAtIndex(0, true, false);
166 dashContentList.currentItem.item.endReached();
161 dashContentList.currentItem.item.endReached();
167
162