@@ -17,6 +17,8 @@ - (void)setUp {
1717 self.app = [[XCUIApplication alloc ] init ];
1818 [self .app launch ];
1919
20+ // The location permission interception is currently not working.
21+ // See: https://github.com/flutter/flutter/issues/93325.
2022 [self
2123 addUIInterruptionMonitorWithDescription: @" Permission popups"
2224 handler: ^BOOL (XCUIElement* _Nonnull interruptingElement) {
@@ -64,4 +66,59 @@ - (void)skip_testUserInterface {
6466 [compass tap ];
6567}
6668
69+ - (void )testMapCoordinatesPage {
70+ XCUIApplication* app = self.app ;
71+ XCUIElement* mapCoordinates = app.staticTexts [@" Map coordinates" ];
72+ if (![mapCoordinates waitForExistenceWithTimeout: 30.0 ]) {
73+ os_log_error (OS_LOG_DEFAULT, " %@" , app.debugDescription );
74+ XCTFail (@" Failed due to not able to find 'Map coordinates''" );
75+ }
76+ [mapCoordinates tap ];
77+
78+ XCUIElement* platformView = app.otherElements [@" platform_view[0]" ];
79+ if (![platformView waitForExistenceWithTimeout: 30.0 ]) {
80+ os_log_error (OS_LOG_DEFAULT, " %@" , app.debugDescription );
81+ XCTFail (@" Failed due to not able to find platform view" );
82+ }
83+
84+ XCUIElement* getVisibleRegionBoundsButton = app.buttons [@" Get Visible Region Bounds" ];
85+ if (![getVisibleRegionBoundsButton waitForExistenceWithTimeout: 30.0 ]) {
86+ os_log_error (OS_LOG_DEFAULT, " %@" , app.debugDescription );
87+ XCTFail (@" Failed due to not able to find 'Get Visible Region Bounds''" );
88+ }
89+ [getVisibleRegionBoundsButton tap ];
90+ }
91+
92+ - (void )testMapClickPage {
93+ XCUIApplication* app = self.app ;
94+ XCUIElement* mapClick = app.staticTexts [@" Map click" ];
95+ if (![mapClick waitForExistenceWithTimeout: 30.0 ]) {
96+ os_log_error (OS_LOG_DEFAULT, " %@" , app.debugDescription );
97+ XCTFail (@" Failed due to not able to find 'Map click''" );
98+ }
99+ [mapClick tap ];
100+
101+ XCUIElement* platformView = app.otherElements [@" platform_view[0]" ];
102+ if (![platformView waitForExistenceWithTimeout: 30.0 ]) {
103+ os_log_error (OS_LOG_DEFAULT, " %@" , app.debugDescription );
104+ XCTFail (@" Failed due to not able to find platform view" );
105+ }
106+
107+ [platformView tap ];
108+
109+ XCUIElement* tapped = app.staticTexts [@" Tapped" ];
110+ if (![tapped waitForExistenceWithTimeout: 30.0 ]) {
111+ os_log_error (OS_LOG_DEFAULT, " %@" , app.debugDescription );
112+ XCTFail (@" Failed due to not able to find 'tapped''" );
113+ }
114+
115+ [platformView pressForDuration: 5.0 ];
116+
117+ XCUIElement* longPressed = app.staticTexts [@" Long pressed" ];
118+ if (![longPressed waitForExistenceWithTimeout: 30.0 ]) {
119+ os_log_error (OS_LOG_DEFAULT, " %@" , app.debugDescription );
120+ XCTFail (@" Failed due to not able to find 'longPressed''" );
121+ }
122+ }
123+
67124@end
0 commit comments