diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index 62e1687..c0e329e 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -21,5 +21,13 @@ const webpackOptions = require('../webpack.config.js'); // eslint-disable-next-line no-unused-vars module.exports = (on, config) => { on('file:preprocessor', webpackPreprocessor({ webpackOptions })); + + on('before:browser:launch', (browser = {}, launchOptions) => { + if (browser.name == 'chrome') { + launchOptions.args.push('--disable-gpu'); + } + return launchOptions; + }); + return config; }; diff --git a/package.json b/package.json index 9c3d3b2..f4e260f 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "test": "jest --config=./test/unit/jest.config.js", "test:black-box": "yarn pre-black-box && ./scripts/black_box_test_helpers.sh runTests", "test:coverage": "jest --config=./test/unit/jest.config.js --coverage=true --coverage-reporters=text", - "test:e2e:chrome": "npx cypress run --headless --browser chrome --disable-gpu", + "test:e2e:chrome": "npx cypress run --headless --browser chrome", "test:e2e:firefox": "npx cypress run --headless --browser firefox", "test:e2e:electron": "npx cypress run --headless --browser electron", "test:unit": "jest --config=./test/unit/jest.config.js"