Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add visual regression testing #127

Conversation

jhuynh85
Copy link
Contributor

@jhuynh85 jhuynh85 commented Apr 7, 2019

Packages added:

  • jest-puppeteer
  • jest-image-snapshot
  • puppeteer

New files:

  • jest.visual.config.js - Jest config for visual testing (only looks for .visualtest.js or .visualspec.js files)
  • jest-puppeteer.config.js - Jest puppeteer config
  • 404.visualtest.js - Visual test for 404 page
  • index.visualtest.js - Visual test for home page

Modified files:

  • .eslintrc.js - Added browser, context, and page global variables
  • setup-test-env.js - Extended expect with toMatchImageSnapshot, increased jest timeout to 25000
  • package.json - Added test:visual script for running visual tests only

Issues:

  • Visual test snapshots are blank images

@jhuynh85 jhuynh85 added the WIP label Apr 7, 2019
@jhuynh85 jhuynh85 requested a review from appleJax April 7, 2019 05:21
@jhuynh85 jhuynh85 force-pushed the dev/setup-visual-regression-tests branch 2 times, most recently from ba6c9f0 to 90a05e1 Compare April 8, 2019 08:33
@jhuynh85 jhuynh85 force-pushed the dev/setup-visual-regression-tests branch from 90a05e1 to 031fc89 Compare April 9, 2019 01:58
@jhuynh85 jhuynh85 closed this Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We should write visual regression tests
1 participant