diff --git a/capture/engine_scripts/puppet/clickAndHoverHelper.js b/capture/engine_scripts/puppet/clickAndHoverHelper.js index d848fcfe4..703d3b89b 100644 --- a/capture/engine_scripts/puppet/clickAndHoverHelper.js +++ b/capture/engine_scripts/puppet/clickAndHoverHelper.js @@ -27,7 +27,9 @@ module.exports = async (page, scenario) => { } if (postInteractionWait) { - await page.waitForTimeout(postInteractionWait); + await new Promise(resolve => { + setTimeout(resolve, postInteractionWait); + }); } if (scrollToSelector) { diff --git a/core/util/runPuppet.js b/core/util/runPuppet.js index 5b3c7491f..5c5ef7f87 100644 --- a/core/util/runPuppet.js +++ b/core/util/runPuppet.js @@ -175,7 +175,9 @@ async function processScenarioView (scenario, variantOrScenarioLabelSafe, scenar // --- DELAY --- if (scenario.delay > 0) { - await page.waitForTimeout(scenario.delay); + await new Promise(resolve => { + setTimeout(resolve, scenario.delay); + }); } // --- REMOVE SELECTORS --- diff --git a/examples/Jenkins/Sample/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js b/examples/Jenkins/Sample/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js index 75e7bf287..14c193009 100644 --- a/examples/Jenkins/Sample/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js +++ b/examples/Jenkins/Sample/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js @@ -14,6 +14,8 @@ module.exports = async (page, scenario) => { } if (postInteractionWait) { - await page.waitForTimeout(postInteractionWait); + await new Promise(resolve => { + setTimeout(resolve, postInteractionWait); + }); } }; diff --git a/examples/responsiveDemo/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js b/examples/responsiveDemo/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js index f89824e02..3a2a3aa73 100644 --- a/examples/responsiveDemo/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js +++ b/examples/responsiveDemo/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js @@ -19,7 +19,9 @@ module.exports = async (page, scenario) => { } if (postInteractionWait) { - await page.waitForTimeout(postInteractionWait); + await new Promise(resolve => { + setTimeout(resolve, postInteractionWait); + }); } if (scrollToSelector) { diff --git a/test/configs/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js b/test/configs/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js index 670daa098..ff79379fa 100644 --- a/test/configs/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js +++ b/test/configs/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js @@ -23,7 +23,9 @@ module.exports = async (page, scenario) => { } if (postInteractionWait) { - await page.waitForTimeout(postInteractionWait); + await new Promise(resolve => { + setTimeout(resolve, postInteractionWait); + }); } if (scrollToSelector) {