test(06-05): add failing dead-end AuthSplash test for exhausted redirect guard (D-11)
This commit is contained in:
@@ -217,4 +217,14 @@ describe('CalendarShell — CAL-03 render smoke', () => {
|
|||||||
renderWithClient(<CalendarShell />)
|
renderWithClient(<CalendarShell />)
|
||||||
// Error renders asynchronously after query settles
|
// 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()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user