import { expect, test } from "@playwright/test"
import { ROOT_ID } from "./constants"
const { setupConsoleAfterEach, setupConsoleBeforeEach } =
const exampleSelector = `#${ROOT_ID} > canvas`
test.beforeEach(async ({ page }, testInfo) => {
setupConsoleBeforeEach(page)
test.setTimeout(testInfo.timeout + 2 * 60 * 1000)
`${storybookBaseURL}?path=/story/threejs-reflective-spheres--common`
const frame = await getFrame(page)
await frame.waitForSelector(exampleSelector)
test.afterEach(setupConsoleAfterEach)
test("The canvas is present", async ({ page }) => {
const frame = await getFrame(page)
await expect(frame.locator(exampleSelector)).toHaveCount(1)