fix(e2e): block the SSE reload that wipes the login form (BUNYIP-168) #191
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-168-block-sse-reload"
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?
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-168The 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>