Skip to content

[url_launcher_ios] Fix test button text to work on iOS 26 #9766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/url_launcher/url_launcher_ios/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## NEXT
* Fixes test button text to work on iOS 26.

## 6.3.4

* Updates to Pigeon 25.5.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ class URLLauncherUITests: XCTestCase {
button.tap()
let webView = app.webViews.firstMatch
XCTAssertTrue(webView.waitForExistence(timeout: 30.0))
XCTAssertTrue(app.buttons["ForwardButton"].waitForExistence(timeout: 30.0))
XCTAssertTrue(app.buttons["Share"].exists)
XCTAssertTrue(app.buttons["OpenInSafariButton"].exists)
let doneButton = app.buttons["Done"]
XCTAssertTrue(app.buttons["OpenInSafariButton"].waitForExistence(timeout: 30.0))

// iOS 18 is "Done". iOS 26 is "Close".
let doneButtonPredicate = NSPredicate(format: "label = 'Close' OR label = 'Done'")
let doneButton = app.buttons.element(matching: doneButtonPredicate).firstMatch
XCTAssertTrue(doneButton.waitForExistence(timeout: 30.0))
// This should just be doneButton.tap, but for some reason that stopped working in Xcode 15;
// tapping via coordinate works, however.
Expand Down