test(e2e): wait for editor session stream before zooming in agentMarkdown (#8045)

Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-12-04 21:16:53 +08:00
1 джерело d2cc2093b1
коміт 73708c8e7d
1 file changed
+9 -7
+9 -7
Переглянути файл
@@ -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<HTMLElement>("[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<HTMLElement>("ol > li, ul > li")];