UI Auth Smoke Job (Playwright)
Audience: DevOps and release engineers maintaining the Console CI and Offline Kit pipelines.
The Playwright auth smoke job exercises the Angular Console login flow against a stubbed Authority instance. The spec stubs the runtime configuration at /platform/envsettings.json (and the deprecated /config.json fallback), checks the Authorization Code + PKCE redirect for client stella-ops-ui, and checks that error handling is surfaced when the backend rejects a request. Which CI workflow runs the job was not verified in DOC-2 (2026-09-26).
What the job does
- Builds the UI bundle (or consumes the artifact from the release pipeline).
- Copies the environment stub from
src/config/config.sample.jsoninto the runtime directory asconfig.jsonso the UI can bootstrap without a live gateway. - Runs
npm run test:e2e, which launches Playwright with the auth fixtures undertests/e2e/auth.spec.ts:- Validates that the Sign-in button generates an Authorization Code + PKCE redirect to
https://authority.local/connect/authorize. - Confirms the callback view shows an actionable error when the redirect is missing the pending login state.
- Validates that the Sign-in button generates an Authorization Code + PKCE redirect to
- Publishes JUnit + Playwright traces (retain-on-failure) for troubleshooting.
Pipeline integration notes
- Chromium must already be available (
npx playwright install --with-deps). - Set
PLAYWRIGHT_BASE_URLif the UI serves on a non-default host/port. - For Offline Kit packaging, bundle the Playwright browser cache under
.cache/ms-playwright/so the job runs without network access. - Failures should block release promotion; export the traces to the artifacts tab for debugging.
Source of truth
The smoke test and its fixtures live in the Console (Angular) project:
- Auth spec:
src/Web/StellaOps.Web/tests/e2e/auth.spec.ts - Environment stub:
src/Web/StellaOps.Web/src/config/config.sample.json
