Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fangpenlin/646b571b8896e9df44d3c4f8e23f7bbc to your computer and use it in GitHub Desktop.
Save fangpenlin/646b571b8896e9df44d3c4f8e23f7bbc to your computer and use it in GitHub Desktop.
import XCTest
import Embassy
import EnvoyAmbassador
class MyUITests: UITestBase {
func testUserList() {
router[DefaultRouter.fetchUsersPath] = DelayResponse(JSONResponse(handler: { _ in
return [
["id": "01", "name": "John"],
["id": "02", "name": "Tom"]
]
}))
app.launch()
app.buttons["Show Users"].tap()
XCTAssert(app.staticTexts["John"].exists)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment