on xenial help sign in
Forgot to rename some variables.
ed9f1a6Pawel Stolowski
tests/qmltests/Dash/qml/FakeScopeView.qml+4−4
@@ -31,13 +31,13 @@ FocusScope {
31 property alias backColor : back.color
31 property alias backColor : back.color
32
32
33 onEndReached: {
33 onEndReached: {
34− if (shell != undefined && shell.scope_status != undefined) {
34+ if (shell != undefined && shell.scopeStatus != undefined) {
35− shell.scope_status[scope.id].endReached++;
35+ shell.scopeStatus[scope.id].endReached++;
36 }
36 }
37 }
37 }
38 onMovementStarted: {
38 onMovementStarted: {
39− if (shell != undefined && shell.scope_status != undefined) {
39+ if (shell != undefined && shell.scopeStatus != undefined) {
40− shell.scope_status[scope.id].movementStarted++;
40+ shell.scopeStatus[scope.id].movementStarted++;
41 }
41 }
42 }
42 }
43 onPositionedAtBeginning: {
43 onPositionedAtBeginning: {
tests/qmltests/Dash/tst_DashContent.qml+24−24
@@ -62,20 +62,20 @@ Item {
62 }
62 }
63
63
64 function clear_scope_status() {
64 function clear_scope_status() {
65− scope_status["MockScope1"].movementStarted = 0;
65+ scopeStatus["MockScope1"].movementStarted = 0;
66− scope_status["MockScope1"].positionedAtBeginning = 0;
66+ scopeStatus["MockScope1"].positionedAtBeginning = 0;
67
67
68− scope_status["MockScope2"].movementStarted = 0;
68+ scopeStatus["MockScope2"].movementStarted = 0;
69− scope_status["MockScope2"].positionedAtBeginning = 0;
69+ scopeStatus["MockScope2"].positionedAtBeginning = 0;
70
70
71− scope_status["MockScope3"].movementStarted = 0;
71+ scopeStatus["MockScope3"].movementStarted = 0;
72− scope_status["MockScope3"].positionedAtBeginning = 0;
72+ scopeStatus["MockScope3"].positionedAtBeginning = 0;
73
73
74− scope_status["MockScope4"].movementStarted = 0;
74+ scopeStatus["MockScope4"].movementStarted = 0;
75− scope_status["MockScope4"].positionedAtBeginning = 0;
75+ scopeStatus["MockScope4"].positionedAtBeginning = 0;
76
76
77− scope_status["MockScope5"].movementStarted = 0;
77+ scopeStatus["MockScope5"].movementStarted = 0;
78− scope_status["MockScope5"].positionedAtBeginning = 0;
78+ scopeStatus["MockScope5"].positionedAtBeginning = 0;
79 }
79 }
80
80
81 SignalSpy {
81 SignalSpy {
@@ -115,7 +115,7 @@ Item {
115 }
115 }
116
116
117 function test_movement_started_signal() {
117 function test_movement_started_signal() {
118− dash_content.setCurrentScopeAtIndex(3, true, false);
118+ dashContent.setCurrentScopeAtIndex(3, true, false);
119
119
120 var dashContentList = findChild(dashContent, "dashContentList");
120 var dashContentList = findChild(dashContent, "dashContentList");
121 verify(dashContentList != undefined)
121 verify(dashContentList != undefined)
@@ -125,24 +125,24 @@ Item {
125 dashContentList.movementStarted();
125 dashContentList.movementStarted();
126
126
127 compare(movementStartedSpy.count, 1, "DashContent should have emitted movementStarted signal when content list did.");
127 compare(movementStartedSpy.count, 1, "DashContent should have emitted movementStarted signal when content list did.");
128− compare(scope_status["MockScope1"].movementStarted, 1, "MockScope1 should have emitted movementStarted signal when content list did.");
128+ compare(scopeStatus["MockScope1"].movementStarted, 1, "MockScope1 should have emitted movementStarted signal when content list did.");
129− compare(scope_status["MockScope2"].movementStarted, 1, "MockScope2 should have emitted movementStarted signal when content list did.");
129+ compare(scopeStatus["MockScope2"].movementStarted, 1, "MockScope2 should have emitted movementStarted signal when content list did.");
130− compare(scope_status["MockScope3"].movementStarted, 1, "MockScope3 should have emitted movementStarted signal when content list did.");
130+ compare(scopeStatus["MockScope3"].movementStarted, 1, "MockScope3 should have emitted movementStarted signal when content list did.");
131− compare(scope_status["MockScope4"].movementStarted, 1, "MockScope4 should have emitted movementStarted signal when content list did.");
131+ compare(scopeStatus["MockScope4"].movementStarted, 1, "MockScope4 should have emitted movementStarted signal when content list did.");
132− compare(scope_status["MockScope5"].movementStarted, 1, "MockScope5 should have emitted movementStarted signal when content list did.");
132+ compare(scopeStatus["MockScope5"].movementStarted, 1, "MockScope5 should have emitted movementStarted signal when content list did.");
133 }
133 }
134
134
135 function test_positioned_at_beginning_signal() {
135 function test_positioned_at_beginning_signal() {
136− dash_content.setCurrentScopeAtIndex(3, true, false);
136+ dashContent.setCurrentScopeAtIndex(3, true, false);
137
137
138 tryCompare(scopeLoadedSpy, "count", 5);
138 tryCompare(scopeLoadedSpy, "count", 5);
139
139
140− dash_content.positionedAtBeginning();
140+ dashContent.positionedAtBeginning();
141− compare(scope_status["MockScope1"].positionedAtBeginning, 1, "MockScope1 should have emitted positionedAtBeginning signal when DashContent did.");
141+ compare(scopeStatus["MockScope1"].positionedAtBeginning, 1, "MockScope1 should have emitted positionedAtBeginning signal when DashContent did.");
142− compare(scope_status["MockScope2"].positionedAtBeginning, 1, "MockScope2 should have emitted positionedAtBeginning signal when DashContent did.");
142+ compare(scopeStatus["MockScope2"].positionedAtBeginning, 1, "MockScope2 should have emitted positionedAtBeginning signal when DashContent did.");
143− compare(scope_status["MockScope3"].positionedAtBeginning, 1, "MockScope3 should have emitted positionedAtBeginning signal when DashContent did.");
143+ compare(scopeStatus["MockScope3"].positionedAtBeginning, 1, "MockScope3 should have emitted positionedAtBeginning signal when DashContent did.");
144− compare(scope_status["MockScope4"].positionedAtBeginning, 1, "MockScope4 should have emitted positionedAtBeginning signal when DashContent did.");
144+ compare(scopeStatus["MockScope4"].positionedAtBeginning, 1, "MockScope4 should have emitted positionedAtBeginning signal when DashContent did.");
145− compare(scope_status["MockScope5"].positionedAtBeginning, 1, "MockScope5 should have emitted positionedAtBeginning signal when DashContent did.");
145+ compare(scopeStatus["MockScope5"].positionedAtBeginning, 1, "MockScope5 should have emitted positionedAtBeginning signal when DashContent did.");
146 }
146 }
147
147
148 function test_scope_loaded() {
148 function test_scope_loaded() {
@@ -154,7 +154,7 @@ Item {
154 verify(dashContentList != undefined);
154 verify(dashContentList != undefined);
155
155
156 tryCompare(scopeLoadedSpy, "count", 5);
156 tryCompare(scopeLoadedSpy, "count", 5);
157− dash_content.setCurrentScopeAtIndex(0, true, false);
157+ dashContent.setCurrentScopeAtIndex(0, true, false);
158 dashContentList.currentItem.item.endReached();
158 dashContentList.currentItem.item.endReached();
159
159
160 compare(contentEndReachedSpy.count, 1);
160 compare(contentEndReachedSpy.count, 1);