[E2E P4] Authenticated core journeys #316

Open
opened 2026-07-01 21:17:10 +00:00 by spikerj · 3 comments
Owner

Phase P4 of epic #307. Depends on P3's verified-user fixture (or a seeded Keycloak test user + storage-state).

  • Login/logout round-trip through Keycloak; storage-state reuse across specs
  • /profile (including unsavedChangesGuard behavior)
  • /reading-journey + /reader/:bookId (needs ReadingInterestGuard satisfied)
  • /calendar create/edit/delete event
  • /chat, /ai interactions
  • Lessons + code playgrounds (run code round-trip through coderunner)
  • /blog/create, /fundraisers, /info-vault, /tracker
  • Auth-gated games load (/space-game, /hexatile-game, …)
  • Marks (/mark/customer, /mark/map)
Phase P4 of epic #307. Depends on P3's verified-user fixture (or a seeded Keycloak test user + storage-state). - [ ] Login/logout round-trip through Keycloak; storage-state reuse across specs - [ ] `/profile` (including unsavedChangesGuard behavior) - [ ] `/reading-journey` + `/reader/:bookId` (needs ReadingInterestGuard satisfied) - [ ] `/calendar` create/edit/delete event - [ ] `/chat`, `/ai` interactions - [ ] Lessons + code playgrounds (run code round-trip through coderunner) - [ ] `/blog/create`, `/fundraisers`, `/info-vault`, `/tracker` - [ ] Auth-gated games load (`/space-game`, `/hexatile-game`, …) - [ ] Marks (`/mark/customer`, `/mark/map`)
spikerj added the enhancement label 2026-07-01 21:17:10 +00:00
Author
Owner

Progress — angular PR #107 (authenticated-suite foundation)

  • Storage-state login fixtureauth-setup Playwright project performs one real Keycloak UI login (ids.spikersoft.com, spikersoft realm) and persists the SSO cookies; the authenticated project starts every spec from that state via check-sso silent SSO. Credential-gated: without E2E_USER_USERNAME/E2E_USER_PASSWORD everything self-skips, so the credential-less CI job is untouched.
  • Authenticated walk spec — all 38 walkable auth routes + the 9 auth-gated tools deferred from P1 (language playgrounds incl. regex/sql/x86, git-playground). Exclusions with reasons in AUTH_WALK_EXCLUDED_PATHS (/video-call → own spec; /keycloak-admin → P6/#340).
  • Coverage reporter counts auth surfaces as walked only when creds are configured — with them active, route coverage goes 32% → ~72%.

Blocked on: a seeded test user in the live spikersoft realm (live-is-test). Registration self-serve is blocked by the P3 SMS hook, so the account needs to be created via Keycloak admin. Once creds land in .env.e2e (and later a CI secret for a nightly authenticated job), the first real run + console-noise triage is next, then the per-journey specs (profile/unsavedChangesGuard, calendar CRUD, chat/ai, reading journey, playground run round-trip).

### Progress — angular PR #107 (authenticated-suite foundation) - [x] **Storage-state login fixture** — `auth-setup` Playwright project performs one real Keycloak UI login (ids.spikersoft.com, `spikersoft` realm) and persists the SSO cookies; the `authenticated` project starts every spec from that state via `check-sso` silent SSO. Credential-gated: without `E2E_USER_USERNAME`/`E2E_USER_PASSWORD` everything self-skips, so the credential-less CI job is untouched. - [x] **Authenticated walk spec** — all 38 walkable auth routes + the 9 auth-gated tools deferred from P1 (language playgrounds incl. regex/sql/x86, git-playground). Exclusions with reasons in `AUTH_WALK_EXCLUDED_PATHS` (`/video-call` → own spec; `/keycloak-admin` → P6/#340). - [x] Coverage reporter counts auth surfaces as walked only when creds are configured — with them active, route coverage goes 32% → ~72%. **Blocked on:** a seeded test user in the live `spikersoft` realm (live-is-test). Registration self-serve is blocked by the P3 SMS hook, so the account needs to be created via Keycloak admin. Once creds land in `.env.e2e` (and later a CI secret for a nightly authenticated job), the first real run + console-noise triage is next, then the per-journey specs (profile/unsavedChangesGuard, calendar CRUD, chat/ai, reading journey, playground run round-trip).
Author
Owner

Test accounts seeded and the first credentialed run attempted:

  • Created e2e.student (default roles) and e2e.staff (has staff realm role) directly via the Keycloak Admin API; credentials in spikersoft-angular/.env.e2e. Both verified valid via direct grant against spikersoft-web.
  • Ran auth-setup: Keycloak login succeeds, but the authenticated app crashes on bootstrap with NG0200 (circular DI) — blank shell, no toolbar/user-menu — so storage-state can't be captured. Filed as #345 (blocks all authenticated phases).

P4 is unblocked on the credentials front but now blocked on #345. Once that's fixed the walk should run without further setup (the fixture, projects, and manifest are already in place).

Test accounts seeded and the first credentialed run attempted: - Created `e2e.student` (default roles) and `e2e.staff` (has `staff` realm role) directly via the Keycloak Admin API; credentials in `spikersoft-angular/.env.e2e`. Both verified valid via direct grant against `spikersoft-web`. - Ran `auth-setup`: Keycloak login succeeds, but the authenticated app **crashes on bootstrap with NG0200 (circular DI)** — blank shell, no toolbar/user-menu — so storage-state can't be captured. Filed as **#345** (blocks all authenticated phases). P4 is unblocked on the *credentials* front but now blocked on #345. Once that's fixed the walk should run without further setup (the fixture, projects, and manifest are already in place).
Author
Owner

Board-sweep status (2026-07-22): P4 foundation merged (storage-state login + auth walk, nightly CI). REMAINING: NG0200 bootstrap-crash blocker + most of the journey checklist (calendar CRUD, chat/ai, playground round-trips).

Board-sweep status (2026-07-22): P4 foundation merged (storage-state login + auth walk, nightly CI). REMAINING: NG0200 bootstrap-crash blocker + most of the journey checklist (calendar CRUD, chat/ai, playground round-trips).
Sign in to join this conversation.