web icon indicating copy to clipboard operation
web copied to clipboard

feat: add support for configuring the failure threshold

Open WickyNilliams opened this issue 2 years ago • 1 comments

What I did

  1. add config option for setting a failure threshold by percent or number of pixels
  2. check this value when diffing the image, and return appropriate message
  3. improve console output when image size mismatch

WickyNilliams avatar Feb 14 '22 10:02 WickyNilliams

🦋 Changeset detected

Latest commit: 555285b6bd23eb388467e22bd33826a7ff67e73b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web/test-runner-visual-regression Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Feb 14 '22 10:02 changeset-bot[bot]

Hey, any reason this never got merged?

WickyNilliams avatar Oct 13 '22 12:10 WickyNilliams

Sorry about leaving this hanging. Rebased the PR to trigger the build, I think we can merge when it's green.

web-padawan avatar Oct 13 '22 12:10 web-padawan

No worries! I'd completely forgotten about it until my colleague asked about one of these features :)

WickyNilliams avatar Oct 13 '22 13:10 WickyNilliams

@web-padawan @WickyNilliams This PR seems to be missing the updated config parameters in the main readme: https://github.com/modernweb-dev/web/tree/master/packages/test-runner-visual-regression

peschee avatar Oct 24 '22 12:10 peschee

Thanks, I missed to check those while reviewing. Feel free to submit another PR to add those.

web-padawan avatar Oct 24 '22 12:10 web-padawan