From 5e05ba2cbbdc34f9faf4c5c43db69dc8f178f483 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Tue, 13 May 2025 11:38:22 +0200 Subject: [PATCH] fix: listen on 127.0.0.1 --- .env.test | 2 +- .github/workflows/tests.yml | 2 +- .gitignore | 5 +++++ cypress/e2e/login.cy.ts | 8 ++++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.env.test b/.env.test index 996599e..f6bb75c 100644 --- a/.env.test +++ b/.env.test @@ -1,5 +1,5 @@ AUTH_SECRET="auth_secret" AUTH_URL="http://localhost:3000" -HOSTNAME=0.0.0.0 +HOSTNAME="127.0.0.1" DATABASE_URL="file:./dev.db" AUTH_AUTHENTIK_ISSUER="auth_issuer" \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 085d927..9906596 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: build: yarn run build start: yarn cypress:start_server e2e: true - wait-on: 'http://localhost:3000' + wait-on: 'http://127.0.0.1:3000' - name: Cypress run (component) uses: https://github.com/cypress-io/github-action@v6 diff --git a/.gitignore b/.gitignore index 15ad52f..3e5944f 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,8 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# cypress +cypress/videos +cypress/screenshots +cypress/coverage diff --git a/cypress/e2e/login.cy.ts b/cypress/e2e/login.cy.ts index 6045354..2c09412 100644 --- a/cypress/e2e/login.cy.ts +++ b/cypress/e2e/login.cy.ts @@ -1,12 +1,12 @@ describe('login', () => { it('loads', () => { - cy.visit('http://localhost:3000/'); + cy.visit('http://127.0.0.1:3000/'); cy.getBySel('login-header').should('exist'); }); it('shows login form', () => { - cy.visit('http://localhost:3000/'); + cy.visit('http://127.0.0.1:3000/'); cy.getBySel('login-form').should('exist'); cy.getBySel('email-input').should('exist'); @@ -15,13 +15,13 @@ describe('login', () => { }); it('shows sso button', () => { - cy.visit('http://localhost:3000/'); + cy.visit('http://127.0.0.1:3000/'); cy.getBySel('sso-login-button_authentik').should('exist'); }); it('allows login', () => { - cy.visit('http://localhost:3000/'); + cy.visit('http://127.0.0.1:3000/'); cy.getBySel('email-input').type('test@example.com'); cy.getBySel('password-input').type('password');