Skip to content

Instantly share code, notes, and snippets.

@CollectiveHealth-gists
Created July 10, 2017 23:39
Show Gist options
  • Save CollectiveHealth-gists/250c3cbe257c877b3315c5177543ff88 to your computer and use it in GitHub Desktop.
Save CollectiveHealth-gists/250c3cbe257c877b3315c5177543ff88 to your computer and use it in GitHub Desktop.
Testing iOS at Collective Health: A UI Test
func launchApp() {
app.launch()
// We have stubbed out the login flow to always succeed,
// so the password doesn't matter
app.secureTextFields["password_text_field"].typeText("nonsense password\n")
app.tabBars.buttons["get care tab button"].tap()
}
func testCurrentLocationPreSelected() {
launchApp()
// This is testing that the "location" field is populated with
// "Current Location" text
assertExists(app.textFields["Current Location"])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment