- Docker Desktop
- WSL2 (Windows only)
See /client/
TODO
Visual regression testing compares screenshots of the app against approved 'baseline' screenshots.
The pages or components being screenshotted are specified in *.story.vue
files using Histoire.dev.
The screenshots are taken using Lost Pixel OSS in docker, ensuring that there are no OS differences in rendering between CI and local tests. These approved 'baseline' screenshots are found in client/.lostpixel/baseline
.
- If necessary create or update a
*.story.vue
file with your components. Be sure to include every configuration of your component. - Run
npm run story:dev
to see the component library and view your component and make sure it works. - Run
npm run story:build
...which builds the*.story.vue
files. npm run test:story
...tests screenshots of the aforementioned build (using Lost Pixel OSS) giving either a pass (exiting cleanly) or fail (exiting with an exception). a. If 'pass' then you're done, and you can push your changes. b. If 'fail' then runnpm run test:story:view
to view the differences in a browser. Find the*.story.vue
files that were affected and rerunnpm run story:build
andnpm run test:story
until you're happy with the changes. When ready to approve ALL the changes runnpm run test:story:approve
, commit the updated 'baseline' images inclient/.lostpixel/baseline
, and push the changes. If
This command should always succeed. If it fails it usually means there's a JavaScript exception being thrown in the app. Read all the console output carefully, and try viewing your component with npm run story:dev
to see if there's an exception being thrown.