Skip to content

Commit 9cbc9a2

Browse files
t3dotggclaude
andcommitted
test(web): minimap next-turn test releases Legend's end anchor before the resize
The test nudged the viewport 30px off the bottom, which still counts as the end for LegendList, so the initial end anchor stayed armed. When the test then shrank the viewport, Legend re-pinned it to the bottom and the "bottom moves away" assertion saw 0. Scroll to the top first so Legend releases the anchor. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e5b0718 commit 9cbc9a2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ describe("MessagesTimeline messages", () => {
498498

499499
viewport.scrollTop -= 30;
500500
await vi.waitFor(() => expect(screen.button("Next turn")).not.toBeDisabled());
501+
// Legend keeps its initial end anchor until a scroll leaves the end, and re-pins on resize.
502+
viewport.scrollTop = 0;
503+
await vi.waitFor(() => expect(strips()[0]?.dataset.inView).toBe("true"));
501504

502505
// Shrinking a detached viewport moves the bottom away without a scroll event.
503506
await screen.rerender(

0 commit comments

Comments
 (0)