Skip to content

Commit

Permalink
Merge pull request #755 from OpenGeoscience/fix-chrome-proxy-testing
Browse files Browse the repository at this point in the history
Fix running headed chrome tests with proxy.
  • Loading branch information
manthey authored Jan 5, 2018
2 parents 705a2d2 + 6d92dc3 commit 9a6fe02
Show file tree
Hide file tree
Showing 9 changed files with 1,006 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ before_install:
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24"
- CACHE="${HOME}/cache" CMAKE_VERSION=3.5.0 CMAKE_SHORT_VERSION=3.5 source ./scripts/install_cmake.sh
- npm prune
- npm install -g npm

before_script:
- export DISPLAY=:99.0
Expand All @@ -55,8 +56,8 @@ script:
after_failure:
# Upload test results. First make them smaller with optipng.
- pip install --user --upgrade girder-client requests[security]
- find _build/images -name '*-test.png' | xargs optipng
- find _build/images -name '*-test.png' | xargs python scripts/upload_test_images.py
- find _build/images -name '*-test.png' -exec optipng {} \+
- find _build/images -name '*-test.png' -exec python scripts/upload_test_images.py {} \+

after_success:
- npm run codecov
Expand Down
11 changes: 10 additions & 1 deletion karma-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,17 @@ module.exports = function (config) {
]
},
ChromeWithProxy: {
base: 'ChromeFull',
// inheriting from ChromeFull ignores the flags in this entry, so we
// need to inherit from Chrome
base: 'Chrome',
flags: [
'--no-sandbox', // necessary to run tests in a docker
'--no-pings', // no auditing pings
'--device-scale-factor=1',
'--window-position=0,0',
'--start-fullscreen',
'--kiosk',
'--incognito',
'--proxy-pac-url=' + config.protocol + '//' + config.hostname + ':' + config.port + '/testdata/proxy-for-tests.pac'
]
},
Expand Down
Loading

0 comments on commit 9a6fe02

Please sign in to comment.