From fac7bcca0282f04d3d0b4a68d3f2d6324c5ff47a Mon Sep 17 00:00:00 2001 From: Semjon Nordmann Date: Thu, 31 Oct 2024 10:22:16 +0100 Subject: [PATCH] Add initial frontend test for login --- test/cypress/e2e/frontend/Login.cy.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/cypress/e2e/frontend/Login.cy.js diff --git a/test/cypress/e2e/frontend/Login.cy.js b/test/cypress/e2e/frontend/Login.cy.js new file mode 100644 index 00000000..8f8d6784 --- /dev/null +++ b/test/cypress/e2e/frontend/Login.cy.js @@ -0,0 +1,14 @@ +/// + +describe('Frontend Login', () => { + it('Login works', function() { + cy.intercept('/api/users/me*').as('getCurrentUser') + + cy.visit("/") + cy.get('input[name="identity"]').type("admin@example.com") + cy.get('input[name="secret"]').type("changeme") + cy.get('button[type=submit]').click() + + cy.wait("@getCurrentUser") + }); +});