Skip to content

Commit 8e382f6

Browse files
committed
fix checks
1 parent 402fb8c commit 8e382f6

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

FirebaseAuth/Tests/SampleSwift/AuthenticationExampleUITests/AuthenticationExampleUITests.swift

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class AuthenticationExampleUITests: XCTestCase {
225225
// Cleanup
226226
removeUIInterruptionMonitor(interruptionMonitor)
227227
}
228-
228+
229229
func testEmailLinkSentSuccessfully() {
230230
app.staticTexts["Email Link/Passwordless"].tap()
231231

@@ -254,6 +254,7 @@ class AuthenticationExampleUITests: XCTestCase {
254254
"The user shouldn't be signed in and the user view should have no cells."
255255
)
256256
}
257+
257258
func testResetPasswordLinkCustomDomain() {
258259
// assuming action type is in-app + continue URL everytime the app launches
259260

@@ -308,6 +309,22 @@ class AuthenticationExampleUITests: XCTestCase {
308309
)
309310
}
310311

312+
// MARK: - Private Helpers
313+
314+
private func signOut() {
315+
if app.tabBars.firstMatch.buttons.element(boundBy: 1).exists {
316+
app.tabBars.firstMatch.buttons.element(boundBy: 1).tap()
317+
}
318+
wait(forElement: app.navigationBars["User"], timeout: 5.0)
319+
if app.staticTexts["Sign Out"].exists {
320+
app.staticTexts["Sign Out"].tap()
321+
}
322+
if app.tabBars.firstMatch.buttons.element(boundBy: 0).exists {
323+
app.tabBars.firstMatch.buttons.element(boundBy: 0).tap()
324+
}
325+
}
326+
}
327+
311328
extension XCTestCase {
312329
func wait(forElement element: XCUIElement, timeout: TimeInterval) {
313330
let predicate = NSPredicate(format: "exists == 1")

0 commit comments

Comments
 (0)