Add UI snapshot test for simple case #2368
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a PR for a branch that I have been working on a couple of weeks ago. I did not want this to get lost, so I decided to open a PR, in particular because I discovered there were some open questions with respect to UI tests.
I think this works really well for cases where the program exits with an error message.
I found it quite challenging, though, when it comes to testing an application interactively because
snapbox, the library that powers the snapshot test, isn’t designed for that use case. There’s potentially ways to work around that via environment variables or command line arguments, but before I go down that route, I first wanted to get your opinion on whether you think it’s worth putting more effort into this. I still think if we can get this to work, we’d have the option to write truly useful high-level regression tests of which I’m a big fan. What do you think? @extrawurst2024-09-24: I’ll add more context and fix the failing test soon.