Created
November 28, 2021 12:19
-
-
Save jmaicaaan/d61cc03f812de251a9e0e5fc59a91790 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
describe('fb social login', () => { | |
it('should be able to login with fb', () => { | |
cy.visit('http://localhost:3000'); | |
return cy.loginByFacebook().then(() => { | |
cy.get('[data-testid="fb-login-button"]') | |
.should('be.enabled') | |
.click(); | |
cy.location('pathname').should('eq', '/home'); | |
}); | |
}); | |
it('should fail to login with fb', () => { | |
cy.visit('http://localhost:3000'); | |
return cy.loginByFacebook('not_authorized').then(() => { | |
cy.get('[data-testid="fb-login-button"]') | |
.should('be.enabled') | |
.click(); | |
cy.location('pathname').should('eq', '/'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment