summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-03-22 16:26:34 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-03-22 18:58:24 +0000
commitd9719f06a1e02402d4428aeca9f5a7c226a06f15 (patch)
treee219ab5d724ac40af676eaf4ca47cd2b0fd8dd0f /tests
parent5efc22f0ac23f8894908a7e701a86771909c2efd (diff)
downloadqtlocation-d9719f06a1e02402d4428aeca9f5a7c226a06f15.tar.gz
Fix tst_map_mouse.qml test_basic_press_release not stealing events
With 5af3f07c95e758636090ad4a928fa8e86a7b2dc6, the map gesture area does not get into active state anymore upon mouse release. This behavioral fix causes tst_map_mouse.qml(536) to fail, since clicking somewhere and releasing somewhere else does not activate the gesture area anymore. This patch adds the necessary real-life mouse move in between the two to activate the gesture area, and trigger the tested event stealing. Change-Id: I459a663f9862d0768b17a9ecd71065342917dc10 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_ui/tst_map_mouse.qml7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/declarative_ui/tst_map_mouse.qml b/tests/auto/declarative_ui/tst_map_mouse.qml
index e5294f67..dd98df67 100644
--- a/tests/auto/declarative_ui/tst_map_mouse.qml
+++ b/tests/auto/declarative_ui/tst_map_mouse.qml
@@ -519,20 +519,21 @@ Item {
compare(mouseUpperReleasedSpy.count, 2)
compare(mouseLowerPressedSpy.count, 1)
compare(mouseLowerReleasedSpy.count, 1)
-
- skip("Makes other tests fail due to QTBUG-66534")
compare(mouseOverlapperPressedSpy.count, 0)
+
mousePress(map, 55, 75)
compare(mouseUpperPressedSpy.count, 2)
compare(mouseLowerPressedSpy.count, 1)
compare(mouseOverlapperPressedSpy.count, 1)
compare(mouseOverlapperReleasedSpy.count, 0)
+
+ mouseMove(map, 55, 25)
mouseRelease(map, 55, 25)
compare(mouseUpperPressedSpy.count, 2)
compare(mouseUpperReleasedSpy.count, 2)
compare(mouseLowerPressedSpy.count, 1)
compare(mouseLowerReleasedSpy.count, 1)
- //this should follow the same logic as Flickable
+ //this should follow the same logic as Flickable, after the gesture is detected, the map should steal events.
compare(mouseOverlapperReleasedSpy.count, 0)
}