An image that includes a headless chrome setup with puppeteer and cucumber-js.
This image can be used to run acceptance tests with features written in cucumber.
Compose file:
---
services:
puppeteer:
image: enrise/puppeteer-cucumber:latest
volumes:
- ./features:/home/node/app/features
Run your tests:
docker-compose run puppeteer
even with options:
docker-compose run puppeteer --tags '@focus'
Run your tests:
docker run -v `pwd`/features/:/home/node/app/features enrise/puppeteer-cucumber:latest
with option:
docker run -v `pwd`/features/:/home/node/app/features enrise/puppeteer-cucumber:latest --tags '@focus'
See the example on how to run the test as the current user (especially important when creating screenshots)
I included a few packages to make this image more versatile. Included packages:
- Puppeteer
- Cucumber
- Chai, Chai-http, Chai-dom, Chai-json
- Axios
- Lodash
- Cucumber-html-reporter
- Cucumber-puppeteer (this package includes a lot of step definitions out of the box!)
- Cucumber-puppeteer-axe (this package includes a few extra step definitions to test for accessibility)
Check Example