Skip to content

Commit 28fdb64

Browse files
authored
[platform_view]longer wait time for element (#108907)
1 parent f1b42bb commit 28fdb64

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
@import XCTest;
66

7+
static const CGFloat kStandardTimeOut = 60.0;
8+
79
@interface XCUIElement(KeyboardFocus)
810
@property (nonatomic, readonly) BOOL flt_hasKeyboardFocus;
911
@end
@@ -27,18 +29,17 @@ - (void)setUp {
2729
[self.app launch];
2830
}
2931
- (void)testPlatformViewFocus {
30-
3132
XCUIElement *entranceButton = self.app.buttons[@"platform view focus test"];
32-
XCTAssertTrue([entranceButton waitForExistenceWithTimeout:1]);
33+
XCTAssertTrue([entranceButton waitForExistenceWithTimeout:kStandardTimeOut], @"The element tree is %@", self.app.debugDescription);
3334
[entranceButton tap];
3435

3536
XCUIElement *platformView = self.app.textFields[@"platform_view[0]"];
36-
XCTAssertTrue([platformView waitForExistenceWithTimeout:1]);
37+
XCTAssertTrue([platformView waitForExistenceWithTimeout:kStandardTimeOut]);
3738
XCUIElement *flutterTextField = self.app.textFields[@"Flutter Text Field"];
38-
XCTAssertTrue([flutterTextField waitForExistenceWithTimeout:1]);
39+
XCTAssertTrue([flutterTextField waitForExistenceWithTimeout:kStandardTimeOut]);
3940

4041
[flutterTextField tap];
41-
XCTAssertTrue([self.app.windows.element waitForExistenceWithTimeout:1]);
42+
XCTAssertTrue([self.app.windows.element waitForExistenceWithTimeout:kStandardTimeOut]);
4243
XCTAssertFalse(platformView.flt_hasKeyboardFocus);
4344
XCTAssertTrue(flutterTextField.flt_hasKeyboardFocus);
4445

0 commit comments

Comments
 (0)