Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Andrewli/add color tolerance - #213

Open
thorthugnasty wants to merge 5 commits into
facebookarchive:masterfrom
thorthugnasty:andrewli/add-color-tolerance
Open

Andrewli/add color tolerance#213
thorthugnasty wants to merge 5 commits into
facebookarchive:masterfrom
thorthugnasty:andrewli/add-color-tolerance

Conversation

@thorthugnasty

@thorthugnasty thorthugnasty commented Jan 26, 2017

Copy link
Copy Markdown

This change aims to prevent failures caused by inconsistent antialiasing of text, icons, etc. We overload the fb_compareWithImage method with an extra colorTolerance floating point parameter.
Now, snapshot tests will not fail when the "euclidean distance" (see code for details) between two pixel's colors are less than the colorTolerance parameter.

Andrew Li added 2 commits January 26, 2017 15:28
…t-case into andrewli/add-color-tolerance

* 'master' of https://github.com/facebook/ios-snapshot-test-case:
  Fix documentation warnings (facebookarchive#205)
  Add Reference to IMAGE_DIFF_DIR (facebookarchive#201)
  Update pod version and change log (facebookarchive#199)
  Bump version to 2.1.4 (facebookarchive#198)
  Replace big macro with Objective-C method for easier debugging. (facebookarchive#180)
  Merge Swift 3 in master (facebookarchive#194)
  Fix pod verification (facebookarchive#193)
  Bump version to 2.3 (facebookarchive#192)
  Revert "Merge Swift 3 into master" (facebookarchive#191)
  Merge Swift 3 into master (facebookarchive#189)
@facebook-github-bot

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@facebook-github-bot

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@jaenthemaen

Copy link
Copy Markdown

Ran into the same problem and desired solution just yesterday. A merge would be wonderful!

@thorthugnasty

Copy link
Copy Markdown
Author

cc: @nscoding

@alanzeino

Copy link
Copy Markdown
Contributor

We recently merged a change into the new repo that is similar to this:

uber/ios-snapshot-test-case@8c5bdf3

I'm not 100% sure if it's the same strategy or not, if it doesn't work for you feel free to PR on the new repo to update the new feature.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants