Skip to content
Merged
Changes from 1 commit
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 @@ -226,6 +226,35 @@
removeUIInterruptionMonitor(interruptionMonitor)
}

func testEmailLinkSentSuccessfully() {
app.staticTexts["Email Link/Passwordless"].tap()

let testEmail = "[email protected]"
app.textFields["Enter Authentication Email"].tap()
app.textFields["Enter Authentication Email"].typeText(testEmail)
app.buttons["return"].tap() // Dismiss keyboard

Check failure on line 235 in FirebaseAuth/Tests/SampleSwift/AuthenticationExampleUITests/AuthenticationExampleUITests.swift

View workflow job for this annotation

GitHub Actions / integration-tests (AuthenticationExampleUITests)

testEmailLinkSentSuccessfully, Failed to failed to scroll to visible (by AX action) Button, {{295.0, 1093.0}, {98.0, 46.0}}, identifier: 'Return', label: 'return', error: Error kAXErrorCannotComplete performing AXAction kAXScrollToVisibleAction on element AX element pid: 11988, elementOrHash.elementID: 105553151409632.376. (Underlying Error: Error kAXErrorCannotComplete performing AXAction kAXScrollToVisibleAction on element AX element pid: 11988, elementOrHash.elementID: 105553151409632.376)

Check failure on line 235 in FirebaseAuth/Tests/SampleSwift/AuthenticationExampleUITests/AuthenticationExampleUITests.swift

View workflow job for this annotation

GitHub Actions / integration-tests (AuthenticationExampleUITests)

testEmailLinkSentSuccessfully, Failed to failed to scroll to visible (by AX action) Button, {{295.0, 1093.0}, {98.0, 46.0}}, identifier: 'Return', label: 'return', error: Error kAXErrorCannotComplete performing AXAction kAXScrollToVisibleAction on element AX element pid: 14777, elementOrHash.elementID: 105553151425616.366. (Underlying Error: Error kAXErrorCannotComplete performing AXAction kAXScrollToVisibleAction on element AX element pid: 14777, elementOrHash.elementID: 105553151425616.366)
app.buttons["Send Sign In Link"].tap()

// Wait for the error message to appear (if there is an error)
let errorAlert = app.alerts.staticTexts["Error"]
let errorExists = errorAlert.waitForExistence(timeout: 5.0)

app.swipeDown(velocity: .fast)

// Assert that there is no error message (success case)
// The email sign in link is sent successfully if no error message appears
XCTAssertFalse(errorExists, "Error")

Check failure on line 246 in FirebaseAuth/Tests/SampleSwift/AuthenticationExampleUITests/AuthenticationExampleUITests.swift

View workflow job for this annotation

GitHub Actions / integration-tests (AuthenticationExampleUITests)

testEmailLinkSentSuccessfully, XCTAssertFalse failed - Error

// Go back and check that there is no user that is signed in
app.tabBars.firstMatch.buttons.element(boundBy: 1).tap()
wait(forElement: app.navigationBars["User"], timeout: 5.0)
XCTAssertEqual(
app.cells.count,
0,
"The user shouldn't be signed in and the user view should have no cells."
)
}

// MARK: - Private Helpers

private func signOut() {
Expand Down
Loading