diff options
author | Karol Polak <permotion88@o2.pl> | 2017-04-10 21:29:44 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-04-11 19:27:19 +0000 |
commit | b7b8713feacce4155cacd4bdadf78cc17cb0ecd3 (patch) | |
tree | fc17387fe324f1dee428cd15038158e71b3ad59f /tests | |
parent | b6cb170b77318401d559564038e846ddcd46d337 (diff) | |
download | qtlocation-b7b8713feacce4155cacd4bdadf78cc17cb0ecd3.tar.gz |
Add mapReady to test case start conditions
It is reasonable to add mapReady property to the condition
for the start of test cases where it is required that the
map is initialized. This covers the case when one of the
initialization steps runs asynchronously.
Change-Id: I2eff52dbe3a7bec0b2f3fb26d607398829b5c9f2
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative_ui/tst_map.qml | 10 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_coordinateanimation.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_flick.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_item.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_item_details.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_item_fit_viewport.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_itemview.qml | 7 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_keepgrab.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_mouse.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative_ui/tst_map_pinch.qml.QTBUG-47970 | 2 |
10 files changed, 23 insertions, 10 deletions
diff --git a/tests/auto/declarative_ui/tst_map.qml b/tests/auto/declarative_ui/tst_map.qml index 6691580e..846a621f 100644 --- a/tests/auto/declarative_ui/tst_map.qml +++ b/tests/auto/declarative_ui/tst_map.qml @@ -57,6 +57,14 @@ Item { property variant coordinate5: QtPositioning.coordinate(20, 180) property variant invalidCoordinate: QtPositioning.coordinate() property variant altitudelessCoordinate: QtPositioning.coordinate(50, 50) + property bool allMapsReady: mapZoomOnCompleted.mapReady + && mapZoomDefault.mapReady + && mapZoomUserInit.mapReady + && map.mapReady + && mapPar.mapReady + && coordinateMap.mapReady + && mapTiltBearing.mapReady + && mapTiltBearingHere.mapReady Map { id: mapZoomOnCompleted; width: 200; height: 200; zoomLevel: 3; center: coordinate1; plugin: testPlugin; @@ -98,7 +106,7 @@ Item { TestCase { - when: windowShown + when: windowShown && allMapsReady name: "MapProperties" function fuzzy_compare(val, ref) { diff --git a/tests/auto/declarative_ui/tst_map_coordinateanimation.qml b/tests/auto/declarative_ui/tst_map_coordinateanimation.qml index d9b71edd..20477509 100644 --- a/tests/auto/declarative_ui/tst_map_coordinateanimation.qml +++ b/tests/auto/declarative_ui/tst_map_coordinateanimation.qml @@ -79,7 +79,7 @@ Item { } TestCase { - when: windowShown + when: windowShown && map.mapReady name: "CoordinateAnimation" function test_coordinate_animation() { diff --git a/tests/auto/declarative_ui/tst_map_flick.qml b/tests/auto/declarative_ui/tst_map_flick.qml index 8da712b2..84ffa429 100644 --- a/tests/auto/declarative_ui/tst_map_flick.qml +++ b/tests/auto/declarative_ui/tst_map_flick.qml @@ -94,7 +94,7 @@ Item { SignalSpy {id: mouseAreaBottomSpy; target: mouseAreaBottom; signalName: 'onPressed'} TestCase { - when: windowShown + when: windowShown && map.mapReady name: "MapFlick" function init() diff --git a/tests/auto/declarative_ui/tst_map_item.qml b/tests/auto/declarative_ui/tst_map_item.qml index b75daf38..1646fdba 100644 --- a/tests/auto/declarative_ui/tst_map_item.qml +++ b/tests/auto/declarative_ui/tst_map_item.qml @@ -216,7 +216,7 @@ Item { } TestCase { name: "MapItems" - when: windowShown + when: windowShown && map.mapReady function initTestCase() { diff --git a/tests/auto/declarative_ui/tst_map_item_details.qml b/tests/auto/declarative_ui/tst_map_item_details.qml index 0c5f5c0b..80225c16 100644 --- a/tests/auto/declarative_ui/tst_map_item_details.qml +++ b/tests/auto/declarative_ui/tst_map_item_details.qml @@ -278,7 +278,7 @@ Item { TestCase { name: "MapItemDetails" - when: windowShown + when: windowShown && map.mapReady /* diff --git a/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml b/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml index fe4d9e49..adf9c347 100644 --- a/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml +++ b/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml @@ -217,7 +217,7 @@ Item { TestCase { name: "MapItemsFitViewport" - when: windowShown + when: windowShown && map.mapReady function initTestCase() { diff --git a/tests/auto/declarative_ui/tst_map_itemview.qml b/tests/auto/declarative_ui/tst_map_itemview.qml index db788ace..bbd70c8e 100644 --- a/tests/auto/declarative_ui/tst_map_itemview.qml +++ b/tests/auto/declarative_ui/tst_map_itemview.qml @@ -40,6 +40,11 @@ Item { Plugin { id: testPlugin; name : "qmlgeo.test.plugin"; allowExperimental: true } property variant mapDefaultCenter: QtPositioning.coordinate(10, 30) + property bool allMapsReady: map.mapReady + && map3.mapReady + && mapForView.mapReady + && mapForTestingListModel.mapReady + && mapForTestingRouteModel.mapReady Map { id: map @@ -259,7 +264,7 @@ Item { TestCase { name: "MapItem" - when: windowShown + when: windowShown && allMapsReady function clear_data() { mapItemSpy.clear() } diff --git a/tests/auto/declarative_ui/tst_map_keepgrab.qml b/tests/auto/declarative_ui/tst_map_keepgrab.qml index fa47eec8..7690b78d 100644 --- a/tests/auto/declarative_ui/tst_map_keepgrab.qml +++ b/tests/auto/declarative_ui/tst_map_keepgrab.qml @@ -61,7 +61,7 @@ Item { TestCase { - when: windowShown + when: windowShown && map.mapReady name: "MapKeepGrabAndPreventSteal" function initTestCase() diff --git a/tests/auto/declarative_ui/tst_map_mouse.qml b/tests/auto/declarative_ui/tst_map_mouse.qml index 99aff03d..dd9de73a 100644 --- a/tests/auto/declarative_ui/tst_map_mouse.qml +++ b/tests/auto/declarative_ui/tst_map_mouse.qml @@ -161,7 +161,7 @@ Item { TestCase { name: "MouseArea" - when: windowShown + when: windowShown && map.mapReady SignalSpy {id: mouseUpperClickedSpy; target: mouseUpper; signalName: "clicked"} SignalSpy {id: mouseLowerClickedSpy; target: mouseLower; signalName: "clicked"} SignalSpy {id: mouseOverlapperClickedSpy; target: mouseOverlapper; signalName: "clicked"} diff --git a/tests/auto/declarative_ui/tst_map_pinch.qml.QTBUG-47970 b/tests/auto/declarative_ui/tst_map_pinch.qml.QTBUG-47970 index f80e44a1..6d913eab 100644 --- a/tests/auto/declarative_ui/tst_map_pinch.qml.QTBUG-47970 +++ b/tests/auto/declarative_ui/tst_map_pinch.qml.QTBUG-47970 @@ -102,7 +102,7 @@ Item { SignalSpy {id: mouseAreaBottomSpy; target: mouseAreaBottom; signalName: 'onPressed'} TestCase { - when: windowShown + when: windowShown && map.mapReady name: "MapPinch" function init() |