Skip to content

test(e2e): reconcile OIDC plumbing specs with Security-API auth UI - #359

Merged
izzywdev merged 1 commit into
masterfrom
fix/oidc-plumbing-e2e-drift
Jul 22, 2026
Merged

test(e2e): reconcile OIDC plumbing specs with Security-API auth UI#359
izzywdev merged 1 commit into
masterfrom
fix/oidc-plumbing-e2e-drift

Conversation

@izzywdev

Copy link
Copy Markdown
Owner

Problem

The "OIDC plumbing (local user, no Google)" CI job fails on master, so every PR inherits the red check (observed on frames-only PR #335 and on #345). The 7 API-level tests pass; 3 browser tests in frontend/tests/oidc-plumbing.e2e.spec.ts assert behaviour the reworked login UI no longer has (auth migrated to FuzeFront's Security API in LoginPage.tsx / api.ts).

Root cause: test drift (no app regression)

Test Was asserting Now
full OIDC via button (L152) clicks Google button → waitForURL(AUTHENTIK_URL/**) The dedicated "Sign in with Authentik" button was removed; the Google button goes to /api/v1/security/social/google/start. In no-Google mode (GOOGLE_CLIENT_ID empty — "inert when empty") a full interactive Authentik round-trip is unreachable.
native form (L199) waitForResponse(/api/auth/oidc/password) Form now posts POST /api/v1/security/session (authAPI.login).
error display (L230) locator(...).toBeVisible() Playwright strict-mode violation — the error renders in 2 elements. App behaviour is correct.

Changes (test-only)

  • Native form test → wait for POST /api/v1/security/session (the endpoint the UI actually calls).
  • Full-OIDC-via-button test → replaced with one asserting the Google button initiates the server-brokered social start (/api/v1/security/social/google/start). The real server-side OIDC token exchange against Authentik stays covered end-to-end by the passing API-level password test; interactive social is covered by the separate tunnel-mode Google e2e. Removed the now-unused fillAuthentikLogin helper.
  • Error-display test.first() to resolve the strict-mode ambiguity (assert the error is shown, not that it's unique).

No app code touched — the behaviour the specs now assert is the current, intended behaviour.

Verification

Authoritative check is the OIDC plumbing job on this PR (it runs the full docker-compose.e2e + Authentik stack). Watching it after open.

🤖 Generated with Claude Code

The "OIDC plumbing (local user, no Google)" job failed on master because
the browser specs drifted from the reworked login UI (migrated to
FuzeFront's Security API). The 7 API-level tests pass; the 3 browser
tests asserted removed behaviour:

- Native credentials form now posts POST /api/v1/security/session
  (authAPI.login), not the old /api/auth/oidc/password. Point the
  waitForResponse at the current endpoint.
- The dedicated "Sign in with Authentik" redirect button was removed;
  the only redirect entry point is the Google button
  (-> /api/v1/security/social/google/start). In no-Google mode
  (empty GOOGLE_CLIENT_ID) a full interactive Authentik round-trip is
  unreachable, so the old full-OIDC-via-button test can't pass. Replace
  it with one asserting the button initiates the server-brokered social
  start. The real server-side OIDC token exchange against Authentik is
  still covered end-to-end by the passing API-level password test, and
  interactive social is covered by the separate tunnel-mode Google e2e.
  Remove the now-unused Authentik login-form helper.
- Error-display test hit a Playwright strict-mode violation (the error
  surfaces in 2 elements); scope the locator to .first().

Test-only change; no app code touched (no regression found — the app
behaviour the specs now assert is the current, intended behaviour).

Co-Authored-By: Claude <claude-opus-4-8> <noreply@anthropic.com>
Claude-Session-Id: a560dedc-819a-4776-bee0-3f8703ae66fe
@izzywdev izzywdev added the auto-merge Enable squash auto-merge once CI passes label Jul 22, 2026
@github-actions
github-actions Bot enabled auto-merge (squash) July 22, 2026 14:44
@github-actions

Copy link
Copy Markdown
Contributor

Automated code review (gate-code-review)

Credit balance is too low

Report-only — this check never blocks merge.

@izzywdev
izzywdev merged commit 9efd9e0 into master Jul 22, 2026
49 checks passed
@izzywdev
izzywdev deleted the fix/oidc-plumbing-e2e-drift branch July 22, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Enable squash auto-merge once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant