-
Notifications
You must be signed in to change notification settings - Fork 252
Andrewli/add color tolerance #213
base: master
Are you sure you want to change the base?
Andrewli/add color tolerance #213
Conversation
…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)
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 [email protected]. 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 [email protected] if you have any questions. |
…rthugnasty/ios-snapshot-test-case into andrewli/add-color-tolerance * 'andrewli/add-color-tolerance' of https://github.com/thorthugnasty/ios-snapshot-test-case: fix param bugs
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Ran into the same problem and desired solution just yesterday. A merge would be wonderful! |
cc: @nscoding |
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. |
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.