@@ -195,51 +195,6 @@ Rectangle {
195195 name: "Stage"
196196 when: windowShown
197197
198− /* If you press Stage's right edge it should show the hint that it's possible to
199− switch to the next running application. This means (graphically) sliding the
200− next application window from Stage's right edge for a small part of its width */
201− function test_pressingRightEdgeShowsHint() {
202− redControl.checked = true
203−
204− tryCompare(stage, "usingScreenshots", true) // wait for the animation to start
205− tryCompare(stage, "usingScreenshots", false) // and then for it to end
206− compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "red")
207− compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "red")
208−
209− greenControl.checked = true
210−
211− tryCompare(stage, "usingScreenshots", true) // wait for the animation to start
212− tryCompare(stage, "usingScreenshots", false) // and then for it to end
213− compare(fakeAppManager.mainStageFocusedApplication.desktopFile, "green")
214− compare(fakeAppManager.mainStageApplications.get(0).desktopFile, "green")
215−
216− var draggingAreaCenterX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2)
217− var draggingAreaCenterY = stage.height / 2
218− touchPress(stage, draggingAreaCenterX, draggingAreaCenterY)
219−
220− // wait for the animation to start
221− tryCompare(stage, "usingScreenshots", true)
222−
223− // "red" should be the new/next application being shown
224− compare(newAppScreenshot.application.desktopFile, "red")
225− tryCompareFunction(isShowingABitOfNewApp, true);
226−
227− // "green" should be the current application being shown
228− compare(oldAppScreenshot.application.desktopFile, "green")
229− tryCompareFunction(isCurrentAppFadingOut, true);
230−
231− touchRelease(stage, draggingAreaCenterX, draggingAreaCenterY)
232− }
233−
234− function isShowingABitOfNewApp() {
235− // it should come from the right and take less than half of the screen
236− // but at least 5% of it
237− return newAppScreenshot.x > stage.width/2
238− && newAppScreenshot.x < stage.width*(95/100)
239− && newAppScreenshot.y === 0
240− && newAppScreenshot.visible
241− }
242−
243198 function isCurrentAppFadingOut() {
244199 // it should get a bit translucent and smaller
245200 return oldAppScreenshot.opacity < 0.99
@@ -307,15 +262,17 @@ Rectangle {
307262
308263 var draggingAreaCenterX = stage.width - (stage.rightEdgeDraggingAreaWidth / 2)
309264 var draggingAreaCenterY = stage.height / 2
310− touchPress(stage, draggingAreaCenterX, draggingAreaCenterY)
265+ var finalTouchX = draggingAreaCenterX - units.gu(5)
266+ touchFlick(stage, draggingAreaCenterX, draggingAreaCenterY,
267+ finalTouchX, draggingAreaCenterY,
268+ true /* beginTouch */, false /* endTouch */)
311269
312270 // wait for the animation to start
313271 tryCompare(stage, "usingScreenshots", true)
314272
315273 compare(newAppScreenshot.withBackground, false, "switched app does have background enabled")
316274
317− tryCompareFunction(isShowingABitOfNewApp, true); // wait for the hint animation to finish
318− touchRelease(stage, draggingAreaCenterX, draggingAreaCenterY)
275+ touchRelease(stage, finalTouchX, draggingAreaCenterY)
319276 }
320277 }
321278}