Skip to content

Commit 26f1f31

Browse files
committed
[url_launcher_ios] Fix test button text to work on iOS 26
1 parent 340d310 commit 26f1f31

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/url_launcher/url_launcher_ios/CHANGELOG.md

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

36
* 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)