This image allows to run javascript tests in a headless machine like a CI server.
This image support protractor test under chrome.
Unfortunately, chrome doesn't support container (travis-ci/travis-ci#938), you need to start chrome with --no-sandbox argument to avoid this.
To configure protractor, use this snippets:
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['no-sandbox']
}
},
To run protractor on gitlab ci, just use this image, and configure protractor as above.
Here is example of ".gitlab-ci.yml" file:
image: milosh012/docker-protractor-chrome:latest
cache:
paths:
- node_modules/
test_async:
script:
- npm install
- node ./node_modules/protractor/bin/webdriver-manager update
- npm test
https://hub.docker.com/r/milosh012/docker-protractor-chrome/
docker pull milosh012/docker-protractor-chrome