test(e2e): stop setInputValue hanging when BUNYIP-331 auto-submit detaches the input #325
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/bunyip!325
Loading…
Reference in a new issue
No description provided.
Delete branch "test/BUNYIP-331-setinputvalue-tolerate-detach"
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?
PR #324 CI failed at
login.ts:186 setInputValueinsidefillTotpStep:Test timeout of 180000ms exceededwaiting for the TOTP#codeinput's value readback. Root cause is a race between our write and the BUNYIP-331 six-digit auto-submit that landed on 2026-07-02 (ec861f5). Theevaluateblock dispatches the bubblinginputevent that the OTP snippet reacts to; the snippet callsform.requestSubmit()on the same event tick, so by the time we reachawait loc.inputValue()on the next line the input has already detached from the DOM as the page navigates off/login/2fa. Playwright's default action timeout (180s) then burns waiting for the input to re-attach on a page that has moved on to/dashboard.Fix: bound the readback to a short 500ms poll and treat "input is gone" the same as "value stuck" - return successfully. If we managed to run
evaluateat all, the write took; a detach on the very next microtask means the form has already auto-submitted, not that we failed to fill. The 5-attempt retry loop remains honest for the email + password fields (no auto-submit, so a persistent wrong value keeps retrying). Long detach OR five persistent wrong-value attempts still throws with the current length.The
fillTotpSteppost-fillwaitForURL(!/\/login\/(2fa|mfa)/)(login.ts:240) and the fallback button click stay as-is; those already handle the auto-submit correctly at the caller level.#BUNYIP-331