-
Notifications
You must be signed in to change notification settings - Fork 20
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
Improve coverage #4228
Improve coverage #4228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! ⭐
There's only one nitpick in the comments.
spec/system/sign_in_spec.rb
Outdated
context "rendering the sign-in help page" do | ||
before do | ||
payload = { | ||
base_path: "/help/sign-in", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking nitpick. This should be /sign-in
to match the base_path used in the rest of these tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, d'oh. Thanks!
e3b2d84
to
13fd4e1
Compare
- the links in the travel advice index are all countries, and countries have to have a name (it's required in the schema), so no need to test here.
- this method is never called.
- Add tests to complete coverage
- Fix this bug, and update the tests that were all passing only because this bug existed. - Remove the dev-mode only passthrough, as its not clear it's needed (probably only useful for local testing of email-alert-frontend, and even then its probably better to test end-to-end in integration).
- details is required in the schema, so remove test for it in the delegation block - places must not be nil, so remove safe navigation marker in preposition - Update tests to test #preposition.
d14ff94
to
552a956
Compare
What
Various updates to improve coverage, plus bug fixes discovered while improving coverage:
Current improvement in line coverage: 97.99% -> 98.47%
Current improvement in branch coverage: 86.36% -> 89.39%
Why
As we move the routes from government-frontend over, the better our existing coverage the easier it will be to spot coverage problems in the new code. Ideally if we have 100% line coverage, any lack of coverage in the new code will stick out like a sore thumb. We should also strive for 100% branch coverage as a secondary goal.
https://trello.com/c/cCAkk9wZ/300-consolidate-4-frontend-apps
How
Screenshots?