diff --git a/dev/testv2/cypress.config.js b/dev/testv2/cypress.config.js index 9f37e7d..eecbf05 100644 --- a/dev/testv2/cypress.config.js +++ b/dev/testv2/cypress.config.js @@ -15,6 +15,18 @@ module.exports = defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { + on("before:browser:launch", (browser, launchOptions) => { + if (["chrome", "edge"].includes(browser.name)) { + if (browser.isHeadless) { + launchOptions.args.push("--no-sandbox"); + launchOptions.args.push("--disable-gl-drawing-for-tests"); + launchOptions.args.push("--disable-gpu"); + } + launchOptions.args.push("--js-flags=--max-old-space-size=3500"); + } + return launchOptions; + }); + return require('./cypress/plugins/index.js')(on, config); }, baseUrl: 'http://magento-test.local/index.php/default/',