mirror of
https://github.com/Effect-TS/effect.git
synced 2026-12-04 03:35:36 +08:00
Wait for the devtools frame to collapse before sampling cursors in check-pause
This commit is contained in:
@@ -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)) ===
|
||||
|
||||
Reference in New Issue
Block a user