-
Notifications
You must be signed in to change notification settings - Fork 74
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
Accepting Changes Automatically #590
Comments
hello, I think we have exactly what you are looking for. You'd want to use a different Reporter. Iirc the class name would be
Replying from iPad here currently, I'll have a proper look later and will update my comment where I didn't remember the syntax correctly anymore. Lars |
Updated my answer, let me know if there are still issues or if it's not quite what you have in mind. Grüße aus Estland ;) PS: oddly enough, the 2nd options with |
I guess that works, thanks for the insightful response @LarsEckart! 🙂 |
Hi,
I am using ApprovalTests.Java for a while now and was wondering whether you would be open to a feature request (or tell me how I can improve my development workflow).
Having done some Rust recently, I am used to the cargo-insta snapshot testing library. One thing I like about insta is, that it displays the diff directly in the terminal where cargo build is executed and you are presented with the option to accept or reject the changes with a key-press (y/n).
With ApprovalTests the diff view - in my case in IntelliJ - opens, which is fine in most cases. But with an increasing number of changed files and diffs, this causes a cascade of many diff windows during each change.
It may be just how I like to do it, but in my daily workflow I like to review all changes in git before I commit. So to me, clicking all those diff windows feels tedious - where I would just press "y" in insta.
I thought about automating this process by scripting it, something along the lines of
for f in *.received.* ; do mv "$f" "${f/.received/.approved}"; done
but this feels a little awkward.Proposal: Add a convenience feature to accept all changes automatically.
Implementation idea: A system property e.g. provided at build time:
or environment variable
that causes ApprovalTests to override the
*.approved.*
files with their changes without prompting.The text was updated successfully, but these errors were encountered: