Improve HTML route & template test coverage #31

Merged
glyph merged 5 commits from route_test_coverage into main 2021-11-22 10:20:10 +00:00
Owner
  • Adds tests for HTML routes & templates which were not previously covered
  • Updates existing tests based on template changes
  • Sorts HTML tests into alphabetised sections
  • Minor fix of context.back and context.title for the change_password route and template
- Adds tests for HTML routes & templates which were not previously covered - Updates existing tests based on template changes - Sorts HTML tests into alphabetised sections - Minor fix of `context.back` and `context.title` for the `change_password` route and template
glyph added the
maintenance
peach-web
labels 2021-11-18 09:58:29 +00:00
glyph added 4 commits 2021-11-18 09:58:30 +00:00
glyph requested review from notplants 2021-11-18 09:58:39 +00:00
Owner

Looks good to me. Thanks for fixing the change password title.

The tests that test .post routes passing arguments, and .get routes which make complicated calls to retrieve data, seem more valuable to me as tests, to ensure there are no regressions. The .get tests which just confirm the page renders for a particular route seem less valuable but if its just one test per route that seems pretty manageable.

Looks good to me. Thanks for fixing the change password title. The tests that test .post routes passing arguments, and .get routes which make complicated calls to retrieve data, seem more valuable to me as tests, to ensure there are no regressions. The .get tests which just confirm the page renders for a particular route seem less valuable but if its just one test per route that seems pretty manageable.
Author
Owner

Thanks for taking a look!

Agreed that we need more test coverage for GET and POST routes. I'd like to learn how to mock the backend data to make those tests as accurate as possible.

The HTML tests are great because they test routes and template rendering in one go. This is especially helpful for templates with more complex context logic; if we mess up a variable name or some tera operation the tests will alert us. I can remember testing by clicking through the whole interface manually in the early days of peach-web 😅 That was tedious.

Thanks for taking a look! Agreed that we need more test coverage for GET and POST routes. I'd like to learn how to mock the backend data to make those tests as accurate as possible. The HTML tests are great because they test routes and template rendering in one go. This is especially helpful for templates with more complex context logic; if we mess up a variable name or some tera operation the tests will alert us. I can remember testing by clicking through the whole interface manually in the early days of peach-web 😅 That was tedious.
glyph added 1 commit 2021-11-22 10:18:54 +00:00
glyph merged commit 6fb5b58d6c into main 2021-11-22 10:20:10 +00:00
glyph deleted branch route_test_coverage 2021-11-22 10:20:11 +00:00
Sign in to join this conversation.
No description provided.