-
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
Refactor purposes page to use purpose ids as values #1025
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.
I had 1 NIT about perhaps using map()
instead of the forEach()
.
My key question though is about replacing stubbing with injecting real records in the tests. I'm not sure it is necessary but happy to be proved wrong!
test/services/return-requirements/fetch-licence-purposes.service.test.js
Outdated
Show resolved
Hide resolved
test/services/return-requirements/fetch-licence-purposes.service.test.js
Outdated
Show resolved
Hide resolved
test/services/return-requirements/submit-purpose.service.test.js
Outdated
Show resolved
Hide resolved
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.
https://eaflood.atlassian.net/browse/WATER-4294
As part of our work to get the requirements for returns set up we need to know which of the purposes the user has selected in the manual journey so that we can then get the information later at the check your answers page.
This PR changes the logic to store the ID rather than the string which describes the purpose. that way we can look it up again.