Closed CalvinRodo closed 4 years ago
Found another path that will show CERB incorrectly. Route 1: Income not affected - You're on paid leave - etc. - doesn't show CERB as designed.
Then I did Route 2: Some income lost - You're retired and lost part time work - $5,000 or more - etc. shows CERB as designed.
Then I went back and did Route 1 again, it showed CERB when it shouldn't have. Went back again to Route 2 and saw that the $5,000 or more option was still selected as I was going through it.
Looks good, thanks for fixing it so quickly.
Description
Add a pruneSessionData method to the session.helpers.js that allows us to remove form data from the session.
This fixes the bug where the user uses the back key to navigate back to see what a different path would return and we ended up with multiple benefits.
Also adds a test that duplicates this bug.
Closes #378
To Test
Navigate around the site using the back button to go back to some forks in the flow and visit down those.
You should only see benefits that are relevant to the fork you are on.
Figma is really useful for visualizing the different paths.