add failing e2e test for successful login

This commit is contained in:
Yisroel Baum 2026-05-17 22:01:23 +03:00
parent d99d893394
commit 02effe761a
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -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')
})
})