diff --git a/.changeset/itchy-dragons-admire.md b/.changeset/itchy-dragons-admire.md new file mode 100644 index 00000000..69b3c3ae --- /dev/null +++ b/.changeset/itchy-dragons-admire.md @@ -0,0 +1,5 @@ +--- +"@pixeleye/cli-capture": patch +--- + +Disabling playwrights built in wait for font loading diff --git a/integrations/cli/cli-capture/src/capture.ts b/integrations/cli/cli-capture/src/capture.ts index e5b80e01..a21232b4 100644 --- a/integrations/cli/cli-capture/src/capture.ts +++ b/integrations/cli/cli-capture/src/capture.ts @@ -80,8 +80,12 @@ async function internalCaptureScreenshot( await page.goto(data.url, { timeout: 60_000, + waitUntil: "domcontentloaded", }); + // eslint-disable-next-line turbo/no-undeclared-env-vars + process.env["PW_TEST_SCREENSHOT_NO_FONTS_READY"] = "true"; + await (page as Page).addScriptTag({ path: rrwebScript, });