diff --git a/.gitignore b/.gitignore index 140e2dfa..f46496de 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /.git/* npm-debug.log DS_store -cypress \ No newline at end of file +cypress/* +!cypress/plugins/ \ No newline at end of file diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js new file mode 100644 index 00000000..d2887b4f --- /dev/null +++ b/cypress/plugins/index.js @@ -0,0 +1,23 @@ +/// +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// 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) + +/** + * @type {Cypress.PluginConfig} + */ +module.exports = (on, config) => { + on('before:browser:launch', (browser = {}, launchOptions) => { + launchOptions.args.push('--disable-gpu') + return launchOptions + }) +}