feat(test): M5.3 — Playwright e2e harness for the dev stack
Adds the M5.3 deliverable scoped to local-dev (stage doesn't exist yet,
so the CI e2e job is gated behind the repo variable RUN_E2E='true' —
defaults off).
Layout:
playwright.config.ts chromium project; baseURL defaults to
http://acme.localhost:3000 (subdomain routing
fires). PLAYWRIGHT_BASE_URL / APEX_URL / etc.
env vars override for stage.
tests/e2e/apex.spec.ts landing page renders
tests/e2e/tenant.spec.ts signed-out dashboard shows Sign in
button; unknown slug returns 404
tests/e2e/health.spec.ts every dev-stack endpoint reachable
(portal /api/auth/providers, tenant-
registry /healthz, KC realm metadata)
Run locally with the full dev stack up:
cd platform/orca-platform && make dev-up
cd platform/tenant-registry && make dev
cd platform/portal && make dev
cd platform/portal && make e2e
OIDC click-through not asserted yet — Keycloak in headless mode is
flaky and depends on a stable test-user password. The current gate
(Sign-in button visible) catches the more common 'auth completely
broken' regression; the deeper smoke lands when stage has its own
test fixture.
tsconfig now excludes tests/e2e so vitest + tsc don't fight over
Playwright type imports.
Refs: M5.3
This commit is contained in:
@@ -87,7 +87,11 @@ jobs:
|
||||
e2e:
|
||||
needs: test
|
||||
runs-on: docker
|
||||
if: hashFiles('playwright.config.ts','playwright.config.js') != '' && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
# Two gates: playwright.config.ts must exist + the repo variable
|
||||
# RUN_E2E must be 'true'. Until stage.breakpilot.com is up (M1.2 +
|
||||
# M0.3), the e2e job is opt-in. Locally, devs run `make e2e` against
|
||||
# their own dev stack.
|
||||
if: hashFiles('playwright.config.ts','playwright.config.js') != '' && github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.RUN_E2E == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
@@ -98,7 +102,8 @@ jobs:
|
||||
- run: pnpm exec playwright install --with-deps chromium
|
||||
- run: pnpm e2e
|
||||
env:
|
||||
PLAYWRIGHT_BASE_URL: https://stage.breakpilot.com
|
||||
PLAYWRIGHT_BASE_URL: ${{ vars.STAGE_PORTAL_BASE_URL }}
|
||||
PLAYWRIGHT_APEX_URL: ${{ vars.STAGE_PORTAL_APEX_URL }}
|
||||
PLAYWRIGHT_TEST_USER: ${{ secrets.STAGE_TEST_USER }}
|
||||
PLAYWRIGHT_TEST_PASS: ${{ secrets.STAGE_TEST_PASS }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user