File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
FirebaseAuth/Tests/SampleSwift/AuthenticationExampleUITests Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff 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+
311328extension XCTestCase {
312329 func wait( forElement element: XCUIElement , timeout: TimeInterval ) {
313330 let predicate = NSPredicate ( format: " exists == 1 " )
You can’t perform that action at this time.
0 commit comments