@@ -255,6 +255,60 @@ class AuthenticationExampleUITests: XCTestCase {
255255 )
256256 }
257257
258+ func testResetPasswordLinkCustomDomain( ) {
259+ // assuming action type is in-app + continue URL everytime the app launches
260+
261+ // set Authorized Domain as Continue URL
262+ let testContinueURL = " fir-ios-auth-sample.firebaseapp.com "
263+ app. staticTexts [ " Continue URL " ] . tap ( )
264+ app. alerts. textFields. element. typeText ( testContinueURL)
265+ app. buttons [ " Save " ] . tap ( )
266+
267+ // set Custom Hosting Domain as Link Domain
268+ let testLinkDomain = " http://firebaseiosauthsample.testdomaindonotuse.com "
269+ app. staticTexts [ " Link Domain " ] . tap ( )
270+ app. alerts. textFields. element. typeText ( testLinkDomain)
271+ app. buttons [ " Save " ] . tap ( )
272+
273+ app. staticTexts [ " Request Password Reset " ] . tap ( )
274+ let testEmail = " [email protected] " 275+ app. alerts. textFields. element. typeText ( testEmail)
276+ app. buttons [ " Save " ] . tap ( )
277+
278+ // Go back and check that there is no user that is signed in
279+ app. tabBars. firstMatch. buttons. element ( boundBy: 1 ) . tap ( )
280+ wait ( forElement: app. navigationBars [ " User " ] , timeout: 5.0 )
281+ XCTAssertEqual (
282+ app. cells. count,
283+ 0 ,
284+ " The user shouldn't be signed in and the user view should have no cells. "
285+ )
286+ }
287+
288+ func testResetPasswordLinkDefaultDomain( ) {
289+ // assuming action type is in-app + continue URL everytime the app launches
290+
291+ // set Authorized Domain as Continue URL
292+ let testContinueURL = " fir-ios-auth-sample.firebaseapp.com "
293+ app. staticTexts [ " Continue URL " ] . tap ( )
294+ app. alerts. textFields. element. typeText ( testContinueURL)
295+ app. buttons [ " Save " ] . tap ( )
296+
297+ app. staticTexts [ " Request Password Reset " ] . tap ( )
298+ let testEmail = " [email protected] " 299+ app. alerts. textFields. element. typeText ( testEmail)
300+ app. buttons [ " Save " ] . tap ( )
301+
302+ // Go back and check that there is no user that is signed in
303+ app. tabBars. firstMatch. buttons. element ( boundBy: 1 ) . tap ( )
304+ wait ( forElement: app. navigationBars [ " User " ] , timeout: 5.0 )
305+ XCTAssertEqual (
306+ app. cells. count,
307+ 0 ,
308+ " The user shouldn't be signed in and the user view should have no cells. "
309+ )
310+ }
311+
258312 // MARK: - Private Helpers
259313
260314 private func signOut( ) {
0 commit comments