From 73708c8e7da3eade25c30882eda51f0d1dacf46f Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Fri, 4 Dec 2026 21:16:53 +0800 Subject: [PATCH] test(e2e): wait for editor session stream before zooming in agentMarkdown (#8045) --- e2e/agentMarkdown.spec.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/e2e/agentMarkdown.spec.ts b/e2e/agentMarkdown.spec.ts index 9cb3f6bc98..2a221ffef7 100644 --- a/e2e/agentMarkdown.spec.ts +++ b/e2e/agentMarkdown.spec.ts @@ -831,20 +831,22 @@ test("keeps ordered, bulleted and task list markers unclipped inside measured ro await openReply(page, `## Feature Gaps\n\n${numbered}\n\n- [x] Checked task\n- [ ] Open task`); await page.evaluate(async (task) => { const storePath = "/src/features/agents/store.ts"; - const actionsPath = "/src/platform/actions.ts"; const store = await import(storePath); - const { executeAction } = await import(actionsPath); store.openTaskInEditorLocation(task.id); - await new Promise((r) => setTimeout(r, 150)); - const stream = document.querySelector("[class*='_stream_']"); - stream?.focus(); - for (let i = 0; i < 12; i++) await executeAction("editor.increaseFontSize"); }, TASK); - const stream = page.locator("[class*='_stream_']:visible"); + const stream = page.locator("[class*='_session_']:not([class*='_docked_']) [class*='_stream_']:visible"); const row = stream.locator("[class*='_conversationRow_'][data-measured]", { has: page.locator("ol") }); await expect(row).toBeVisible(); + await stream.focus(); + await page.evaluate(async () => { + const actionsPath = "/src/platform/actions.ts"; + const { executeAction } = await import(actionsPath); + for (let i = 0; i < 12; i++) await executeAction("editor.increaseFontSize"); + }); + await expect(stream).toHaveCSS("font-size", "25px"); + const bounds = await row.evaluate((rowEl) => { const rowLeft = rowEl.getBoundingClientRect().left; const items = [...rowEl.querySelectorAll("ol > li, ul > li")];