Repository navigation
test(members): wait for the gone-member redirect before asserting the URL - #13123
iamwhatever merged 1 commit into
Conversation
… URL The 'gone member with NOTHING remembered' test read the router location synchronously right after the roster notice rendered, but the return to /members is a navigate() issued from an effect once the roster has loaded. On a slow runner the notice renders a tick before that effect runs and the assertion sees /members?member=ghost (kirodotdev#13107). Wait for the URL with waitFor, as the file's other redirect assertions already do. Closes kirodotdev#13107
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 252557e |
UX Review (Fable 5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. Test-only change: one URL assertion in [UX-REVIEWED] 252557e |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed |
… URL (kirodotdev#13123) The 'gone member with NOTHING remembered' test read the router location synchronously right after the roster notice rendered, but the return to /members is a navigate() issued from an effect once the roster has loaded. On a slow runner the notice renders a tick before that effect runs and the assertion sees /members?member=ghost (kirodotdev#13107). Wait for the URL with waitFor, as the file's other redirect assertions already do. Closes kirodotdev#13107
Problem / Motivation
website/src/pages/members/MembersPage.test.tsx › a URL naming a gone member with NOTHING remembered returns to the roster and SAYS soflakes onFrontend Tests (4)(#13107):expected '/members?member=ghost' to be '/members'.Why it matters
A red frontend shard on a PR that never touched the Members page; on a fork PR the re-roll also costs a maintainer another workflow release. #11827 hit it once today; the shard was green on the two previous heads and on main.
What changed
Symptom: URL still carries
?member=ghostwhen read → root cause: the test reads the router location synchronously right after the roster notice renders, but the return to/membersis anavigate()issued from an effect once the roster has loaded, so on a slow runner the notice can render a tick before that effect has run → change:await waitFor(() => expect(currentUrl()).toBe('/members')), the same form the file's three other redirect assertions already use. Test-only; no component code touched.Backwards compatibility
Compatible: test-only change.
Tests
The changed test file (
MembersPage.test.tsx, 124 pass locally). The assertion still fails if the page does not return to/memberswithin the waitFor budget.Manual verification
N/A — unit coverage sufficient; the only change is when the URL is read.
Screenshots / video
N/A — no UI change.
Closes #13107