Created
September 8, 2020 16:23
-
-
Save adambouchard/553fe198c3700095d7422504bbc5270f to your computer and use it in GitHub Desktop.
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
describe('Authentication', () => { | |
it('Login - fail w/ incorrect credentials', () => { | |
cy.visit('/login') | |
cy.get('[data-cy=email]').type('sysadmin+e2e@easelearning.com') | |
cy.get('[data-cy=password]').type('wrongpwd123') | |
cy.get('[data-cy=submit]').click().then(() => { | |
cy.url().should('include', '/login') | |
cy.get('[data-cy=error]').should('be.visible') | |
}) | |
}) | |
it('Login - success', () => { | |
cy.visit('/login') | |
cy.get('[data-cy=email]').type('sysadmin+e2e@easelearning.com') | |
cy.get('[data-cy=password]').type('password') | |
cy.get('[data-cy=submit]').click().then(() => { | |
cy.url().should('include', '/a/8') | |
}) | |
}) | |
it('Logout - success', () => { | |
cy.get('[data-cy=dropdownUserClick]').click() | |
cy.get('[data-cy=logout]').click().then(() => { | |
// how to check the store was cleared? | |
cy.url().should('include', '/login') | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment