mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 08:03:28 +00:00
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:
@@ -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 () =>
|
||||
|
||||
Reference in New Issue
Block a user