fix(e2e): robustly fill the login form - it was posting empty credentials (BUNYIP-168) #190

Merged
nrupard merged 1 commit from fix/BUNYIP-168-login-fill-empty into main 2026-06-22 21:21:35 +02:00
Owner

The wire diagnostic showed loginViaHub posting email=len 0 password=len 0 (empty), while the server-rendered hidden redirect field survived: bunyip-web re-renders the input nodes after load (htmx loaded globally), dropping Playwrights JS-set .value before submit. bunyip then rejected the empty login as "incorrect" despite every resolved-input fingerprint matching.\n\nFix: scope to form[action="/login"], fill + verify inputValue() stuck with a short retry loop (waits out the re-render), and re-fill right before submit. fillVerified throws clearly if a value will not persist. Wire diagnostic kept so the next run confirms the POST now carries non-empty creds.\n\ntsc clean; 18 specs collect.\n\n#BUNYIP-168

The wire diagnostic showed loginViaHub posting `email=len 0 password=len 0` (empty), while the server-rendered hidden `redirect` field survived: bunyip-web re-renders the input nodes after load (htmx loaded globally), dropping Playwrights JS-set `.value` before submit. bunyip then rejected the empty login as "incorrect" despite every resolved-input fingerprint matching.\n\nFix: scope to `form[action="/login"]`, fill + verify `inputValue()` stuck with a short retry loop (waits out the re-render), and re-fill right before submit. `fillVerified` throws clearly if a value will not persist. Wire diagnostic kept so the next run confirms the POST now carries non-empty creds.\n\ntsc clean; 18 specs collect.\n\n#BUNYIP-168
fix(e2e): robustly fill the login form (it was posting empty email+password)
Some checks failed
E2E / Playwright against deployment (pull_request) Failing after 43s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m57s
Create release / Create release from merged PR (pull_request) Has been skipped
f24fac8882
The wire diagnostic (BUNYIP-167) showed loginViaHub posting empty credentials: `email=len 0 password=len 0` (sha256 of the empty string), while the server-rendered hidden `redirect` field survived. bunyip-web re-renders the login input nodes shortly after load (htmx is loaded globally), discarding Playwright's JS-set `.value` before submit, so bunyip rejected the (empty) login as "incorrect" - despite every resolved input fingerprint matching.

Fill robustly: scope the locators to the login form (`form[action="/login"]`), fill each field and verify `inputValue()` stuck via a short retry loop (which also waits out the re-render), then re-fill once more immediately before clicking submit. `fillVerified` throws a clear error if a value cannot be made to persist. The wire diagnostic stays so the next run confirms the POST now carries non-empty credentials matching d50a2f6dc207 / the email fingerprint.

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:18:09 +02:00
nrupard deleted branch fix/BUNYIP-168-login-fill-empty 2026-06-22 21:21:36 +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!190
No description provided.