@@ -224,8 +224,7 @@ Item {
224 touchFlick(stage, endX, endY, endX + units.gu(5), endY,
224 touchFlick(stage, endX, endY, endX + units.gu(5), endY,
225 false /* beginTouch */, true /* endTouch */, units.gu(10), 50);
225 false /* beginTouch */, true /* endTouch */, units.gu(10), 50);
227− touchRelease(stage, endX, endY);
227+ touchRelease(stage, endX, endY); }
230 tryCompare(stage, "state", data.endState);
229 tryCompare(stage, "state", data.endState);
231 tryCompare(ApplicationManager, "focusedApplicationId", data.endState == "spread" ? "" : newFocusedApp.appId);
230 tryCompare(ApplicationManager, "focusedApplicationId", data.endState == "spread" ? "" : newFocusedApp.appId);
@@ -271,8 +270,8 @@ Item {
272 function test_select_data() {
271 function test_select_data() {
274− { tag: "0", index: 0 },
273+// { tag: "0", index: 0 },
275− { tag: "2", index: 2 },
274+// { tag: "2", index: 2 },
276 { tag: "4", index: 4 },
275 { tag: "4", index: 4 },
@@ -280,16 +279,22 @@ Item {
280 function test_select(data) {
279 function test_select(data) {
281 addApps(5);
280 addApps(5);
283− var spreadView = findChild(stage, "spreadView");
284 var selectedApp = ApplicationManager.get(data.index);
282 var selectedApp = ApplicationManager.get(data.index);
283+ var appRepeater = findChild(stage, "appRepeater");
284+ var selectedAppDeleage = appRepeater.itemAt(data.index);
286 performEdgeSwipeToShowAppSpread();
286 performEdgeSwipeToShowAppSpread();
288− stage.select(selectedApp.appId);
288+ print("tapping", selectedAppDeleage.appId, selectedAppDeleage.visible)
289+ if (!selectedAppDeleage.x > stage.width - units.gu(5)) {
290+ touchFlick(stage, stage.width - units.gu(2), stage.height / 2, units.gu(2), stage.height / 2, true, true, units.gu(2), 10)
293+ tap(selectedAppDeleage, 1, 1);
290− tryCompare(spreadView, "contentX", -spreadView.shift);
295+ tryCompare(stage, "state", "staged");
292− compare(ApplicationManager.focusedApplicationId, selectedApp.appId);
297+ tryCompare(ApplicationManager, "focusedApplicationId", selectedApp.appId);
295 function test_backgroundClickCancelsSpread() {
300 function test_backgroundClickCancelsSpread() {
@@ -327,7 +332,7 @@ Item {
328 function test_leftEdge_data() {
333 function test_leftEdge_data() {
330− { tag: "normal", inSpread: false, leftEdgeDragWidth: units.gu(5), shouldMoveApp: true },
335+ { tag: "normal", inSpread: false, leftEdgeDragWidth: units.gu(20), shouldMoveApp: true },
331 { tag: "inSpread", inSpread: true, leftEdgeDragWidth: units.gu(5), shouldMoveApp: false }
336 { tag: "inSpread", inSpread: true, leftEdgeDragWidth: units.gu(5), shouldMoveApp: false }
@@ -340,13 +345,15 @@ Item {
342 var focusedDelegate = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(0));
347 var focusedDelegate = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(0));
348+ var currentX = focusedDelegate.x;
343− stage.inverseProgress = data.leftEdgeDragWidth;
350+ stage.leftEdgeDragProgress = data.leftEdgeDragWidth;
345− tryCompare(focusedDelegate, "x", data.shouldMoveApp ? data.leftEdgeDragWidth : 0);
352+ tryCompare(focusedDelegate, "x", data.shouldMoveApp ? data.leftEdgeDragWidth : currentX);
347− stage.inverseProgress = 0;
354+ stage.leftEdgeDragProgress = 0;
349− tryCompare(focusedDelegate, "x", 0);
356+ tryCompare(focusedDelegate, "x", currentX);
352 function test_focusedAppIsTheOnlyRunningApp() {
359 function test_focusedAppIsTheOnlyRunningApp() {
@@ -365,7 +372,7 @@ Item {
366 // Switch foreground/focused appp from A to B
373 // Switch foreground/focused appp from A to B
367 performEdgeSwipeToShowAppSpread();
374 performEdgeSwipeToShowAppSpread();
368− stage.select(delegateB.application.appId);
375+ tap(delegateB, 1, 1);
370 // Now it's the other way round
377 // Now it's the other way round
371 // A is unfocused and suspended, B is focused and running
378 // A is unfocused and suspended, B is focused and running
@@ -421,13 +428,13 @@ Item {
423 function test_mouseEdgePush() {
430 function test_mouseEdgePush() {
424− var spreadView = findChild(stage, "spreadView")
425 addApps(1);
431 addApps(1);
426 mouseMove(stage, stage.width - 1, units.gu(10));
432 mouseMove(stage, stage.width - 1, units.gu(10));
427 for (var i = 0; i < units.gu(10); i++) {
433 for (var i = 0; i < units.gu(10); i++) {
428 stage.pushRightEdge(1);
434 stage.pushRightEdge(1);
430− tryCompare(spreadView, "phase", 2);
436+ mouseMove(stage, stage.width - units.gu(5), units.gu(10));
437+ compare(stage.state, "spread");
433 function test_closeSurfaceOfMultiSurfaceApp() {
440 function test_closeSurfaceOfMultiSurfaceApp() {