You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove redundant include DSL (Assertions already includes it)
- Add git add/commit step to Quick Start (prevents CI failure)
- Lead "What You Get" with failure message, not file table
- Move standalone compare API into "What You Get" (strong hook)
- Rename "Configuration" → "Tuning Flaky Tests" (after Next Steps)
- Move Troubleshooting after Next Steps (not before)
- Simplify first-run explanation (no conflicting RECORD_SCREENSHOTS)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
screenshot "homepage"# First run: saves baseline. Next runs: compares.
33
+
screenshot "homepage"
32
34
end
33
35
end
34
36
```
35
37
36
-
That's it. No configuration needed. Screenshots are saved to `doc/screenshots/` and compared on each test run.
38
+
```bash
39
+
bundle exec rake test# First run always passes — saves baselines
40
+
bundle exec rake test# Second run compares against baselines
41
+
git add doc/screenshots/
42
+
git commit -m "chore: add screenshot baselines"
43
+
```
44
+
45
+
That's it. The first run saves baseline screenshots (always passes). Subsequent runs compare against them — if the UI changed, the test fails. Commit baselines to git so CI catches regressions.
> **Second run:** compares against baselines. If anything changed, the test fails with a diff.
40
-
> **Commit baselines to git** so CI catches regressions too.
47
+
> **CI note:** In CI, `fail_if_new` is `true` by default — new screenshots without a committed baseline will fail. Always commit your baselines before pushing.
41
48
42
49
For RSpec, Cucumber, or non-Rails setup, see [Framework Setup](docs/framework-setup.md).
43
50
44
51
## What You Get
45
52
46
-
When a screenshot differs, you get:
53
+
When a screenshot differs, the test fails with a clear message:
47
54
48
-
| File | Description |
49
-
|------|-------------|
50
-
|`homepage.png`| Committed baseline (in version control) |
51
-
|`homepage.base.png`| Runtime copy of baseline (for comparison) |
52
-
|`homepage.diff.png`| Visual diff with changes highlighted in red |
53
-
|`homepage.heatmap.diff.png`| Heatmap of pixel differences |
54
-
55
-
The failure message tells you exactly what changed:
0 commit comments