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:
@@ -78,6 +78,31 @@ Rollback: `orca rollout undo portal --env={{env}}`.
|
||||
|
||||
See [`CONTRIBUTING.md`](./CONTRIBUTING.md). TL;DR: branch from main, open a PR, 1 review + green CI, squash-merge.
|
||||
|
||||
|
||||
|
||||
## End-to-end tests (M5.3)
|
||||
|
||||
Playwright config at `playwright.config.ts`. Tests under `tests/e2e/`.
|
||||
|
||||
```bash
|
||||
make e2e-install # one-time: pnpm exec playwright install chromium
|
||||
# bring up the dev stack + tenant-registry + portal in three separate terminals,
|
||||
# then:
|
||||
make e2e # pnpm playwright test
|
||||
```
|
||||
|
||||
Test groups (filter with `--grep`):
|
||||
|
||||
| File | What it asserts |
|
||||
|---|---|
|
||||
| `tests/e2e/apex.spec.ts` | Apex landing page renders |
|
||||
| `tests/e2e/tenant.spec.ts` | Tenant subdomain serves signed-out dashboard + 404 on unknown slug |
|
||||
| `tests/e2e/health.spec.ts` | The whole dev stack is reachable: portal API, tenant-registry, Keycloak |
|
||||
|
||||
`@needs-stack` in a test title means the dev stack must be running. We don't yet have a full OIDC click-through test — Keycloak in headless mode is flaky, so we assert the gate (Sign-in button visible) rather than completing the login.
|
||||
|
||||
In CI, the e2e job is gated behind the repo variable `RUN_E2E == 'true'` so it stays off until stage exists. Lint / typecheck / build / vitest still run on every PR.
|
||||
|
||||
## License
|
||||
|
||||
Proprietary — all rights reserved. Copyright (c) 2026 Sharang Parnerkar and Benjamin Boenisch. See [`LICENSE`](./LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user