test(ui): stabilize browser initialization checks (#110403)

This commit is contained in:
xingzhou
2026-07-18 07:10:47 +01:00
committed by GitHub
parent 3a570e70aa
commit ab99029b3b
2 changed files with 13 additions and 4 deletions
@@ -632,7 +632,10 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => {
},
],
});
await page.goto(`${realChatServer.baseUrl}chat`);
await page.goto(`${realChatServer.baseUrl}chat`, {
waitUntil: "domcontentloaded",
timeout: APP_FIRST_RENDER_TIMEOUT_MS,
});
await page
.getByText("Context hover regression fixture.")
.waitFor({ timeout: APP_FIRST_RENDER_TIMEOUT_MS });
@@ -711,7 +714,10 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => {
},
],
});
await page.goto(`${realChatServer.baseUrl}chat`);
await page.goto(`${realChatServer.baseUrl}chat`, {
waitUntil: "domcontentloaded",
timeout: APP_FIRST_RENDER_TIMEOUT_MS,
});
const image = page.locator("img.chat-message-image");
const video = page.locator("video");
@@ -1908,7 +1914,10 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => {
},
],
});
await page.goto(`${realChatServer.baseUrl}chat`);
await page.goto(`${realChatServer.baseUrl}chat`, {
waitUntil: "domcontentloaded",
timeout: APP_FIRST_RENDER_TIMEOUT_MS,
});
await page
.getByText("Short landscape slash command keyboard regression fixture.")
.waitFor({ timeout: APP_FIRST_RENDER_TIMEOUT_MS });
@@ -50,7 +50,7 @@ async function mountFile(content: FileSidebarContent): Promise<DetailPanel> {
document.body.append(panel);
mounted.push(panel);
await panel.updateComplete;
await expect.poll(() => panel.querySelector(".cm-editor")).not.toBeNull();
await expect.poll(() => panel.querySelector(".cm-editor"), { timeout: 5_000 }).not.toBeNull();
return panel;
}