Skip to content

Commit 5866014

Browse files
authored
[url_launcher_ios] Fix test button text to work on iOS 26 (#9766)
Handle either a "Done" (iOS 18) or a "Close" (iOS 26) button: iOS 26 simulator: <img width="406" height="575" alt="Screenshot 2025-08-13 at 3 45 02 PM" src="https://github.com/user-attachments/assets/5c7460f1-626c-404b-9de4-0827e34cd910" /> Remove validation of UI elements (`ForwardButton`, `Share`) that the plugin doesn't control. Fixes flutter/flutter#173100 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 201ec5a commit 5866014

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

packages/url_launcher/url_launcher_ios/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Fixes integration test button text matcher to work on iOS 26.
4+
15
## 6.3.4
26

37
* Updates to Pigeon 25.5.0.

packages/url_launcher/url_launcher_ios/example/ios/RunnerUITests/URLLauncherUITests.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ class URLLauncherUITests: XCTestCase {
2828
button.tap()
2929
let webView = app.webViews.firstMatch
3030
XCTAssertTrue(webView.waitForExistence(timeout: 30.0))
31-
XCTAssertTrue(app.buttons["ForwardButton"].waitForExistence(timeout: 30.0))
32-
XCTAssertTrue(app.buttons["Share"].exists)
33-
XCTAssertTrue(app.buttons["OpenInSafariButton"].exists)
34-
let doneButton = app.buttons["Done"]
31+
XCTAssertTrue(app.buttons["OpenInSafariButton"].waitForExistence(timeout: 30.0))
32+
33+
// iOS 18 is "Done". iOS 26 is "Close".
34+
let doneButtonPredicate = NSPredicate(format: "label = 'Close' OR label = 'Done'")
35+
let doneButton = app.buttons.element(matching: doneButtonPredicate).firstMatch
3536
XCTAssertTrue(doneButton.waitForExistence(timeout: 30.0))
3637
// This should just be doneButton.tap, but for some reason that stopped working in Xcode 15;
3738
// tapping via coordinate works, however.

0 commit comments

Comments
 (0)