diff --git a/.gitignore b/.gitignore index 779b02fe0..5d52807ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ node_modules yarn.lock npm-debug.log -cypress/plugins cypress/screenshots cypress/videos .idea/ diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js new file mode 100644 index 000000000..d29684b9c --- /dev/null +++ b/cypress/plugins/index.js @@ -0,0 +1,16 @@ +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) +// +module.exports = (on, config) => { + on('before:browser:launch', (browser = {}, args) => { + if (browser.name === 'chromium') { + const newArgs = args.filter(arg => arg !== '--disable-gpu'); + newArgs.push('--ignore-gpu-blacklist'); + return newArgs; + } + }); +};