-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send comment PR for failed screenshot tests. #616
Send comment PR for failed screenshot tests. #616
Conversation
Convert to draft to fix some naming in the yaml file. |
9a07562
to
35b7d19
Compare
35b7d19
to
251d8a8
Compare
I'm not sure if I understood. |
As per this comment: #616 (comment), let me convert this PR to draft to work on the "companion branch" approach. |
251d8a8
to
99f0344
Compare
Updated: 50530e7 Now this PR will create a new companion branch to store the screenshot result and access images from there to show the failed test in the comment. |
50530e7
to
05166ae
Compare
(I notice that the screenshots in the failure folder include the original screenshots too, we can filter them out somehow 🤔 ). |
👀 |
run: | | ||
echo "There are differences in Compose previews:" > report.md | ||
echo >> report.md # A blank line. | ||
echo "$ALL_SCREENSHOTS" | jq -r '.[]' | while read -r image; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works well!
Can we grep "delta"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, the diffed image names start with "delta". We can filter it to only include the failed tests. Let me quickly try it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: eneim#1 (comment) will bring the change here in a few seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: e9b694c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making our dreams come true!
Issue
Overview (Required)
With this PR, a failed screenshot test will automatically push a comment to the same PR with ALL failed screenshots.
Idea of this PR:
Currently the comment includes all failed screenshot test. It can be quite big if the failed cases are big (see the demo below). We can setup further filtering rules next.
Links