E2E: remove Clerk bypass and sign in via Clerk in Cypress

This commit is contained in:
abhi1693
2026-02-07 17:01:00 +00:00
committed by Kunal
parent c4a5d8dd48
commit ecee7ecaf5
4 changed files with 42 additions and 19 deletions

View File

@@ -99,18 +99,29 @@ jobs:
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Cypress run
uses: cypress-io/github-action@v6
with:
working-directory: frontend
install-command: npm ci
build: npm run build
# Bind to loopback to avoid CI network flakiness.
start: npm start -- -H 127.0.0.1 -p 3000
wait-on: http://127.0.0.1:3000
command: npm run e2e
browser: chrome
- name: Install frontend dependencies
run: make frontend-sync
- name: Start frontend (dev server)
env:
NEXT_TELEMETRY_DISABLED: "1"
# Force Clerk disabled in E2E to keep tests secretless/deterministic.
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ""
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
CLERK_JWKS_URL: ${{ vars.CLERK_JWKS_URL }}
run: |
cd frontend
npm run dev -- --port 3000 &
for i in {1..60}; do
if curl -sf http://localhost:3000/ > /dev/null; then exit 0; fi
sleep 2
done
echo "Frontend did not start"
exit 1
- name: Run Cypress E2E
env:
NEXT_TELEMETRY_DISABLED: "1"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
run: |
cd frontend
npm run e2e