From 9963203bb0081fb73e86f7224e0976b2f1a3532a Mon Sep 17 00:00:00 2001 From: Neycho Kalaydzhiev Date: Thu, 22 Jun 2023 15:20:12 +0300 Subject: [PATCH] potential fix for puppet warning --- core/util/runPlaywright.js | 4 +++- core/util/runPuppet.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/util/runPlaywright.js b/core/util/runPlaywright.js index 3018bae24..200728004 100644 --- a/core/util/runPlaywright.js +++ b/core/util/runPlaywright.js @@ -33,10 +33,12 @@ module.exports.createPlaywrightBrowser = async function (config) { return; } + const headless = typeof config.debugWindow === "string" ? config.debugWindow : !config.debugWindow; + const playwrightArgs = Object.assign( {}, { - headless: !config.debugWindow + headless: headless }, config.engineOptions ); diff --git a/core/util/runPuppet.js b/core/util/runPuppet.js index d513fa918..a7b147b6c 100644 --- a/core/util/runPuppet.js +++ b/core/util/runPuppet.js @@ -67,11 +67,13 @@ async function processScenarioView (scenario, variantOrScenarioLabelSafe, scenar const VP_W = viewport.width || viewport.viewport.width; const VP_H = viewport.height || viewport.viewport.height; + const headless = typeof config.debugWindow === "string" ? config.debugWindow : !config.debugWindow; + const puppeteerArgs = Object.assign( {}, { ignoreHTTPSErrors: true, - headless: !config.debugWindow + headless: headless }, config.engineOptions );