fix(e2e): block the SSE reload that wipes the login form (BUNYIP-168) #191

Merged
nrupard merged 1 commit from fix/BUNYIP-168-block-sse-reload into main 2026-06-22 21:35:27 +02:00
Owner

The robust fill proved the values never stick. Root cause: bunyip-web mounts an SSE reload subscriber on EVERY page (layout.rs SSE_SUBSCRIBER) - an EventSource to /v1/events that window.location.reload()s on claims_changed/profile_changed/applications_changed/resync. On /login that reload fires right after load and wipes the filled form, so the POST went out empty and bunyip correctly said "incorrect". The secrets were right all along.\n\nblockLiveReload(page) = page.route("**/v1/events", abort) stops the EventSource connecting, so no reloads. Called in loginViaHub (setup + auth-ui) and a beforeEach of the runnable account-ui specs (profile/sessions/memberships). fillVerified stays as a guard.\n\ntsc clean; 18 specs collect.\n\n#BUNYIP-168

The robust fill proved the values never stick. Root cause: bunyip-web mounts an SSE reload subscriber on EVERY page (layout.rs SSE_SUBSCRIBER) - an EventSource to /v1/events that `window.location.reload()`s on claims_changed/profile_changed/applications_changed/resync. On /login that reload fires right after load and wipes the filled form, so the POST went out empty and bunyip correctly said "incorrect". The secrets were right all along.\n\n`blockLiveReload(page)` = `page.route("**/v1/events", abort)` stops the EventSource connecting, so no reloads. Called in loginViaHub (setup + auth-ui) and a beforeEach of the runnable account-ui specs (profile/sessions/memberships). fillVerified stays as a guard.\n\ntsc clean; 18 specs collect.\n\n#BUNYIP-168
fix(e2e): block the SSE reload that wipes the login form (the real root cause)
Some checks failed
E2E / Playwright against deployment (pull_request) Failing after 53s
Check / fmt + clippy + build + tests (pull_request) Successful in 6m4s
Create release / Create release from merged PR (pull_request) Has been skipped
2ee03b81aa
The robust fill (BUNYIP-168) correctly proved the values never stick: bunyip-web mounts an SSE reload subscriber on EVERY page (bunyip-web/src/views/layout.rs SSE_SUBSCRIBER) - an EventSource to /v1/events that calls window.location.reload() on claims_changed / profile_changed / applications_changed / resync. On the login page that reload fires right after load and wipes the just-filled form, so the POST went out with empty email+password and bunyip correctly returned "incorrect". Every secret was right the whole time.

Add blockLiveReload(page) = page.route('**/v1/events', abort), so the EventSource never connects and the page stops reloading. Call it at the top of loginViaHub (covers setup + auth-ui) and in a beforeEach of the runnable account-ui specs (profile, sessions, memberships), which navigate authenticated pages carrying the same subscriber. The suite needs no live reloads. fillVerified stays as a guard.

tsc --noEmit clean; all 18 specs collect.

#BUNYIP-168

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard scheduled this pull request to auto merge when all checks succeed 2026-06-22 21:31:03 +02:00
nrupard deleted branch fix/BUNYIP-168-block-sse-reload 2026-06-22 21:35:27 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!191
No description provided.