mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
Tests: Report image differences on tests with no fuzzy config defined
This can be helpful for identifying what the fuzzy config should be for new tests.
This commit is contained in:
parent
90b49b9015
commit
75046857ce
Notes:
github-actions[bot]
2025-08-06 11:52:55 +00:00
Author: https://github.com/AtkinsSJ
Commit: 75046857ce
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5738
Reviewed-by: https://github.com/gmta ✅
1 changed files with 4 additions and 2 deletions
|
|
@ -27,8 +27,10 @@ bool fuzzy_screenshot_match(URL::URL const& reference, Gfx::Bitmap const& bitmap
|
|||
return fuzzy_match.reference.value().equals(reference);
|
||||
return true;
|
||||
});
|
||||
if (!fuzzy_match.has_value())
|
||||
return diff.identical;
|
||||
if (!fuzzy_match.has_value()) {
|
||||
warnln("Screenshot mismatch: pixel error count {}, with maximum error {}. (No fuzzy config defined)", diff.pixel_error_count, diff.maximum_error);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Apply fuzzy matching.
|
||||
auto color_error_matches = fuzzy_match->color_value_error.contains(diff.maximum_error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue