Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 8a22895

Browse files
author
Chris Yang
committed
fix
1 parent f50f25a commit 8a22895

File tree

1 file changed

+8
-1
lines changed
  • packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerUITests

1 file changed

+8
-1
lines changed

packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerUITests/GoogleMapsUITests.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,14 @@ - (void)testUserInterface {
5858
XCTFail(@"Failed due to not able to find platform view");
5959
}
6060

61-
XCUIElement *compass = app.buttons[@"enable compass"];
61+
62+
// There is a known bug where the permission popups interruption won't get fired until a tap
63+
// happened in the app. We expect a permission popup so we do a tap here.
64+
// iOS 16 has a bug where if the app itself is directly tapped: [app tap], the first button (disable compass)
65+
// in the app is also tapped, so instead we tap a arbitrary location in the app instead.
66+
XCUICoordinate *coordinate = [app coordinateWithNormalizedOffset:CGVectorMake(0, 0)];
67+
[coordinate tap];
68+
XCUIElement *compass = app.buttons[@"disable compass"];
6269
if (![compass waitForExistenceWithTimeout:30.0]) {
6370
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
6471
XCTFail(@"Failed due to not able to find disable map toolbar button");

0 commit comments

Comments
 (0)