Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,18 @@ task "report:sample", [:embed] do |_t, args|
ruby "scripts/generate_sample_report.rb #{embed_arg}"
end

desc "Remove screenshot diff artifacts (keeps baselines)"
task "snap_diff:clean" do
patterns = ["**/*.diff.png", "**/*.base.diff.png", "**/*.heatmap.diff.png",
"**/*.diff.webp", "**/*.base.diff.webp", "**/*.heatmap.diff.webp",
"**/snap_diff_report.html"]
removed = patterns.flat_map { |p| Dir.glob("tmp/#{p}") + Dir.glob("doc/screenshots/#{p}") }
removed.each { |f| FileUtils.rm_f(f) }
puts "Removed #{removed.size} diff artifacts"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
end

task "clobber" do
puts "Cleanup tmp/*.png"
puts "Cleanup tmp/"
FileUtils.rm_rf(Dir["./tmp/*"])
end

Expand Down
24 changes: 24 additions & 0 deletions test/fixtures/images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Test Fixture Images

These images are used by the unit test suite for image comparison testing.

| File | Description |
|------|-------------|
| `a.png` | Base island map (80x80) |
| `b.png` | Modified island map — small region differs from `a.png` |
| `c.png` | Modified island map — different region differs from `a.png` |
| `d.png` | Modified island map — another variation |
| `a_cropped.png` | Cropped version of `a.png` |
| `portrait.png` | Portrait orientation image (3x6) |
| `portrait_b.png` | Modified portrait — differs from `portrait.png` |
| `a.webp` | WebP version of `a.png` |

## Generated artifacts (gitignored)

These files are generated during test runs and should NOT be committed:

| Pattern | Description |
|---------|-------------|
| `*.diff.png` | Annotated diff overlay |
| `*.base.diff.png` | Annotated base image |
| `*.heatmap.diff.png` | Heatmap of pixel differences |