Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/helpers/selenium-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const fs = require('fs');
const {By, until, Button} = webdriver;

const USE_HEADLESS = process.env.USE_HEADLESS !== 'no';
const IS_ROOT_USER = process.getuid() === 0;

// The main reason for this timeout is so that we can control the timeout message and report details;
// if we hit the Jasmine default timeout then we get a terse message that we can't control.
Expand Down Expand Up @@ -63,6 +64,15 @@ class SeleniumHelper {
args.push('--headless');
}

if (IS_ROOT_USER) {
args.push('--no-sandbox');
args.push('--disable-setuid-sandbox');
}

args.push('--disable-gpu');
args.push('--disable-dev-shm-usage');
args.push('--disable-extensions');

// Stub getUserMedia to always not allow access
args.push('--use-fake-ui-for-media-stream=deny');

Expand Down