add failing e2e test for successful login
This commit is contained in:
parent
d99d893394
commit
02effe761a
1 changed files with 11 additions and 0 deletions
|
|
@ -34,4 +34,15 @@ describe('admin login page', () => {
|
|||
cy.wrap($link).should('not.have.attr', 'href', '/login')
|
||||
})
|
||||
})
|
||||
|
||||
it('logs in with valid credentials and redirects to the home page', () => {
|
||||
cy.visit('/login')
|
||||
|
||||
cy.get('[data-cy="login-email"]').type('admin@rabbigerzi.test')
|
||||
cy.get('[data-cy="login-password"]').type('password')
|
||||
cy.get('[data-cy="login-submit"]').click()
|
||||
|
||||
cy.url().should('eq', Cypress.config().baseUrl + '/')
|
||||
cy.getCookie('auth_token').should('exist')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue