The best way to control Claude Code, Codex and more from any computer or phone
test(web): worked-for expand test waits for the timeline to finish loading (#29661)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Alex Southwell committed
Nov 5, 2026 at 20:21 UTC
53c26b12db4ea1037aef62712906f891fee8e8b7
1 file changed
+5
-3
apps/web/src/components/chat/MessagesTimeline.browser.test.tsx
+5
-3
@@ -240,9 +240,11 @@ describe("MessagesTimeline work rows", () => {
240
// frames, which the fake clock below would freeze.
241
await expect.element(heading).toHaveStyle({ pointerEvents: "auto" });
242
const viewport = props.listRef.current!.getScrollableNode()!;
243
- await vi.waitFor(() =>
244
- expect(viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop).toBeLessThan(2),
245
- );
243
+ // Legend keeps rows transparent and unclickable until its initial scroll settles.
244
+ await vi.waitFor(() => {
245
+ expect(viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop).toBeLessThan(2);
246
+ expect(heading.element().checkVisibility({ opacityProperty: true })).toBe(true);
247
+ });
248
expect(viewport.scrollTop).toBeGreaterThan(0);
249
const top = heading.element().getBoundingClientRect().top;
250
const height = viewport.scrollHeight;