7b33516686
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
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
// Playwright e2e harness for the portal.
|
|
//
|
|
// Local: assumes the full dev stack is running —
|
|
// 1. cd platform/orca-platform && make dev-up
|
|
// 2. cd platform/tenant-registry && make dev
|
|
// 3. cd platform/portal && make dev
|
|
// 4. cd platform/portal && pnpm e2e
|
|
//
|
|
// Defaults to http://acme.localhost:3000 so subdomain routing fires.
|
|
// Override with PLAYWRIGHT_BASE_URL for stage (once that exists, M5.x+).
|
|
|
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? "http://acme.localhost:3000";
|
|
const apexURL = process.env.PLAYWRIGHT_APEX_URL ?? "http://localhost:3000";
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests/e2e",
|
|
fullyParallel: false, // Hosts share subdomains; serial keeps logs sane.
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
reporter: process.env.CI ? "github" : "list",
|
|
use: {
|
|
baseURL,
|
|
trace: "retain-on-failure",
|
|
screenshot: "only-on-failure",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
// Tag-friendly: tests that need the dev stack alive use `@needs-stack`
|
|
// in their title so we can split fast/slow runs in CI later.
|
|
metadata: {
|
|
apexURL,
|
|
baseURL,
|
|
},
|
|
});
|