feat(e2e): close PMS-142 - un-fixme the auth-ui login + logout round-trip #112
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pms-142-auth-ui-unfixme"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes PMS-142.
What
The auth-ui browser-driven login + logout round-trip was
test.fixme'd in PMS-140 phase 1 because it flaked. Two observed failure modes are addressed here:SPA form submit not progressing past
/login- bunyip's hub form is HTMX, not WASM, so a hydration race is unlikely on that side. Remaining hypotheses are transient (rate-limit blip, network latency).loginViaSpaitself stays as-is; CI data will tell us whether more is needed.Logout assertion stalling on
/dashboard- root cause is the Dioxus WASM hydration race: the avatar button rendered before its onclick was wired up, so the first click no-op'd. Each click toggles the menu'sopenstate (mokosh-clients/src/components/layout.rs:386), so a subsequent click on the now-hydrated handler opens it. The fix is a click-retry loop inlogout(): after each click, wait for the popuprole="menu"to actually appear; if it doesn't within 3s, click again. Capped at 3 attempts so a genuinely broken SPA fails clearly.Diagnostics
Extracted the URL-trail + request-log pattern that
global.setup.tsalready uses intolib/page-diagnostics.ts. The auth-ui test now wraps both halves of the round-trip in try/catch withattachPageDiagnostics(page).snapshot(...), so future failures name exactly what the SPA did instead of speculating.AC delta
Per the issue's AC: "Two consecutive post-merge CI runs show auth-ui passing on the first attempt (not retry-recovered)." That's an operator-observed quality bar AFTER merge - the workflow itself cannot gate on it. If a clear regression surfaces in the next handful of runs, file a follow-up against PMS-142.
Test plan
logout()flakes again, the new diagnostic dump names URL trail + last 30 requests; iterate from there.