on xenial help sign in
fix tests
bdd08caMichael Zanetti
qml/Stages/PhoneStage.qml+3−1
@@ -170,7 +170,7 @@ Item {
170 // Mir signals us that the newly started app has gotten focus before it paints something on the screen
170 // Mir signals us that the newly started app has gotten focus before it paints something on the screen
171 // This would result in the old app surface becoming visible for a bit.
171 // This would result in the old app surface becoming visible for a bit.
172 // FIXME: change appManager to only change the focusedApplicationId when the surface is ready to be shown.
172 // FIXME: change appManager to only change the focusedApplicationId when the surface is ready to be shown.
173− interval: 1500
173+ interval: 0// 1500
174 repeat: false
174 repeat: false
175 onTriggered: {
175 onTriggered: {
176 priv.applicationStarting = false;
176 priv.applicationStarting = false;
@@ -279,6 +279,8 @@ Item {
279
279
280 onDraggingChanged: {
280 onDraggingChanged: {
281 if (dragging) {
281 if (dragging) {
282+ // Gesture recognized. Start recording this gesture
283+ gesturePoints = [];
282 return;
284 return;
283 }
285 }
284
286
tests/qmltests/Stages/tst_PhoneStage.qml+13−13
@@ -108,14 +108,14 @@ Item {
108
108
109 function test_enterSpread_data() {
109 function test_enterSpread_data() {
110 return [
110 return [
111− {tag: "<position1 (linear movement)", positionMarker: "positionMarker1", linear: true, offset: -1, endStage: 0, targetStage: 0, newFocusedIndex: 1 },
111+ {tag: "<position1 (linear movement)", positionMarker: "positionMarker1", linear: true, offset: -1, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
112− {tag: "<position1 (non-linear movement)", positionMarker: "positionMarker1", linear: false, offset: -1, endStage: 0, targetStage: 0, newFocusedIndex: 0 },
112+ {tag: "<position1 (non-linear movement)", positionMarker: "positionMarker1", linear: false, offset: -1, endPhase: 0, targetPhase: 0, newFocusedIndex: 0 },
113− {tag: ">position1", positionMarker: "positionMarker1", linear: true, offset: +1, endStage: 0, targetStage: 0, newFocusedIndex: 1 },
113+ {tag: ">position1", positionMarker: "positionMarker1", linear: true, offset: +1, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
114− {tag: "<position2 (linear)", positionMarker: "positionMarker2", linear: true, offset: -1, endStage: 0, targetStage: 0, newFocusedIndex: 1 },
114+ {tag: "<position2 (linear)", positionMarker: "positionMarker2", linear: true, offset: -1, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
115− {tag: "<position2 (non-linear)", positionMarker: "positionMarker2", linear: false, offset: -1, endStage: 0, targetStage: 0, newFocusedIndex: 1 },
115+ {tag: "<position2 (non-linear)", positionMarker: "positionMarker2", linear: false, offset: -1, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
116− {tag: ">position2", positionMarker: "positionMarker2", linear: true, offset: +1, endStage: 1, targetStage: 0, newFocusedIndex: 1 },
116+ {tag: ">position2", positionMarker: "positionMarker2", linear: true, offset: +1, endPhase: 1, targetPhase: 0, newFocusedIndex: 1 },
117− {tag: "<position3", positionMarker: "positionMarker3", linear: true, offset: -1, endStage: 1, targetStage: 0, newFocusedIndex: 1 },
117+ {tag: "<position3", positionMarker: "positionMarker3", linear: true, offset: -1, endPhase: 1, targetPhase: 0, newFocusedIndex: 1 },
118− {tag: ">position3", positionMarker: "positionMarker3", linear: true, offset: +1, endStage: 2, targetStage: 2, newFocusedIndex: 2 },
118+ {tag: ">position3", positionMarker: "positionMarker3", linear: true, offset: +1, endPhase: 2, targetPhase: 2, newFocusedIndex: 2 },
119 ];
119 ];
120 }
120 }
121
121
@@ -135,7 +135,7 @@ Item {
135 touchFlick(phoneStage, startX, startY, endX, endY,
135 touchFlick(phoneStage, startX, startY, endX, endY,
136 true /* beginTouch */, false /* endTouch */, units.gu(10), 50);
136 true /* beginTouch */, false /* endTouch */, units.gu(10), 50);
137
137
138− tryCompare(spreadView, "stage", data.endStage)
138+ tryCompare(spreadView, "phase", data.endPhase)
139
139
140 if (!data.linear) {
140 if (!data.linear) {
141 touchFlick(phoneStage, endX, endY, endX + units.gu(.5), endY,
141 touchFlick(phoneStage, endX, endY, endX + units.gu(.5), endY,
@@ -146,9 +146,9 @@ Item {
146
146
147 touchRelease(phoneStage, endX, endY);
147 touchRelease(phoneStage, endX, endY);
148
148
149− tryCompare(spreadView, "stage", data.targetStage)
149+ tryCompare(spreadView, "phase", data.targetPhase)
150
150
151− if (data.targetStage == 2) {
151+ if (data.targetPhase == 2) {
152 var app2 = findChild(spreadView, "appDelegate2");
152 var app2 = findChild(spreadView, "appDelegate2");
153 mouseClick(app2, units.gu(1), units.gu(1));
153 mouseClick(app2, units.gu(1), units.gu(1));
154 }
154 }
@@ -183,7 +183,7 @@ Item {
183 touchFlick(phoneStage, startX, startY, endX, endY,
183 touchFlick(phoneStage, startX, startY, endX, endY,
184 true /* beginTouch */, true /* endTouch */, units.gu(10), 50);
184 true /* beginTouch */, true /* endTouch */, units.gu(10), 50);
185
185
186− tryCompare(spreadView, "stage", 2);
186+ tryCompare(spreadView, "phase", 2);
187
187
188 var tile = findChild(spreadView, "appDelegate" + data.index);
188 var tile = findChild(spreadView, "appDelegate" + data.index);
189 var appId = ApplicationManager.get(data.index).appId;
189 var appId = ApplicationManager.get(data.index).appId;
@@ -199,7 +199,7 @@ Item {
199 console.log("clicking app", data.index, "(", appId, ")")
199 console.log("clicking app", data.index, "(", appId, ")")
200 mouseClick(spreadView, tile.mapToItem(spreadView).x + units.gu(1), spreadView.height / 2)
200 mouseClick(spreadView, tile.mapToItem(spreadView).x + units.gu(1), spreadView.height / 2)
201 tryCompare(ApplicationManager, "focusedApplicationId", appId);
201 tryCompare(ApplicationManager, "focusedApplicationId", appId);
202− tryCompare(spreadView, "stage", 0);
202+ tryCompare(spreadView, "phase", 0);
203 }
203 }
204
204
205 function test_animateAppStartup() {
205 function test_animateAppStartup() {