-
Notifications
You must be signed in to change notification settings - Fork 1
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
EL-1725 EE back button #1594
base: main
Are you sure you want to change the base?
EL-1725 EE back button #1594
Conversation
8bfe537
to
cb91270
Compare
a31db9c
to
891349e
Compare
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.
Approved but would love to see if we can add another test to really verify the back button goes to the right place
@@ -5,7 +5,10 @@ | |||
= t(@check.controlled? ? ".controlled_qualifies" : ".likely_to_qualify") | |||
|
|||
- content_for :back do | |||
= link_to t("generic.back"), check_answers_path(assessment_code: params[:assessment_code]), class: "govuk-back-link" | |||
- if FeatureFlags.enabled?(:ee_banner, @check.session_data) && @early_result_type == "gross_income" |
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.
looks good - might not be necessary at the min but to future proof this for other early result type checks, you could just check for the presence of early_result_type
(rather than tying it to gross_income specifically), as the behaviour of going back to the previous step should be the same for all early results
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.
and early_result_type should only exist if they never saw 'Check Answers' (the place where we clear it out from the session)
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.
ooooh actually it's wouldn't exist for short checks e.g. passported! So maybe this is the best way for now, or maybe the condition is check for early result and check it isn't a 'short check'...will leave to you!
click_on "Go to results page" | ||
expect(page).to have_current_path(/\A\/check-result/) | ||
expect(page).to have_content "Your client's key eligibility totals" | ||
visit outgoings_url # simulates using the back button to return to outgoings |
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 see why you've done this - I wonder if we can add a test that really checks the back button is working as expected? Perhaps an end2end test might work? But not too sure
Jira ticket
What changed and why
change back button behaviour from results page when they arrive there from an ee result.
Guidance to review
Checklist
Before you ask people to review this PR: