Skip to content
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

Reference image updated after each run causes git change #32

Closed
albertogasparin opened this issue Dec 15, 2016 · 2 comments
Closed

Reference image updated after each run causes git change #32

albertogasparin opened this issue Dec 15, 2016 · 2 comments

Comments

@albertogasparin
Copy link
Contributor

Every time I run my test suite, git sees my reference images as being changed even if there were no errors. Looks like this line is causing the issue:

await fs.outputFile(referencePath, base64Screenshot, 'base64');

You are rewriting the reference file even if the test is passing. May I ask you why?
Should reference images be fixed unless you explicitly delete and regenerate them?

Because something (the antialiasing?) is making invisible changes and git flags the new image as different even with a 1 byte off.

@zinserjan
Copy link
Owner

A really good question. I have no idea why I did this, there is no real reason for this. I just thought if the changes are in tolerance it's ok to update the reference images. Never thought about a scenario that store images in git.

I'll discuss this with my colleagues tomorrow. Maybe they have a reason for this :)

@zinserjan
Copy link
Owner

Sorry for the delay, forgot to answer...

There is really no reason to override the base screenshots. It's just a mistake in the implementation, don't know what I thought 😆

I would be happy to accept a PR for this, if you want to speed up this fix.

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

No branches or pull requests

2 participants