From 3ade4ba845373422cd1979c590882edcf545e29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deli-Szab=C3=B3=20S=C3=A1ndor?= Date: Fri, 12 Jul 2024 19:43:27 +0200 Subject: [PATCH] EMA-150 auto test memory optimizing --- dev/testv2/cypress.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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/',