Skip to content

Instantly share code, notes, and snippets.

@LukeSmith16
Created April 2, 2023 17:23
Show Gist options
  • Save LukeSmith16/2ce10af1f95518fd448e2b07f72c1747 to your computer and use it in GitHub Desktop.
Save LukeSmith16/2ce10af1f95518fd448e2b07f72c1747 to your computer and use it in GitHub Desktop.
An example test using `UITestConnectionManager` with a mocked response
final class MyAppUITests: XCTestCase {
override func setUpWithError() throws {
continueAfterFailure = false
}
func testShoppingList() {
UITestConnectionManager.setMockedResponse(with: .list)
let app = XCUIApplication()
app.launchArguments = ["UITests"]
app.launch()
// Add test logic...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment