diff --git a/packages/url_launcher/url_launcher/CHANGELOG.md b/packages/url_launcher/url_launcher/CHANGELOG.md index 697b7c7816dd..bbc5f2445a9e 100644 --- a/packages/url_launcher/url_launcher/CHANGELOG.md +++ b/packages/url_launcher/url_launcher/CHANGELOG.md @@ -1,3 +1,7 @@ +## NEXT + +* Fix test button check for iOS 15. + ## 6.0.7 * Update the README to describe a workaround to the `Uri` query diff --git a/packages/url_launcher/url_launcher/example/ios/RunnerUITests/URLLauncherUITests.m b/packages/url_launcher/url_launcher/example/ios/RunnerUITests/URLLauncherUITests.m index f7ae5d9250da..18af3be9a1e5 100644 --- a/packages/url_launcher/url_launcher/example/ios/RunnerUITests/URLLauncherUITests.m +++ b/packages/url_launcher/url_launcher/example/ios/RunnerUITests/URLLauncherUITests.m @@ -27,19 +27,13 @@ - (void)testLaunch { ]; for (NSString* buttonName in buttonNames) { XCUIElement* button = app.buttons[buttonName]; - if (![button waitForExistenceWithTimeout:30.0]) { - os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCTFail(@"Failed due to not able to find %@ button", buttonName); - } + XCTAssertTrue([button waitForExistenceWithTimeout:30.0]); XCTAssertEqual(app.webViews.count, 0); [button tap]; XCUIElement* webView = app.webViews.firstMatch; - if (![webView waitForExistenceWithTimeout:30.0]) { - os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCTFail(@"Failed due to not able to find webview"); - } - XCTAssertTrue(app.buttons[@"ForwardButton"].exists); - XCTAssertTrue(app.buttons[@"ShareButton"].exists); + XCTAssertTrue([webView waitForExistenceWithTimeout:30.0]); + XCTAssertTrue([app.buttons[@"ForwardButton"] waitForExistenceWithTimeout:30.0]); + XCTAssertTrue(app.buttons[@"Share"].exists); XCTAssertTrue(app.buttons[@"OpenInSafariButton"].exists); [app.buttons[@"Done"] tap]; }