Skip to content

Commit bf01eff

Browse files
committed
Updates
1 parent 2fffb22 commit bf01eff

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,18 @@ Coverage thresholds: 85% branches/functions, 90% lines/statements. Tests live in
158158

159159
Visual regression testing to catch unintended UI changes, especially useful when upgrading dependencies.
160160

161-
```bash
162-
yarn build # Must build first
163-
yarn test:screenshots # Run visual regression tests
164-
yarn test:show-report # View test failure report
165-
```
161+
The best strategy is to run the tests on a clean branch **before** making changes to gather baseline screenshots, then run them again after your changes to detect regressions.
162+
163+
#### Running screenshot tests locally
164+
165+
1. Run `yarn build`
166+
2. Run `yarn test:screenshots` — all tests will fail on the first pass since no baseline screenshots exist yet
167+
3. Run `yarn test:screenshots` again — all tests should now pass (baselines have been captured)
168+
4. Make your changes (dependency upgrades, etc.)
169+
5. Run `yarn test:screenshots` to check for visual regressions
170+
6. Run `yarn test:show-report` to view failures
166171

167-
**Workflow:** Run tests on a clean branch to capture baseline screenshots. Make your changes, then run tests again to detect regressions.
172+
> **Tip:** If tests keep timing out on a clean branch, try running `yarn start` first. Cancel once the dev build completes, then re-run the tests.
168173
169174
### Link checking
170175

0 commit comments

Comments
 (0)