-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Just saw this deprecation announcement on V1.38:
https://playwright.dev/docs/release-notes#deprecations
- The method expect(value).toMatchSnapshot() is deprecated in favor of expect(page).toHaveScreenshot() and expect(locator).toHaveScreenshot().
I don't understand the reasoning behind this, not sure if you're aware of this but this method can be used for any snapshot required and not only screenshots, therefore for my use case I cannot replace toMatchSnapshot with toHaveScreenshot since I don't verify a screenshot but a buffer.
I know many others that use this in a similar way, and I know that deprecation doesn't mean it's removed, but I want to raise it now before it could be removed in the future.
The fact that this method can be replaced with toHaveScreenshot for some cases doesn't mean it should be and having it as deprecated, or worse removing it is an incorrect lose of useful functionality.
Please reconsider this. Thanks.