Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Compare and record new at the same time #144

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Krizai
Copy link

@Krizai Krizai commented Feb 9, 2016

Added ability to perform both record new image and compare with old one at the same time.

When i am reported about some diff in snapshots by the build server, sometimes i know that there was a small change in color, font or image asset. In this case i only want to regenerate my ref images. But during regeneration i really want to know that no other minor changes was made between test run on a build server and generation. It would be good to generate diffs of old ref images with a potential new one.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@nscoding
Copy link
Contributor

Can I have some tests for this?

_snapshotController.mode = recordMode ? FBSnapshotModeRecord : FBSnapshotModeCompare;
}

- (FBSnapshotTestMode)mode{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line before {

@Krizai
Copy link
Author

Krizai commented Feb 10, 2016

@nscoding Previously there were no tests included for recordMode. Do you want me to add some ? Or just small tests for recordMode<->mode ?

@nscoding
Copy link
Contributor

hmm I've been think about this for a while, I am not really sure how this property will be used. Can you provide some examples on how this will be integrated with your CI tooling?

@Krizai
Copy link
Author

Krizai commented Feb 18, 2016

The main idea is to make the process of creating new ref screenshots easier.
For example my CI reports that there is some differences in screenshots. I've checked and see that the font was changed, but this is ok, as it was changed in the "common lib" project. At that point I'd like to recreate the ref screenshots with new font used. I can do it either manually or automatically on CI, but in any case I'd like to be sure that the only difference in new screenshots is the font. The easiest way to do so is to have diffs also on this stage.

@ghost ghost added the CLA Signed label Jul 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants