Skip to content

Commit 4bfe52a

Browse files
committed
test(web): keep the work heading test inside the viewport
1 parent 647bd14 commit 4bfe52a

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
@@ -221,7 +221,9 @@ describe("MessagesTimeline work rows", () => {
221221
const props = baseProps();
222222
const runId = RunId.make("completed-run");
223223
const container = document.createElement("div");
224-
container.style.cssText = "height: 600px; width: 900px; display: flex; flex-direction: column;";
224+
// Keep the heading on screen so Playwright does not scroll it before clicking.
225+
container.style.cssText =
226+
"height: min(600px, 100vh); width: 900px; display: flex; flex-direction: column;";
225227
await using screen = await render(
226228
<MessagesTimeline
227229
{...props}

0 commit comments

Comments
 (0)