allow disabling gpu in tests (#26684) (#26869)

This commit is contained in:
Peter Pisljar 2018-12-10 09:14:30 +01:00 committed by GitHub
parent aa9a5e1dcd
commit 2167c5b161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,6 +32,9 @@ async function attemptToCreateCommand(log, server, driverApi) {
log.debug('[leadfoot:command] Creating session');
let browserOptions = {};
if (process.env.TEST_DISABLE_GPU) {
browserOptions = { chromeOptions: { args: ['disable-gpu'] } };
}
if (process.env.TEST_BROWSER_HEADLESS) {
browserOptions = { chromeOptions: { args: ['headless', 'disable-gpu'] } };
}