Unverified Commit 00229827 authored by Victoria Ashworth's avatar Victoria Ashworth Committed by GitHub

Retry button tap in [FlutterUITests testFlutterViewWarm] (#143967)

Attempting to fix https://github.com/flutter/flutter/issues/142125.
parent fcd154bd
......@@ -73,7 +73,17 @@ static const CGFloat kStandardTimeOut = 60.0;
XCTAssertTrue(newPageAppeared);
[self waitForAndTapElement:app.otherElements[@"Increment via Flutter"]];
XCTAssertTrue([app.staticTexts[@"Button tapped 1 time."] waitForExistenceWithTimeout:kStandardTimeOut]);
BOOL countIncremented = [app.staticTexts[@"Button tapped 1 time."] waitForExistenceWithTimeout:kStandardTimeOut];
if (!countIncremented) {
// Sometimes, the element doesn't respond to the tap, it seems to be an iOS 17 Simulator issue where the
// simulator reboots. Try to tap the element again.
[self waitForAndTapElement:app.otherElements[@"Increment via Flutter"]];
countIncremented = [app.staticTexts[@"Button tapped 1 time."] waitForExistenceWithTimeout:kStandardTimeOut];
if (!countIncremented) {
os_log(OS_LOG_DEFAULT, "%@", app.debugDescription);
}
}
XCTAssertTrue(countIncremented);
// Back navigation.
[app.buttons[@"POP"] tap];
......
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