Wait for the devtools frame to collapse before sampling cursors in check-pause

This commit is contained in:
Effect Bot
2026-12-01 14:24:44 +00:00
parent 4641c9c7f7
commit 047ca5d2cd
@@ -123,6 +123,13 @@ await run("pause", async ({ browser, expect, failures, url }) => {
await frame.getByRole("button", { name: "Close the inspector" }).click()
await frame.getByRole("button", { name: "Open the Effect UI inspector" })
.waitFor()
// The frame shrinks to the launcher on the next rendering update.
await page.waitForFunction(() => {
const frame = document.querySelector("iframe[data-effect-ui-devtools]")
const root = frame.contentDocument.getElementById("root")
return frame.offsetWidth === root.offsetWidth &&
frame.offsetHeight === root.offsetHeight
})
const collapsed = await scene(page)
expect(
JSON.stringify(collapsed.cursors.slice(0, 3)) ===