-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix bill run type in view licence bills tab #1159
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://eaflood.atlassian.net/browse/WATER-4316 > Part of the work to replace the legacy view licence page Whilst working on [Switch to GOV.UK table component for licence bills](#1158) we spotted that a Nunjucks filter was being used to title-case the bill run type. How the bill run type is displayed is not as simple as just title-casing what the DB returns. In fact, because there is some logic involved and we have had to use it in a number of places we've added it to the base presenter as a reusable formatter. This change corrects the view licence bills presenter to use the existing bill run type formatter.
We also need the scheme and whether the bill run was flagged as summer or not in order to correctly determine the bill run type.
We started with the aim of just updating the presenter to use the existing bill run type formatter. But we then spotted that the unit tests didn't follow our standard pattern of setting up test conditions in the `beforeEach()` (it was doing it in the `it`) It was also testing things that are using existing formatters that have their own tests which means there is no need to repeat them here. Finally, we felt we could simplify things if we renamed things to just be as they are (which meant some tweaks to the view as well). We also dropped `legacyId` from the presenter result because nothing in the view is using it.
Cruikshanks
force-pushed
the
fix-bill-type-in-view-licence
branch
from
July 2, 2024 23:00
4712c8d
to
24d632d
Compare
This makes the implementation consistent with the other services
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://eaflood.atlassian.net/browse/WATER-4316
While working on Switch to GOV.UK table component for licence bills we spotted that a Nunjucks filter was being used to title-case the bill run type. How the bill run type is displayed is not as simple as just title-casing what the DB returns. In fact, because there is some logic involved and we have had to use it in a number of places, we've added it to the base presenter as a reusable formatter.
This change corrects the view licence bills presenter to use the existing bill run type formatter.