test(mobile): assert the whole reconnect window, not just its first frame

The re-subscribe lands a commit after the first render of the swap, so a
regression that cleared the held list there left frame 0 green and still
blanked the transcript. Verified: clearing the cache in the subscribe
cleanup now fails this test, where before only the view-toggle test caught it.
This commit is contained in:
Brennan Benson
2026-08-04 02:11:13 -07:00
parent 4a4b762f4a
commit 9a3f91cd0e
@@ -350,6 +350,10 @@ describe('useMobileNativeChatSession transcriptLoading', () => {
transcriptLoading: true,
ids: ['a-1']
})
// Every commit of the window, not just the first: the re-subscribe lands a
// commit after it, so clearing the cache there blanks the transcript the
// user actually sees while leaving a first-frame assertion green.
expect([...new Set(renders.map((entry) => entry.ids.join(',')))]).toEqual(['a-1'])
// The fresh client's snapshot supersedes the held list.
await act(async () =>