Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cagov/examples-visual-regression-tests
Sample backstop.js visual regression test scripts
https://github.com/cagov/examples-visual-regression-tests
Last synced: 2 months ago
JSON representation
Sample backstop.js visual regression test scripts
- Host: GitHub
- URL: https://github.com/cagov/examples-visual-regression-tests
- Owner: cagov
- Created: 2022-01-12T16:01:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-06T00:02:14.000Z (over 1 year ago)
- Last Synced: 2024-04-17T05:02:19.061Z (9 months ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Using this package
## Requirements
- npm
- git## Before first use.
1. clone repo `gh repo clone cagov/examples-visual-regression-tests` or `git clone [email protected]:zcagov/examples-visual-regression-tests.git`
3. `npm install`## Run tests
1. Run site locally
a. Go to project repo root.
b. `git pull` (optional)
c. `npm run start` (or equivalent)
2. Go back to this project root in another terminal window. (`z examples-visual-regression-tests`)
3. Verify the url of live and local sites match value in SITE.js file.
4. Initiate backstop with `npm run backstop`### Test each .njk template on the site.
- Cannabis: `npm run test:cannabis`
- Drought: `npm run test:drought`
- Design system: `npm run test:designSystem`
### Hints and troubleshooting
- Change browser in main.js by changing `engineOptions.browser` to `chromium`, `firefox`, or `webkit`.
- `z` is the command [z-sh(https://github.com/agkozak/zsh-z) . `cd` also works!