-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use snapshot tests instead of HTML fixtures #42
Conversation
8fc7784
to
dde6b91
Compare
I changed the poetry CI cache key to include the full Python version (as per this) and it fixed the Python test job. It seems that there has been a Python bugfix release that was not playing nicely with the poetry environment built on an older version. |
tests/helpers/__snapshots__/test_form_helper/test_default_label_size.html
Show resolved
Hide resolved
67bfb94
to
29c3b68
Compare
I've added If we format the snapshots, we also need to format the rendered markup they are compared with. So, I've added a call to I've also added linting of templates with Linting and format checks have been added to pre-commit and CI. |
Closes #41
This PR adds syrupy, a pytest plugin for snapshot tests, to the project. The aim of this is to remove the need for manual maintenance of HTML fixtures.
In addition to adding syrupy, this PR:
The snapshots shouldn't need individual comparison with the old fixtures - they were generated from main branch, where all tests were passing.