From 388402b834d723b72cf96c4c7f874183d20e3b5c Mon Sep 17 00:00:00 2001 From: Kunal Date: Sat, 7 Feb 2026 19:02:17 +0000 Subject: [PATCH] fix(e2e): keep localhost baseUrl; bind dev server to 0.0.0.0 --- .github/workflows/ci.yml | 8 ++------ frontend/cypress.config.ts | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56eaaf96..1f6c3827 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,9 +110,9 @@ jobs: CLERK_JWKS_URL: ${{ vars.CLERK_JWKS_URL }} run: | cd frontend - npm run dev -- --hostname 127.0.0.1 --port 3000 & + npm run dev -- --hostname 0.0.0.0 --port 3000 & for i in {1..60}; do - if curl -sf http://127.0.0.1:3000/ > /dev/null; then exit 0; fi + if curl -sf http://localhost:3000/ > /dev/null; then exit 0; fi sleep 2 done echo "Frontend did not start" @@ -121,10 +121,6 @@ jobs: - name: Run Cypress E2E env: NEXT_TELEMETRY_DISABLED: "1" - # Prefer IPv4 to avoid localhost -> ::1 issues when Next binds only to 127.0.0.1. - NODE_OPTIONS: "--dns-result-order=ipv4first" - # Force Cypress to use 127.0.0.1 as baseUrl (Cypress only auto-loads CYPRESS_* into Cypress.env()). - CYPRESS_baseUrl: "http://127.0.0.1:3000" # Vars for shared Clerk OTP helper (frontend/cypress/support/commands.ts) CYPRESS_CLERK_ORIGIN: ${{ vars.CYPRESS_CLERK_ORIGIN }} CYPRESS_CLERK_TEST_EMAIL: ${{ vars.CYPRESS_CLERK_TEST_EMAIL }} diff --git a/frontend/cypress.config.ts b/frontend/cypress.config.ts index ba594bed..377f873a 100644 --- a/frontend/cypress.config.ts +++ b/frontend/cypress.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "cypress"; export default defineConfig({ e2e: { - baseUrl: "http://127.0.0.1:3000", + baseUrl: "http://localhost:3000", video: false, screenshotOnRunFailure: true, specPattern: "cypress/e2e/**/*.cy.{ts,tsx,js,jsx}",