diff --git a/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts index d979fe0..0ba798c 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts @@ -35,7 +35,7 @@ describe('admin login page', () => { }) }) - it('logs in with valid credentials and redirects to the home page', () => { + it('logs in and logs out from the home page navbar', () => { cy.visit('/login') cy.get('[data-cy="login-email"]').type('admin@rabbigerzi.test') @@ -44,5 +44,10 @@ describe('admin login page', () => { cy.url().should('eq', Cypress.config().baseUrl + '/') cy.getCookie('auth_token').should('exist') + cy.get('[data-cy="navbar-logout"]').should('be.visible') + cy.get('[data-cy="navbar-logout"]').click() + + cy.getCookie('auth_token').should('not.exist') + cy.get('[data-cy="navbar-logout"]').should('not.exist') }) })