Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auth UI built with https://github.com/firebase/firebaseui-web Unit tests inspired by angular/angularfire#18 (comment)
- Loading branch information
1 parent
8ed1b48
commit e246f68
Showing
6 changed files
with
78 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/// <reference types="Cypress" /> | ||
|
||
context('Home Page', () => { | ||
beforeEach(() => { | ||
cy.visit('/login') | ||
}); | ||
|
||
it('should have title', () => { | ||
cy.get('ion-title').should('contain', 'Login'); | ||
}); | ||
|
||
it('should have Google sign in button', () => { | ||
let googleSignInButton = cy.get('.firebaseui-idp-google'); | ||
googleSignInButton.should('contain', 'Sign in with Google'); | ||
googleSignInButton.click(); | ||
}); | ||
|
||
it('should have email sign in button', () => { | ||
let emailSignInButton = cy.get('.firebaseui-idp-password'); | ||
emailSignInButton.should('contain', 'Sign in with email'); | ||
emailSignInButton.click(); | ||
|
||
cy.get('.firebaseui-id-email').type('e2e@test.com'); | ||
cy.get('.firebaseui-id-submit').click(); | ||
cy.get('.firebaseui-id-password').type('cypress'); | ||
cy.get('.firebaseui-id-submit').click(); | ||
|
||
cy.url().should('eq', 'http://localhost:8100/home'); | ||
}); | ||
|
||
it('should have anonymous sign in button', () => { | ||
let continueAsGuestButton = cy.get('.firebaseui-idp-anonymous'); | ||
continueAsGuestButton.should('contain', 'Continue as guest'); | ||
continueAsGuestButton.click(); | ||
|
||
cy.url().should('eq', 'http://localhost:8100/home'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>login</ion-title> | ||
<ion-title>Login</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content> | ||
<ion-content id="firebaseui-auth-container"> | ||
|
||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters