From 28fdb64509ebbd501c3abe9fb3e7685aea9db7d4 Mon Sep 17 00:00:00 2001 From: hellohuanlin <41930132+hellohuanlin@users.noreply.github.com> Date: Thu, 4 Aug 2022 12:28:12 -0700 Subject: [PATCH] [platform_view]longer wait time for element (#108907) --- .../ios/PlatformViewUITests/PlatformViewUITests.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m b/dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m index 2ed6ef3f07f..2e7157eb28a 100644 --- a/dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m +++ b/dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m @@ -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);