From c53c583c4ca1eeb0b09225e007e4a643f6080878 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Wed, 24 Mar 2021 17:59:05 +1100 Subject: [PATCH] Add some docs on how to run the tests. --- tests/visual-regression/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/visual-regression/README.md diff --git a/tests/visual-regression/README.md b/tests/visual-regression/README.md new file mode 100644 index 0000000000000..fe32fc0688b13 --- /dev/null +++ b/tests/visual-regression/README.md @@ -0,0 +1,11 @@ +# Visual Regression Tests in WordPress Core + +These tests make use of Jest and Puppeteer, with a setup very similar to that of the e2e tests, together with [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot) for generating the visual diffs. + +## How to Run the Tests Locally + +1. Check out trunk. +2. Run `npm run test:visual` to generate some base snapshots. +3. Check out the feature branch to be tested. +4. Run `npm run test:visual` again. If any tests fail, the diff images can be found in `tests/visual-regression/specs/__image_snapshots__/__diff_output__`. +