Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: ignore antialiasing #45

Closed
aboutandre opened this issue Jun 8, 2017 · 4 comments · Fixed by #73
Closed

Question: ignore antialiasing #45

aboutandre opened this issue Jun 8, 2017 · 4 comments · Fixed by #73

Comments

@aboutandre
Copy link

First, let me thank you for the effort you put into this!
Your work make my work much easier and even fun! =)

So, as I understand node-resemble-js is being used to do the comparison. I looked at the docs from them and I am trying to figure out how I can turn ignore antialiasing on.

This is how the visualRegression part of my wdio.conf.js file:

 visualRegression: {
    compare: new VisualRegressionCompare.LocalCompare({
      referenceName: constructScreenshotFileName(path.join(process.cwd(), 'test/screenshots/reference')),
      screenshotName: constructScreenshotFileName(path.join(process.cwd(), 'test-screenshots/screenshots/screen')),
      diffName: constructScreenshotFileName(path.join(process.cwd(), 'test-screenshots/screenshots/diff')),
      misMatchTolerance: 0.05,
      compareImages: 'antialiasing'
    }),
    viewportChangePause: 200,
    widths: [320, 544, 768, 992, 1200],
    orientations: ['landscape', 'portrait'],
  }

The compareImages: 'antialiasing' seems to be doing nothing. Is it possible to pass this parameter to node-resemble-js ?

Thanks for your help!

@zinserjan
Copy link
Owner

First, let me thank you for the effort you put into this!
Your work make my work much easier and even fun! =)

Awesome. Thanks for the feedback. I'm happy to hear that it helps you :)

The compareImages: 'antialiasing' seems to be doing nothing. Is it possible to pass this parameter to node-resemble-js ?

Yeah, lol seems that I already prepared the comparison for this, but forgot to make it configurable...

Just looked over their docs & code and it seems that we can just use a single option of these at a time. So we can intruduce another option like the misMatchTolerance that is globally configurable and also overridable per command.

But we need a name for that... no idea at the moment.

@aboutandre
Copy link
Author

@zinserjan thanks for the quick reply!

Well the guys from @Huddle call it "comparison method". =)

@mansn
Copy link

mansn commented Jul 7, 2017

Using "ignore antialiasing" seems to be a bit risky... Check this issue: https://github.com/Huddle/PhantomCSS/issues/67

I'm having an issue where tests fail due to antialiasing, because I'm running the tests on browserstack (i.e. many different machines)..

I was considering to use my fork of this repo, and just hard code "ignore antialiasing" for now (due to time constraints).. But I'm a bit afraid of activating it due to the issue above. I don't want to risk to get passing tests while they're actually failing (i.e. false negatives, because it didn't find a mismatch)

@SaintMitya
Copy link

A lifesaver for us =)
How about ignoreImageDetails for the parameter name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants