In project I used playwright + typescript + cucumber. I have problem with comparing screenshots using 'toMatchSnapshot()' method. In definition steps file I used it like that
expect(await productSelectionPage.getLogoBackground()).toMatchSnapshot('e2e/stepDefinitions/graphics/picture.png');
When I started test I'm getting error 'Error: toMatchSnapshot() must be called during the test'. Do you know what I have to do to fix this error? :) Thanks for any tips :)