Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,41 +126,24 @@ extension DaysUntilBirthdayUITests_iOS {
/// This will assumme the full flow where a user must type in an email and
/// password to sign in with.
func signInForTheFirstTime() -> Bool {
guard sampleApp.textFields["Email or phone"]
.waitForExistence(timeout: timeout) else {
let emailField = sampleApp.textFields["Email or phone"].firstMatch
guard emailField.waitForExistence(timeout: timeout) else {
XCTFail("Failed to find email textfield")
return false
}
guard sampleApp
.keyboards
.element
.buttons["return"]
.waitForExistence(timeout: timeout) else {
XCTFail("Failed to find 'return' button")
return false
}

sampleApp.textFields["Email or phone"].typeText(Credential.email.rawValue)
sampleApp.keyboards.element.buttons["return"].tap()
emailField.tap()
emailField.typeText("\(Credential.email.rawValue)\n")

guard sampleApp.secureTextFields["Enter your password"]
.waitForExistence(timeout: timeout) else {
let passwordField = sampleApp.secureTextFields["Enter your password"].firstMatch
guard passwordField.waitForExistence(timeout: timeout) else {
XCTFail("Failed to find password textfield")
return false
}
guard sampleApp
.keyboards
.element
.buttons["return"]
.waitForExistence(timeout: timeout) else {
XCTFail("Failed to find 'return' button")
return false
}

sampleApp
.secureTextFields["Enter your password"]
.typeText(Credential.password.rawValue)
sampleApp.keyboards.element.buttons["return"].tap()
passwordField.tap()
passwordField
.typeText("\(Credential.password.rawValue)\n")

if sampleApp
.staticTexts[passwordManagerPrompt]
Expand Down
Loading