Skip to content

Commit

Permalink
Add WebGL support to Chromium on Cypress (#109)
Browse files Browse the repository at this point in the history
Following cypress-io/cypress#1194 (comment)

Work on #107.
  • Loading branch information
janakdr authored Oct 9, 2019
1 parent dbdcce4 commit 34fcfe8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules
yarn.lock
npm-debug.log
cypress/plugins
cypress/screenshots
cypress/videos
.idea/
Expand Down
16 changes: 16 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -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;
}
});
};

0 comments on commit 34fcfe8

Please sign in to comment.