Skip to content

Commit d3c0251

Browse files
test(web): worked-for heading test clicks once the list is revealed
The test installed fake timers (requestAnimationFrame included) before LegendList finished its initial scroll, so readyToRender never flipped and the rows stayed pointer-events: none. The click then hit legend-list-content-container until it timed out. Wait for the heading's computed pointer-events to be auto before freezing the clock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a104909 commit d3c0251

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/components/chat/MessagesTimeline.browser.test.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ describe("MessagesTimeline work rows", () => {
236236
{ container },
237237
);
238238
const heading = screen.getByRole("button", { name: /^Worked for/ });
239-
await expect.element(heading).toBeVisible();
239+
// LegendList keeps rows click-through until its initial scroll settles on animation
240+
// frames, which the fake clock below would freeze.
241+
await expect.element(heading).toHaveStyle({ pointerEvents: "auto" });
240242
const viewport = props.listRef.current!.getScrollableNode()!;
241243
await vi.waitFor(() =>
242244
expect(viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop).toBeLessThan(2),

0 commit comments

Comments
 (0)