test(web): await streamed text before snapshot

This commit is contained in:
imccyu 2026-09-01 22:36:05 +08:00
parent 0e90d47d19
commit 9ef0e28000

View file

@ -158,6 +158,9 @@ describe('web e2e: live-turn interactions (cancel / error / retry)', () => {
() => page.getByRole('status').filter({ hasText: 'Deep diving...' }).isVisible(),
{ timeout: 10_000 },
).toBe(true)
await page.locator('[data-streaming="true"]')
.getByText('partial', { exact: true })
.waitFor({ timeout: 30_000 })
const loadingSnapshot = await captureStableAria(page, '[class*="centerCol"]', scaffold!.workspaceCwd)
await compareOrRefreshGolden(LOADING_EXPECTED, loadingSnapshot, MODE)