Closed johnboiles closed 8 years ago
Hopefully I can get some time in the next few weeks to take a stab at this.
Oh ha! Looks like FBSnapshotTestCase
already generates the diff image, using that same code linked above from GHUnit.
So this is just a matter of swapping out the mouse-over reveal ui with the diff'd image.
:+1:
I gave this a try in https://github.com/orta/Snapshots/pull/39
Neat! I'll give it a go
It'd be great to have a built in image diff-ing tool so you can get the overlaid diff of an image in addition to the (existing) clever mouse-over reveal UI.
An easy place to start would be using the GHUnit CoreGraphics image diff-ing code I wrote a few years ago. It'd just need to be changed to use
NSImage
APIs instead ofUIGraphics*
APIs, but that should be super easy.The fourth frame of this screenshot (from GHUnit) shows what this style diffs look like:
The way I imagine this to work is that the 'diff' button would become a toggle button that toggles between the original mouse-over reveal UI and the image diff. Maybe we add an additional button "Open in Kaleidoscope" so Kaleidoscope fans can still get there easily.