fix(e2e): settle hub login form before fill + URL-based 2FA advance signal #409
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-595-chromium-credential-resubmit-settle"
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 PMS-592 chromium credential race fix verified the typed values survived right before the submit click, but run 2874 still failed the same way: on chromium the hub's server-rendered login form re-renders (hydration / htmx swap) in the window between the click and the POST being serialised, so the body went out empty, the hub bounced back to a fresh
/login, and re-filling into a form that was itself mid-re-render lost the next attempt identically. firefox/webkit win the race and pass.Two changes close the race in
submitCredentials. First, settle the form before each fill: drain in-flight network from the hydration/swap on a short 3s budget, then give a synchronous client re-render one 300ms frame to land, so we type into the form the hub will actually submit rather than one a frame from being replaced. Second, treat the credential step as consumed on EITHER the password field detaching OR the URL advancing into/login/2fa, raced so it only resolves true on success and false at the per-signal timeout; on chromium the post-submit DOM teardown and the navigation do not always land in the same order, so a single DOM-only signal flapped. Bumped the retry budget from 3 to 4 for a little margin now that each attempt converges.tsc --noEmit and
just checkboth green; the chromium form-validation e2e can only be exercised by the CI run against staging.#PMS-595