From 016d3992e81fc351c13f9e747fa5798dc176e6c2 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Fri, 4 Aug 2017 14:49:11 +0200 Subject: Fix MapFlick::test_flick_diagonal autotest init() is currently setting zoomLevel to 0. This prevents the map from flicking diagonally as there's no room for that when the map is fully visible vertically. This test is currently passing in CI for unclear reasons, but it's failing locally. Change-Id: I0bb7c703a6cd2d4b5f440ce629c3933cf41268f6 Reviewed-by: Alex Blasche --- tests/auto/declarative_ui/tst_map_flick.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/auto/declarative_ui/tst_map_flick.qml b/tests/auto/declarative_ui/tst_map_flick.qml index 84ffa429..c153411f 100644 --- a/tests/auto/declarative_ui/tst_map_flick.qml +++ b/tests/auto/declarative_ui/tst_map_flick.qml @@ -105,7 +105,7 @@ Item { map.gesture.enabled = true map.gesture.panEnabled = true map.gesture.flickDeceleration = 500 - map.zoomLevel = 0 + map.zoomLevel = 9 // or flicking diagonally won't work map.disableOnPanStartedWithNoGesture = false map.disableOnFlickStartedWithNoGesture = false map.disableOnPanStartedWithDisabled = false @@ -238,12 +238,12 @@ Item { { map.center.latitude = 50 map.center.longitude = 50 - mousePress(page, 2, 2) - var pos; - for (var i = 0; i < 50; i += 5) { + var pos = 5 + mousePress(page, pos, pos) + for (var i = pos; i < 50; i += 5) { + pos = i wait(20) - mouseMove(page, i, i, 0, Qt.LeftButton); - pos = i; + mouseMove(page, pos, pos, 0, Qt.LeftButton); } mouseRelease(page, pos, pos) verify(map.center.latitude > 50) -- cgit v1.2.1