Skip to content

Commit

Permalink
E2E tests with Jest and Puppeteer (#882)
Browse files Browse the repository at this point in the history
* E2E tests with Jest and Puppeteer

* Await all the things
  • Loading branch information
davemcorwin authored and tbaxter-18f committed Jan 18, 2019
1 parent 7248ec1 commit 51f109e
Show file tree
Hide file tree
Showing 6 changed files with 6,069 additions and 171 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Expand Up @@ -68,6 +68,12 @@ jobs:
bandit -r . -x docker_entrypoint.py
flake8
codecov
python manage.py loaddata test_data/data-update-deduped.json --settings=tock.settings.test
python manage.py createsuperuser --username admin.user --email admin.user@gsa.gov --noinput --settings=tock.settings.test
python manage.py runserver 0.0.0.0:8000 --settings=tock.settings.test &
sleep 5
cd ..
npm run test
- store_artifacts:
path: test-reports
Expand Down
6 changes: 6 additions & 0 deletions jest-puppeteer.config.js
@@ -0,0 +1,6 @@
module.exports = {
port: parseInt(process.env.JEST_PORT, 10)
// server: {
// command: `./node_modules/.bin/serve --listen ${process.env.JEST_PORT} --no-clipboard ./dist`,
// },
};
9 changes: 9 additions & 0 deletions jest.config.js
@@ -0,0 +1,9 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
errorOnDeprecated: true,
notify: true,
preset: 'jest-puppeteer',
testMatch: ['**/*.test.js'],
};

0 comments on commit 51f109e

Please sign in to comment.