leonhardt
07/12/2025, 5:38 PMorg.http4k:http4k-testing-approval
in conjunction with your Okey-doke plugin for a couple months now. The tool + plugin has definitely a huge improvement over renaming the generated files manually, but now that we've been living with the process for a while a few DX issues have surfaced:
1. It's hard to know if the keyboard shortcut (Ctrl + F11) worked. You have to have the cursor focused in the right place. Precise placement in the editor on the test or in the project viewer on the file both work, but (perhaps unintuitively) the test execution's run window/console does not work. And there's no visual indication if it worked, beyond navigating to the file in the project viewer. As a result I've noticed we just hit Ctrl + F11 obsessively in every window "just to make sure."
2. When we rename tests, the generated approval files get abandoned. We often don't notice initially, and only after some time notice when there's many more approval files than tests. The process to clean up the clutter is tricky. We usually make sure all our tests are passing, commit, delete all the approval files, rerun tests, approve all the approval files, and commit again. But this is a little error-prone and tedious.
When we only had 1-20 tests, these weren't big issues. But now that we're in the 100s it's painful enough issue we're looking to address it. Thought we'd check with the community here. Can anybody recommend any better ways to work with org.http4k:http4k-testing-approval
that we might have missed?dave
07/12/2025, 6:06 PMs4nchez
07/13/2025, 8:36 AMApproved n tests
info in the status bar after approving. It shouldn't be too hard to turn that into notification to make it more prominent.
Re: shortcut not working in some contexts, I suspect it's because the shortcut only works when there's something selected to approve (i.e. there's no global, context-independent approval action)s4nchez
07/13/2025, 8:39 AMgenerated approval files get abandonedThe method David described (make sure all passes, remove all files, run all tests and approve them again) is the only guaranteed to work. The plugin does not understand how those files are generated (that's why it works with multiple approval libraries, as long as they generate .approve and .actual files). The only thing that perhaps it could do is look at file update timestamps, but even that feels like is likely to be flaky.
leonhardt
07/13/2025, 7:21 PMs4nchez
07/13/2025, 7:32 PMleonhardt
07/13/2025, 7:47 PM