-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add isNewScreenshot to results #103
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
} else { | ||
log('first run - create reference file'); | ||
await fs.outputFile(referencePath, base64Screenshot, 'base64'); | ||
return this.createResultReport(0, true, true); | ||
return this.createResultReport(0, true, true, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although it makes sense, it feels weird to return the results isWithinMisMatchTolerance = true
, isSameDimensions = true
and isExactSameImage = true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't argue with that. I think, though, changing the semantics of this return could break existing tests. If there was going to be a major (breaking) release, this could be changed. On the other hand, since this doesn't actually do any comparisons, I'm not sure the values could be relied on for anything. Perhaps they should be undefined
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think we would want to keep it as is otherwise I'd probably break people's current compare checks/results when a new ref screenshot is generated.
As a side note, the return of the |
I was just noticing that @zinserjan hasn't been active in a long time. Are we likely to see these merged/released? |
Fixes #83
Note: I didn't attempt to get Spectre test to return the correct value for
isNewScreenshot
.Note: I wasn't able to test locally as it's unhappy with my node version; I couldn't install the node dependencies. Will update the ticket after I can either update dependencies or roll back my node version.