-
Notifications
You must be signed in to change notification settings - Fork 41
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
Callback or promise so I can wait until visual diff editor closes before moving on to the next test? #96
Comments
It's a good question... I could see some benefit to making it more "synchronous" as you explained above. Currently it's just going to verify, throw up the tool - and sadly if you have 100 failures - it gets a little messy. But going through 100 synchronously feels like it could never end as well. Not sure how I think about this - maybe a PR that made it configurable would be interesting to explore. Personally I've never had a problem with them failing - I fix any with p4merge and once all the instances of the open tool windows have been addressed - re-run tests to re-verify (should be good habit anyway). Thoughts? |
Interesting -- what platform do you run it from? For me, on mac, each new failure uses the original p4merge window -- so my workflow is run them all with a donothing reporter, then rerun each failure individually and resolve it with p4merge. But maybe there's something I can change about either my p4merge setup on my machine, or the way the p4merge reporter delegates to p4merge in mac mode. The other part is that I like having the "resolve" command on my clipboard... it's not that bad to type it in the terminal by reading p4merge titles and using tab completion, but it feels like an unnecessary step. I'm also using this on a project that is in it's baby stages, so there are often trivial UI changes that I want to approve. My guess is once things stabilize I won't have quite so many to approve all the time. So if the mac/p4merge thing doesn't go anywhere, here's what I was thinking for API changes: In That Promise could be passed through and returned by each of the
|
From a testing perspective, I was thinking we could write a unit test that uses a custom reporter that calls to a process that
|
+1 to something. I just tried approvals for the first time, and 300+ |
To follow up here... @mattgodbolt We've thrown a some updates into a beta build of approvals at v4.0.0-beta.2 to help with the 300+ meld sessions... Give it a look @alexanderbird - in doing some thinking I like the idea of verify returning a promise - but didn't get that in yet. There are a few knobs to play with at the config level that can help you now though (if you use a difftool that is more synchronous like |
👍🏻 Thanks for the update! |
@staxmanade Looks great: thanks! |
When I run my test suite and an approval test fails, it opens my reporter (p4merge). While I'm reviewing the changes, the test suite continues. Before I get a chance to approve the new received snapshot, the next test completes (also failing) and p4merge now shows the new failure. Also, my clipboard now has the command to approve the second and not the first.
One way I could see to resolve this is to have
approvals.verify
return a Promise that doesn't resolve until I close p4merge. I couldawait
it in the test suite -- I may have to set an unlimited timeout, but that's fine by me.Or, am I just using
approvals.verify
wrong?Setup
Assertion (this.page is a Puppeteer page)
Also: thanks for this tool, it's awesome!
The text was updated successfully, but these errors were encountered: