dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Selenium: pass -no-sandbox to Chrome under Docker
[lhc/web/wiklou.git]
/
tests
/
selenium
/
wdio.conf.js
diff --git
a/tests/selenium/wdio.conf.js
b/tests/selenium/wdio.conf.js
index
7b74328
..
0b374c8
100644
(file)
--- a/
tests/selenium/wdio.conf.js
+++ b/
tests/selenium/wdio.conf.js
@@
-1,6
+1,7
@@
'use strict';
const password = 'vagrant',
'use strict';
const password = 'vagrant',
+ fs = require( 'fs' ),
path = require( 'path' ),
username = 'Admin';
path = require( 'path' ),
username = 'Admin';
@@
-83,7
+84,12
@@
exports.config = {
chromeOptions: {
// Run headless when there is no DISPLAY
// --headless: since Chrome 59 https://chromium.googlesource.com/chromium/src/+/59.0.3030.0/headless/README.md
chromeOptions: {
// Run headless when there is no DISPLAY
// --headless: since Chrome 59 https://chromium.googlesource.com/chromium/src/+/59.0.3030.0/headless/README.md
- args: process.env.DISPLAY ? [] : [ '--headless' ]
+ args: (
+ process.env.DISPLAY ? [] : [ '--headless' ]
+ ).concat(
+ // Disable Chrome sandbox when running in Docker
+ fs.existsSync( '/.dockerenv' ) ? [ '--no-sandbox' ] : []
+ )
}
} ],
//
}
} ],
//