Skip to content

Commit

Permalink
Script & instruction for image diff reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
spirali committed Nov 28, 2024
1 parent 17ac2ae commit 23c64e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions parley/tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
report.html
6 changes: 5 additions & 1 deletion parley/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ If you think that everything is ok, you can start tests as follows:
$ PARLEY_TEST="accept" cargo test
```

It will update snapshots of the failed tests.
It will update snapshots of the failed tests.

## Report with diffs

If you want to create a nice report with image diffs, run `make_report.sh`
9 changes: 9 additions & 0 deletions parley/tests/make_report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if ! command -v image_diff_review 2>&1 >/dev/null
then
echo "image_diff_review not found. Install it via 'cargo install image_diff_review'"
exit 1
fi

image_diff_review --ignore-left-missing --left-title "Current test" --right-title "Snaphost" current snapshots report

0 comments on commit 23c64e5

Please sign in to comment.