Skip to content

Instantly share code, notes, and snippets.

@Pulichev
Created May 23, 2018 12:50
Show Gist options
  • Save Pulichev/49d7bbda5b4cb5620d25873a4bcdb405 to your computer and use it in GitHub Desktop.
Save Pulichev/49d7bbda5b4cb5620d25873a4bcdb405 to your computer and use it in GitHub Desktop.
func testExample() {
app.launchArguments.append("--clearuser")
app.launch()
expectation(for: exists, evaluatedWith: app.buttons["Other options"], handler: nil)
waitForExpectations(timeout: 20, handler: nil)
snapshot("Auth")
app.buttons["Other options"].tap()
app.buttons["Sign In"].tap()
let emailTextField = app.textFields.matching(identifier: "email")
let passwordTextField = app.secureTextFields.matching(identifier: "password")
emailTextField.element.tap()
emailTextField.element.typeText("eeeeemaaaaaiiiillll\n")
passwordTextField.element.typeText("123456")
sleep(1)
app.buttons.matching(identifier: "final").element.tap()
expectation(for: exists, evaluatedWith: app.tabBars.buttons["Profile"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)
app.tabBars.buttons["Profile"].tap()
sleep(2)
snapshot("Profile")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment