Skip to content

Conversation

@webOS101
Copy link

@webOS101 webOS101 commented Oct 14, 2019

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.

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);
Copy link

@emilyrohrbough emilyrohrbough Oct 14, 2019

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.

Copy link
Author

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?

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.

@webOS101
Copy link
Author

As a side note, the return of the check functions isn't documented anywhere, afaict.

@webOS101
Copy link
Author

I was just noticing that @zinserjan hasn't been active in a long time. Are we likely to see these merged/released?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add isNewScreenshot to Comparison Results

2 participants