From 127f38b7c3969e732403ea2c52a92724ccfd631f Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Sat, 24 Oct 2026 21:54:53 +0800 Subject: [PATCH] test(webui): wait for Markdown before history spring checks --- webui/browser/history-boundary.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webui/browser/history-boundary.spec.ts b/webui/browser/history-boundary.spec.ts index 2bbade887..0553d0d74 100644 --- a/webui/browser/history-boundary.spec.ts +++ b/webui/browser/history-boundary.spec.ts @@ -496,6 +496,9 @@ for (const elapsedMs of [0, 80]) test(`fast responses reclaim completed slots an history.useFastResponse(true); await page.clock.install({ time: new Date("2026-01-01T00:00:00Z") }); const { body, header } = await openSettledHistory(page); + // The lazy plain-text fallback has a different height; measure the spring only after Markdown loads. + await expect(body.getByText("Historical answer.", { exact: true }).first()).toBeVisible(); + await stableLayout(body); await positionAtTop(body); await expect(header).toHaveAttribute("data-state", "ready"); await expect(header).not.toBeInViewport();