chore(e2e): run Cypress in Chrome; use 127.0.0.1 baseUrl

This commit is contained in:
Kunal
2026-02-07 17:46:47 +00:00
parent cacf6f27df
commit fd2c272824
2 changed files with 4 additions and 4 deletions

View File

@@ -110,9 +110,9 @@ jobs:
CLERK_JWKS_URL: ${{ vars.CLERK_JWKS_URL }} CLERK_JWKS_URL: ${{ vars.CLERK_JWKS_URL }}
run: | run: |
cd frontend cd frontend
npm run dev -- --port 3000 & npm run dev -- --hostname 127.0.0.1 --port 3000 &
for i in {1..60}; do for i in {1..60}; do
if curl -sf http://localhost:3000/ > /dev/null; then exit 0; fi if curl -sf http://127.0.0.1:3000/ > /dev/null; then exit 0; fi
sleep 2 sleep 2
done done
echo "Frontend did not start" echo "Frontend did not start"
@@ -127,4 +127,4 @@ jobs:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
run: | run: |
cd frontend cd frontend
npm run e2e npm run e2e -- --browser chrome

View File

@@ -2,7 +2,7 @@ import { defineConfig } from "cypress";
export default defineConfig({ export default defineConfig({
e2e: { e2e: {
baseUrl: "http://localhost:3000", baseUrl: "http://127.0.0.1:3000",
video: false, video: false,
screenshotOnRunFailure: true, screenshotOnRunFailure: true,
specPattern: "cypress/e2e/**/*.cy.{ts,tsx,js,jsx}", specPattern: "cypress/e2e/**/*.cy.{ts,tsx,js,jsx}",