Closed yiqunliang closed 7 years ago
Hello yiqunliang,
I have tried the code in the examples and I couldn't reproduce the issue. Here is the created diff image:
I have copied the files you attached as issue-1.png and issue-2.png and changed the code in the example/example.js folder:
var resemble = require('../resemble.js'); var fs = require('fs');
resemble.outputSettings({ errorColor: { red: 155, green: 100, blue: 155 }, errorType: 'movement', transparency: 0.6 });
resemble('issue-1.png').compareTo('issue-2.png') .onComplete(function(data){ console.log(data); data.getDiffImage().pack().pipe(fs.createWriteStream('issue-diff.png')); });`
It seems like issue is related with your code. Did you changed something regarding to misMatchPercentage ?
Hi mirzazeyrek,
I tried your steps, yes the diff file was created. However in my real case there is no diff file created. Then I try to update the config.js file, update the misMatchTolerance from 0 to 0.0001 then the diff file is created. I don't know why value 0 doesn't work. And thanks for your inspiration.
// config the webdrivercss folder function getWebdrivercss(fileName){
var folderPath={
webdrivercss:
{
screenshotRoot: './screenshots/'+'/'+fileName+'/',
failedComparisonsRoot: './failures/'+'/'+fileName+'/',
misMatchTolerance: 0.0001,
screenWidth: 1600
}
}
return folderPath.webdrivercss
}
Oh, glad to see that issue is resolved :)
Closing this since it doesn't look like a bug but a feature.
I use CSS regression testig in WebdriverIO solution to test one of our Web product. There is a color change for one close icon, but seems node-resemble cannot see the difference, the comparing result is still passed.