diff --git a/frontend/cypress.config.ts b/frontend/cypress.config.ts index e2689cba1b..76490462e4 100644 --- a/frontend/cypress.config.ts +++ b/frontend/cypress.config.ts @@ -1,10 +1,8 @@ import { defineConfig } from 'cypress' export default defineConfig({ - env: { + e2e: { + setupNodeEvents(on, config) { }, baseUrl: 'http://localhost:8000', }, - e2e: { - setupNodeEvents(on, config) {}, - }, }) diff --git a/frontend/cypress/e2e/authentication.cy.ts b/frontend/cypress/e2e/authentication.cy.ts index d41fe73599..f7bba67611 100644 --- a/frontend/cypress/e2e/authentication.cy.ts +++ b/frontend/cypress/e2e/authentication.cy.ts @@ -12,7 +12,7 @@ describe('Authentication', () => { }) it('should redirect to login page if user is not logged in', () => { - cy.visit(`${Cypress.env('baseUrl')}/user/workspaces`) + cy.visit(`/user/workspaces`) cy.url().should('include', '/user/login') }) }) diff --git a/frontend/cypress/screenshots/authentication.cy.ts/Authentication -- can login using email and password (failed).png b/frontend/cypress/screenshots/authentication.cy.ts/Authentication -- can login using email and password (failed).png new file mode 100644 index 0000000000..9bece427d1 Binary files /dev/null and b/frontend/cypress/screenshots/authentication.cy.ts/Authentication -- can login using email and password (failed).png differ diff --git a/frontend/cypress/screenshots/authentication.cy.ts/Authentication -- should redirect to login page if user is not logged in (failed).png b/frontend/cypress/screenshots/authentication.cy.ts/Authentication -- should redirect to login page if user is not logged in (failed).png new file mode 100644 index 0000000000..f70c27b36f Binary files /dev/null and b/frontend/cypress/screenshots/authentication.cy.ts/Authentication -- should redirect to login page if user is not logged in (failed).png differ diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index 78e3c947b2..ea8b26669a 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -1,5 +1,5 @@ Cypress.Commands.add('login', (email: string, password: string) => { - cy.visit(`${Cypress.env('baseUrl')}/user/login`) + cy.visit(`/user/login`) cy.get('#showPassword').click() cy.get('#email').type('admin@windmill.dev') cy.get('#password').type('changeme') diff --git a/frontend/cypress/tsconfig.json b/frontend/cypress/tsconfig.json index 6df18740ad..d38fedca20 100644 --- a/frontend/cypress/tsconfig.json +++ b/frontend/cypress/tsconfig.json @@ -4,5 +4,5 @@ "lib": ["es5", "dom"], "types": ["cypress"] }, - "include": ["**/*.ts"] -} \ No newline at end of file + "include": ["**/*.ts", "*.ts"] +}