fix(e2e): probe data routes for bearer, merge auth-ui to dodge rate limit #103
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/e2e-spa-bearer-intercept-and-logout"
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
Two follow-up failures from the post-#102 E2E run; both addressed here.
Setup test captured no Bearer header. SPA login completed, URL left
/login, but no/api/v1request withAuthorization: Bearerfired within 20s. The post-login landing route apparently does not hydrate from the API on its own. Three fixes:loginViaSpa, force a navigation to/dashboardthen/tickets(skip the second if the first already produced a token). Either is a safe data-loading route the SPA will fetch against./api/v1request URL. On timeout the error names them so the next failure tells us whether the SPA hits a different API base, a different path, or nothing at all.expect.pollintry/catchso the URL list can be folded into the thrown message (expect.poll'smessageis a static string).Auth-ui logout test could not log in. Per-email login rate limit is 5/min (
src/modules/auth/routes.rs). Run tally on the previous shape: setup × 2 retries (2) + auth-ui test 4 (1) + auth-ui test 5 × 2 retries (2) = 5. The 5th attempt is the one that 429s, leaving the SPA on/login. Merge the two auth-ui tests into a single login + logout round-trip; brings the auth-ui contribution from 1-4 logins down to 1-2 (test body + at most one retry).Test plan
/api/v1URLs the SPA actually fired so the next debug round is precise.