🚀 Feature Request
When there is a global override for maxDiffPixels, it should be mentioned in the logs when toHaveScreenshot fails, as this is what's being used. See example below.
Example
In playwright.config.ts:
expect: {
timeout: 5000,
toHaveScreenshot: {
maxDiffPixels: 1
}
},
In a test:
await expect(locator).toHaveScreenshot('calendar.png', { maxDiffPixelRatio: 0.02 });
Currently: in case of failure, the logging will say:
Expected: the logging mentions the global override somehow
Motivation
Avoid confusion, make it clear what has actually been compared.