Skip to content

Commit

Permalink
[webview_flutter] Fix XCUITest in Xcode 15 (#5071)
Browse files Browse the repository at this point in the history
For some reason tapping the "Done" button in the XCUITest stopped working in Xcode 15, but tapping it via coordinates works, so switch to that as a workaround.

Fixes flutter/flutter#134971
  • Loading branch information
stuartmorgan authored Oct 4, 2023
1 parent 5badf97 commit 6714d50
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ class URLLauncherUITests: XCTestCase {
XCTAssertTrue(app.buttons["ForwardButton"].waitForExistence(timeout: 30.0))
XCTAssertTrue(app.buttons["Share"].exists)
XCTAssertTrue(app.buttons["OpenInSafariButton"].exists)
app.buttons["Done"].tap()
let doneButton = app.buttons["Done"]
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.
doneButton.coordinate(withNormalizedOffset: CGVector()).withOffset(CGVector(dx: 10, dy: 10))
.tap()
}
}
}

0 comments on commit 6714d50

Please sign in to comment.