Antondomashnev / FBSnapshotsViewer

A mac os application that shows the failing snapshot tests from FBSnapshotTestCase
MIT License
224 stars 15 forks source link

Remove accepted images from failed image path. #70

Closed babbage closed 6 years ago

babbage commented 6 years ago

When a new image is accepted, remove the reference image, failed image, and diff image from the failed image path. As discussed in https://github.com/Antondomashnev/FBSnapshotsViewer/issues/27

babbage commented 6 years ago

Have rebased this branch on the current master after the Accept/Accept All change was committed, as that changed quite a lot of file and function names so there were conflicts. Lost your comment re tests in that rebasing but agree should be tested (sigh!) so will see what I can come up with.

Have renamed the function to deleteIfExists.

Note in this pull request I separated removeTestImages out into a separate function partly to maintain simplicity of functions, but additionally because a removeTestImages function is also needed by the Reject images proposal which is in pull request: #71.