Use the test to take a screenshot of a page with an image locally using the headful browser using the experimental {_comparator: 'ssim-cie94'} configuration.
Run the same test in CI using the headless=new flag when launching the browser
Observe that the screenshot comparison fails
Adjust the threshold setting to be more permissive and run again
Observe that the comparison still fails with the same diff.
Swap the comparator for the default pixelmatch and run the test again
Observe that the diff is already much more lenient about small color changes.
Expected behavior
The ssim-cie94 should be more resilient to differences between rendering engines, even when not comparing text, or should have configuration options for extra lenience when required.
Actual behavior
ssim-cie94 results in worse matches than pixelmatch in some circumstances.
Version
1.45.3
Steps to reproduce
{_comparator: 'ssim-cie94'}
configuration.headless=new
flag when launching the browserthreshold
setting to be more permissive and run againpixelmatch
and run the test againExpected behavior
The
ssim-cie94
should be more resilient to differences between rendering engines, even when not comparing text, or should have configuration options for extra lenience when required.Actual behavior
ssim-cie94
results in worse matches thanpixelmatch
in some circumstances.Additional context
This isn't really a bug report as I don't think there is any actual bug, just feedback on the
ssim-cie94
comparator as requested in a couple issues. Reproduction: https://github.com/samschurter/playwright-threshold-bugEnvironment