Implemented ignoreDiffPixelCount optional param to assertView command.
With there params, it would be possible to ignore 2-5 pixel image diffs, which are hard to get rid of
Example:
it('example', async ({browser}) => {
// ignores up to 5 diff pixels
await browser.assertView('some-state', 'some-selector', {ignoreDiffPixelCount: 5});
// ignores up to 5% diff pixels
await browser.assertView('other-state', 'other-selector', {ignoreDiffPixelCount: "5%"});
});
What is done
Implemented
ignoreDiffPixelCount
optional param toassertView
command. With there params, it would be possible to ignore 2-5 pixel image diffs, which are hard to get rid ofExample: