Unverified Commit 28fdb645 authored by hellohuanlin's avatar hellohuanlin Committed by GitHub

[platform_view]longer wait time for element (#108907)

parent f1b42bb0
......@@ -4,6 +4,8 @@
@import XCTest;
static const CGFloat kStandardTimeOut = 60.0;
@interface XCUIElement(KeyboardFocus)
@property (nonatomic, readonly) BOOL flt_hasKeyboardFocus;
@end
......@@ -27,18 +29,17 @@
[self.app launch];
}
- (void)testPlatformViewFocus {
XCUIElement *entranceButton = self.app.buttons[@"platform view focus test"];
XCTAssertTrue([entranceButton waitForExistenceWithTimeout:1]);
XCTAssertTrue([entranceButton waitForExistenceWithTimeout:kStandardTimeOut], @"The element tree is %@", self.app.debugDescription);
[entranceButton tap];
XCUIElement *platformView = self.app.textFields[@"platform_view[0]"];
XCTAssertTrue([platformView waitForExistenceWithTimeout:1]);
XCTAssertTrue([platformView waitForExistenceWithTimeout:kStandardTimeOut]);
XCUIElement *flutterTextField = self.app.textFields[@"Flutter Text Field"];
XCTAssertTrue([flutterTextField waitForExistenceWithTimeout:1]);
XCTAssertTrue([flutterTextField waitForExistenceWithTimeout:kStandardTimeOut]);
[flutterTextField tap];
XCTAssertTrue([self.app.windows.element waitForExistenceWithTimeout:1]);
XCTAssertTrue([self.app.windows.element waitForExistenceWithTimeout:kStandardTimeOut]);
XCTAssertFalse(platformView.flt_hasKeyboardFocus);
XCTAssertTrue(flutterTextField.flt_hasKeyboardFocus);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment