test(e2e): test login page
All checks were successful
container-scan / Container Scan (pull_request) Successful in 2m25s
docker-build / docker (pull_request) Successful in 3m52s
tests / Tests (pull_request) Successful in 5m28s

This commit is contained in:
Dominik 2025-05-13 09:04:37 +02:00
parent 5f8a9d0f59
commit 3a1b81c4be
11 changed files with 92 additions and 6 deletions

31
cypress/e2e/login.cy.ts Normal file
View file

@ -0,0 +1,31 @@
describe('login', () => {
it('loads', () => {
cy.visit('http://localhost:3000/');
cy.getBySel('login-header').should('exist');
});
it('shows login form', () => {
cy.visit('http://localhost:3000/');
cy.getBySel('login-form').should('exist');
cy.getBySel('email-input').should('exist');
cy.getBySel('password-input').should('exist');
cy.getBySel('login-button').should('exist');
});
it('shows sso button', () => {
cy.visit('http://localhost:3000/');
cy.getBySel('sso-login-button_authentik').should('exist');
});
it('allows login', () => {
cy.visit('http://localhost:3000/');
cy.getBySel('email-input').type('test@example.com');
cy.getBySel('password-input').type('password');
cy.getBySel('login-button').click();
cy.url().should('include', '/home');
});
});