-
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
Return log 'received' confirmation page #1670
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-4888 When a user has started the `Submit` journey on a `Due` return log, has completed the two previous pages, and selected `Record receipt` they will arrive at the confirm received page. This page will update the return log for the licence with a status of `Received` and updated `received_date` in the database. This PR creates the return log received confirmation page.
… page for due returns
…firmed-received`
…the session if `record-receipt` journey selected on a `due` return log
'confirm-received' isn't a "thing", so it cannot be fetched. So, we update the fetch service's name to reflect what it is actually fetching.
Will be handy to explain why this submit controller is doing something different to the others.
In the service it self, we just needed to update it to reflect the name change of the fetch service. The key change was in the tests. There was clearly some confusion with references to sessions, when this page actually has nothing to do with the setup session. Plus tests for things the page doesn't actually do (they happen elsewhere). But the ky change is to take advantage of why we have services and separate fetch modules. It means we can stub the fetch and avoid interacting with the DB.
This is where if a user has selected to record receipt of a return log only, we make all our changes to the DB. The critical issues were - we were setting the status to `completed` and not `received` - we were not setting the `updatedAt` field to reflect the date and time of the change Other than that, we just did a bit of refactoring to move the logic that does this into its own method.
We update the 'Arrange' part of the tests to better reflect a 'real' scenario. We also only generate a return log to update for those tests that require it. We merge those tests that require checking the return log was properly updated to reduce the number of DB interactions we depend on.
Cruikshanks
approved these changes
Feb 14, 2025
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.
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-4888
When a user has started the
Submit
journey on aDue
return log, has completed the two previous pages, and selectedRecord receipt
they will arrive at the confirm received page. This page will update the return log for the licence with a status ofReceived
and updatedreceived_date
in the database.This PR creates the return log received confirmation page.