Skip to content

Commit

Permalink
fix checks
Browse files Browse the repository at this point in the history
  • Loading branch information
srushtisv committed Nov 8, 2024
1 parent 402fb8c commit 8e382f6
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class AuthenticationExampleUITests: XCTestCase {
// Cleanup
removeUIInterruptionMonitor(interruptionMonitor)
}

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

Expand Down Expand Up @@ -254,6 +254,7 @@ class AuthenticationExampleUITests: XCTestCase {
"The user shouldn't be signed in and the user view should have no cells."
)
}

func testResetPasswordLinkCustomDomain() {
// assuming action type is in-app + continue URL everytime the app launches

Expand Down Expand Up @@ -308,6 +309,22 @@ class AuthenticationExampleUITests: XCTestCase {
)
}

// MARK: - Private Helpers

private func signOut() {
if app.tabBars.firstMatch.buttons.element(boundBy: 1).exists {
app.tabBars.firstMatch.buttons.element(boundBy: 1).tap()
}
wait(forElement: app.navigationBars["User"], timeout: 5.0)
if app.staticTexts["Sign Out"].exists {
app.staticTexts["Sign Out"].tap()
}
if app.tabBars.firstMatch.buttons.element(boundBy: 0).exists {
app.tabBars.firstMatch.buttons.element(boundBy: 0).tap()
}
}
}

extension XCTestCase {
func wait(forElement element: XCUIElement, timeout: TimeInterval) {
let predicate = NSPredicate(format: "exists == 1")
Expand Down

0 comments on commit 8e382f6

Please sign in to comment.