-
Notifications
You must be signed in to change notification settings - Fork 15
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
Auto-Replace Snapshot #27
Comments
Hi @joeblau, sounds like a cool idea actually, I will definitely add it to the roadmap 👌 |
In Snapshots, you have to click on each failed snapshot and then click "swap" to replace the broken snapshot with the fixed snapshot. What we were thinking of is a way to either bulk accept / reject snapshots with checkboxes or have a way to go though the snapshots like tinder where you can say "keep old one" or "keep new one" quickly, I think that would be helpful. |
I like bulk accept / reject snapshots with checkboxes option 😄 As I understood from this:
It requires two steps to swap the snapshot and the marking the checkbox only one. So maybe there could be a button "swap" in the UI, so you don't have to click on the failed snapshot and then click "swap", but you can swap in one step. What do you think? |
I've always been partial to the photos like experience for work like this: So that you can see the images in big, then move left/right with arrows and press spacebar to switch it. The mouse can then be used for scrubbing between the two. ( I don't have a big monitor so I'm not doing anything fine-grained) |
@orta I like how full-size mode could look like 👍 , also I think it could be an option. From my experience sometimes it's just faster to check everything in a pop-up mode if you don't have to pay attention to details. |
Definitely, think those are two different use cases 👍 |
Hey @joeblau I've done some improvements towards your request. Here is a preview: Basically the idea is that you have now sections. Section contains multiple snapshots from the same test file. Each section has |
Oh... my... god! Thanks so much. I'm going to test this out on wed when I get back to work. |
Just started using this app, and it's great. I suggest "Swap" isn't quite the right term, as it implies that you are swapping the two screenshots: not just that the new "failed" screenshot is becoming the reference, but also that the reference is being moved back to the location of the failed one. Two minor suggestions then:
Happy to take a stab at this and submit a pull request if that's preferred, but wanted to propose it before I took any action. |
Agree - think this makes sense |
@babbage I like the idea, and the wording makes more sense than the current one. Would be happy to review your PR 😄 Feel free to ping me if you have any question regarding the implementation. |
I have implemented the renaming in the interface and in the naming of properties and functions throughout the code in this branch: It doesn't yet provide the planned option to remove the related images from the FailureDiffs folder on acceptance, so I haven't created a pull request yet. However, I would value some assistance. In that branch I have corrected the issues in the current master branch flagged by the linter, but am getting a fatal exception on trying to run the tests in the current code base, and have determined that there is a fatal error in the tests in the current Master branch—it's not due to my changes. The fatal error is seen associated with this assertionFailure:
The relevant test being run is [FBSnapshotsViewerTests.ApplicationSnapshotTestResultFileWatcherUpdateHandlerSpec _handleFileWatcherUpdate__with_invalid_updates__thows_assertion], which is expected to throw an assertion. What I am unclear about is why this is failing. Possibly this is an environment configuration issue? I am not familiar enough with the rest of the codebase to be able to debug this promptly. It does seem that there may be issues with Nimble here (e.g., see related Quick/Quick#20 though that does not describe a cause that I found in the code in this case). Is this a known issue perhaps? |
Ah, it looks like this current issue is probably the cause: |
All fixed, and have pushed to the same branch a fix for the one failing test currently in Master, which is unrelated to these other changes but hopefully acceptable to include in the one pull request. Will proceed on with the proposed feature addition of the option to remove from FailureDiffs images associated with an accepted screenshot. |
Hi @babbage thanks for doing a great job 😄 |
Sure. |
Done. Apologies for the extended delay in finalising this, after the work was basically done in November. Life. :) I am making each pull request (these and the others I've submitted) entirely independent, each off the current master, but am also maintaining a fully merged branch with all of my pull requests here. These two pull requests above in particular require a minor piece of merge work: |
No worries @babbage! |
One feature of @orta original application was the ability to update a broken snapshot by just clicking a button.
This is useful in the event where you change text and want to update without having to disable and enable recording between tests. This might need some design, but some way to replace broken snapshots with new updates would be awesome.
The text was updated successfully, but these errors were encountered: