Skip to content

Commit

Permalink
spec: disable chrome render backgrounding in specs
Browse files Browse the repository at this point in the history
test plan:
 * Verify Jenkins passes

Change-Id: I1b6c0bb09007e2855d98c4f5be14582e755bd4ba
Reviewed-on: https://gerrit.instructure.com/169221
Tested-by: Jenkins
Reviewed-by: Derek Bender <[email protected]>
QA-Review: Jeremy Neander <[email protected]>
Product-Review: Jeremy Neander <[email protected]>
  • Loading branch information
jneander committed Oct 22, 2018
1 parent b10b66a commit 0109697
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,23 @@ const karmaConfig = {
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
// - PhantomJS (has to be installed with `npm install karma-phantomjs-launcher`))
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
browsers: ['Chrome'],
browsers: ['ChromeWithoutBackground'],

// Run headless chrome with `karma start --browsers ChromeHeadlessNoSandbox`
customLaunchers: {
// Chrome will sometimes be in the background when specs are running,
// leading to different behavior with things like event propagation, which
// leads easily to bugs in production and/or spec code. To decrease the
// chances of this, render backgrounding must be disabled when launching
// Chrome.
ChromeWithoutBackground: {
base: 'Chrome',
flags: ['--disable-renderer-backgrounding']
},

// Run headless chrome with `karma start --browsers ChromeHeadlessNoSandbox`
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'] // needed for running tests in local docker
flags: ['--no-sandbox', '--disable-renderer-backgrounding'] // needed for running tests in local docker
}
},

Expand Down

0 comments on commit 0109697

Please sign in to comment.