fix: Svelte 5 test event delegation + login auth regression #46
Reference in New Issue
Block a user
Delete Branch "fix/svelte5-test-delegation-and-login-auth"
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?
Summary
.click()dispatches events via the CDP bridge which doesn't trigger Svelte 5's$.delegatedevent handlers. Replaced all affected locator clicks with nativeelement.click()/element.focus()DOM calls. Also added missingcleanup()toafterEachin several spec files, and fixedTagInput.svelteto useuntrack()when reading bindable state after anawait.handleFetchwas short-circuiting with401for any API request without anauth_tokencookie — which blocked the login action itself, since it explicitly sends Basic auth credentials before a cookie exists. Fix: pass requests that already carry anAuthorizationheader straight through to the backend.Test plan
npm run testinfrontend/— all 142 tests should pass/instead of staying on/login?/login