diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-04-27 15:39:56 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-05-05 01:07:29 -0700 |
commit | 134cab9190573d26bad27d45a548903b3dd01d42 (patch) | |
tree | 1864be4fb8ce660e35bced9e1972621e6b97e5e5 | |
parent | 5a8ab88217206cbb2757e6cbd68f051deb196735 (diff) | |
download | qtlocation-mapboxgl-134cab9190573d26bad27d45a548903b3dd01d42.tar.gz |
[ios] Increased timeouts
Also wait to use settings sheet until after it appears.
-rw-r--r-- | platform/ios/uitest/MGLAnnotationTests.m | 10 | ||||
-rw-r--r-- | platform/ios/uitest/MGLUserLocationTests.m | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/platform/ios/uitest/MGLAnnotationTests.m b/platform/ios/uitest/MGLAnnotationTests.m index 38e22ad428..96016cc3e7 100644 --- a/platform/ios/uitest/MGLAnnotationTests.m +++ b/platform/ios/uitest/MGLAnnotationTests.m @@ -100,7 +100,7 @@ XCUIElement *mapProxyElement = mapElement.buttons[@"MGLMapViewProxyAccessibilityElement"]; [self expectationForPredicate:exists evaluatedWithObject:mapProxyElement handler:nil]; [mapElement pressForDuration:1.1]; - [self waitForExpectationsWithTimeout:1 handler:nil]; + [self waitForExpectationsWithTimeout:2 handler:nil]; // Remove all annotations, closing the callout view. [app.navigationBars[@"MBXNavigationBar"].buttons[@"MBXSettingsButton"] tap]; @@ -130,13 +130,17 @@ - (void)testTourWorld { XCUIApplication *app = [[XCUIApplication alloc] init]; NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == YES"]; + + XCUIElement *settingsSheet = app.sheets[@"Map Settings"]; + [self expectationForPredicate:exists evaluatedWithObject:settingsSheet handler:nil]; [app.navigationBars[@"MBXNavigationBar"].buttons[@"MBXSettingsButton"] tap]; + [self waitForExpectationsWithTimeout:1 handler:nil]; // Start the world tour. XCUIElement *mapElement = app.otherElements[@"MGLMapView"]; [self expectationForPredicate:exists evaluatedWithObject:mapElement.buttons[@"Washington, D.C."] handler:nil]; - [app.sheets[@"Map Settings"].collectionViews.buttons[@"Start World Tour"] tap]; - [self waitForExpectationsWithTimeout:5 handler:nil]; + [settingsSheet.collectionViews.buttons[@"Start World Tour"] tap]; + [self waitForExpectationsWithTimeout:2 handler:nil]; [self expectationForPredicate:exists evaluatedWithObject:mapElement.buttons[@"San Francisco"] handler:nil]; [self waitForExpectationsWithTimeout:15 handler:nil]; [self expectationForPredicate:exists evaluatedWithObject:mapElement.buttons[@"Bangalore"] handler:nil]; diff --git a/platform/ios/uitest/MGLUserLocationTests.m b/platform/ios/uitest/MGLUserLocationTests.m index e4c17f65cb..ccc6a0d023 100644 --- a/platform/ios/uitest/MGLUserLocationTests.m +++ b/platform/ios/uitest/MGLUserLocationTests.m @@ -28,7 +28,7 @@ XCUIElement *titleText = app.staticTexts[@"You Are Here"]; [self expectationForPredicate:exists evaluatedWithObject:titleText handler:nil]; [userLocationAnnotationElement tap]; - [self waitForExpectationsWithTimeout:1 handler:nil]; + [self waitForExpectationsWithTimeout:2 handler:nil]; // Close the user dot’s callout view by tapping on the map proxy element. Note that the map proxy element has a gaping hole in the middle to accommodate the callout view. XCUIElement *mapProxyElement = app.buttons[@"MGLMapViewProxyAccessibilityElement"]; |