summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-06-10 14:33:12 +0200
committerLiang Qi <liang.qi@qt.io>2016-06-10 14:33:17 +0200
commitd90b2bffd76bf74ab4b6e6c0c68a26f6830c8d6f (patch)
tree3432628840d9ddb14dae7121d211d7e09bbad215 /tests
parentf46abef02cf5c883deba753afeff0042fa36b6e4 (diff)
parentf1f876b353446ebb271d167482f5e0414f88e10f (diff)
downloadqtlocation-d90b2bffd76bf74ab4b6e6c0c68a26f6830c8d6f.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I36abd2a91a470360c87f23a6d8084f908d93e7e0
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_ui/tst_map_item_details.qml28
1 files changed, 22 insertions, 6 deletions
diff --git a/tests/auto/declarative_ui/tst_map_item_details.qml b/tests/auto/declarative_ui/tst_map_item_details.qml
index ef11ba6c..68e069d4 100644
--- a/tests/auto/declarative_ui/tst_map_item_details.qml
+++ b/tests/auto/declarative_ui/tst_map_item_details.qml
@@ -277,7 +277,7 @@ Item {
Text {id: progressText}
TestCase {
- name: "MapItemDeatils"
+ name: "MapItemDetails"
when: windowShown
/*
@@ -459,19 +459,22 @@ Item {
verify(extMapCircleDateline.center.longitude === 180)
map.center = datelineCoordinate
point = map.fromCoordinate(extMapCircleDateline.center)
- verify(point.x == map.width / 2.0)
- extMapCircleDateline.center.longitude = datelineCoordinateRight.longitude
+ verify(point.x == map.width / 2.0) // center of the screen
+ visualInspectionPoint()
+ extMapCircleDateline.center.longitude = datelineCoordinateRight.longitude // -170, moving the circle to the right
point = map.fromCoordinate(extMapCircleDateline.center)
- verify(point.x > map.width / 2.0)
verify(LocationTestHelper.waitForPolished(map))
+ verify(point.x > map.width / 2.0)
+ visualInspectionPoint()
mousePress(map, point.x, point.y)
- for (i=0; i < 40; i += 4) {
+ for (i=0; i < 50; i += 4) {
wait(1)
mouseMove(map, point.x - i, point.y)
}
mouseRelease(map, point.x - i, point.y)
verify(LocationTestHelper.waitForPolished(map))
point = map.fromCoordinate(extMapCircleDateline.center)
+ visualInspectionPoint()
verify(point.x < map.width / 2.0)
map.removeMapItem(extMapCircleDateline)
@@ -481,18 +484,21 @@ Item {
verify(extMapQuickItemDateline.coordinate.longitude === 175)
point = map.fromCoordinate(extMapQuickItemDateline.coordinate)
verify(point.x < map.width / 2.0)
+ visualInspectionPoint()
extMapQuickItemDateline.coordinate.longitude = datelineCoordinateRight.longitude
point = map.fromCoordinate(extMapQuickItemDateline.coordinate)
verify(point.x > map.width / 2.0)
verify(LocationTestHelper.waitForPolished(map))
+ visualInspectionPoint()
mousePress(map, point.x + 5, point.y + 5)
- for (i=0; i < 50; i += 5) {
+ for (i=0; i < 64; i += 5) {
wait(1)
mouseMove(map, point.x + 5 - i, point.y + 5 )
}
mouseRelease(map, point.x + 5 - i, point.y + 5)
verify(LocationTestHelper.waitForPolished(map))
point = map.fromCoordinate(extMapQuickItemDateline.coordinate)
+ visualInspectionPoint()
verify(point.x < map.width / 2.0)
map.removeMapItem(extMapQuickItemDateline)
@@ -585,5 +591,15 @@ Item {
console.log('map fuzzy cmp returns false for value, ref, tolerance: ' + val + ', ' + ref + ', ' + tolerance)
return false;
}
+ // call to visualInspectionPoint testcase (for dev time visual inspection)
+ function visualInspectionPoint(time) {
+ var waitTime = 0 // 300
+ if (time !== undefined)
+ waitTime = time
+ if (waitTime > 0) {
+ console.log('halting for ' + waitTime + ' milliseconds')
+ wait (waitTime)
+ }
+ }
}
}