test(06-05): add failing dead-end AuthSplash test for exhausted redirect guard (D-11)

This commit is contained in:
Lucas Berger
2026-06-10 15:53:55 -04:00
parent 6dbb1664ff
commit 36ef7a00b7
@@ -217,4 +217,14 @@ describe('CalendarShell — CAL-03 render smoke', () => {
renderWithClient(<CalendarShell />)
// Error renders asynchronously after query settles
})
it('renders dead-end AuthSplash when redirect guard is already exhausted (D-11)', async () => {
// Simulate the one-shot guard having already fired (prior redirect attempt)
sessionStorage.setItem('familysync.loginRedirectAttempted', '1')
;(fetchMe as Mock).mockRejectedValue(new Error('401'))
renderWithClient(<CalendarShell />)
// After the auth error and the guard is exhausted, dead-end copy must be visible
const tapToRetry = await screen.findByText(/Tap here to try again/i)
expect(tapToRetry).toBeDefined()
})
})