@@ -137,7 +137,19 @@ Row {
137137 sessionSpy.target = findChild(shell, "greeter")
138138 dashCommunicatorSpy.target = findInvisibleChild(shell, "dashCommunicator");
139139
140− launcherShowDashHomeSpy.target = findChild(shell, "launcher");
140+ var launcher = findChild(shell, "launcher");
141+ launcherShowDashHomeSpy.target = launcher;
142+
143+ // For some reason, grabbing touches cause MouseArea.mouseX and mouseY
144+ // to contain wrong info during test runs, which then makes tests fail.
145+ // Therefore we have to avoid grabbing touches to work around this bug
146+ // (still to be further investigated and reported).
147+ //
148+ // Make the left-edge drag area immediately recognize touches that land on it
149+ // thus avoing the DirectionalDragArea from grabbing the touch later on.
150+ var launcherDragArea = findChild(launcher, "launcherDragArea");
151+ launcherDragArea.distanceThreshold = 0
152+ launcherDragArea.compositionTime = 0
141153 }
142154
143155 function cleanup() {
@@ -413,8 +425,7 @@ Row {
413425 touchFlick(launcherPanel, touchStartX, touchStartY, touchStartX, 0);
414426 tryCompare(launcherPanel, "moving", false);
415427
416− // NB tapping (i.e., using touch events) doesn't activate the icon... go figure...
417− mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2);
428+ tap(appIcon, appIcon.width / 2, appIcon.height / 2);
418429 }
419430
420431 function showIndicators() {