codeceptjs-resemblehelper icon indicating copy to clipboard operation
codeceptjs-resemblehelper copied to clipboard

Exposed fetchMisMatchPercentage

Open mlincoln4 opened this issue 5 years ago • 1 comments

My boss sent you the following email:

We are currently working on a project using the resemble helper and have been trying to find a good way to get the mismatch percentage of a pair of images without triggering a failure. When looking in the codeceptjs-resemblehelper/index.js file I found that there is a function that does exactly that, _fetchMisMatchPercentage(). However, in order to be able to use this function, I have had to remove the underscore from the beginning of the name. Would it be possible to update this so that function can be exposed? Also a side-note, it seems that in the _compareImages() function, the options only handle boundingBox/ignoredBox and not boundingBoxes/ignoredBoxes:

resemble.outputSettings({
boundingBox: options.boundingBox,
ignoredBox: options.ignoredBox,
…options.outputSettings,
});

Could this also possibly be updated?


I have made the small changes in this pull request. Let me know if you have any problems with it. Thanks a lot!

mlincoln4 avatar Oct 22 '20 18:10 mlincoln4

Thanks a lot @mlincoln4 I will prepare for 1.9.4 release.

puneet0191 avatar Oct 31 '20 04:10 puneet0191