馃殌 Feature Request
With the nice release of: https://playwright.dev/docs/release-notes#%EF%B8%8F-webp-screenshots
WebP format depends on await expect(page).toHaveScreenshot('homepage.webp'); extension being used in name. But it would be great if format could be defined in global configuration so that all screenshots use it.
Example
For example:
expect: {
toHaveScreenshot: {
threshold: 0.1,
maxDiffPixelRatio: 0.001,
screenshotFormat: "webp",
},
},
Motivation
toHaveScreenshot() works also without providing the name. Seems inital implementation doesn't take that into consideration.
And to avoid hacks like:
pathTemplate: "./screenshots/{projectName}/{testName}{ext}",
->
pathTemplate: "./screenshots/{projectName}/{testName}.webp",
馃殌 Feature Request
With the nice release of: https://playwright.dev/docs/release-notes#%EF%B8%8F-webp-screenshots
WebP format depends on
await expect(page).toHaveScreenshot('homepage.webp');extension being used in name. But it would be great if format could be defined in global configuration so that all screenshots use it.Example
For example:
Motivation
toHaveScreenshot()works also without providing the name. Seems inital implementation doesn't take that into consideration.And to avoid hacks like: