Skip to content

Commit 1fa8e57

Browse files
authored
Avoid crash when editing response method (#3442)
When submitting self-consent via Gillick assessment, we should be able to change the response method without the service displaying an error page. At the moment, this takes the user back through the entire flow, but this is the case for all the other change links so I think that should be fixed in a further enhancement. Also, going back through the entire journey is currently the only way to change whether the parents should be notified or not so some design work is needed as well. [Jira Issue](https://nhsd-jira.digital.nhs.uk/browse/MAV-966)
2 parents 2775357 + 1acf7a3 commit 1fa8e57

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/views/draft_consents/confirm.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<%= render AppCardComponent.new do |card| %>
1515
<% card.with_heading { "Consent" } %>
1616
<%= render AppConsentSummaryComponent.new(@draft_consent, change_links: {
17-
response: wizard_path(:agree),
18-
route: wizard_path(:route),
17+
response: wizard_path("agree"),
18+
route: wizard_path(@draft_consent.via_self_consent? ? "who" : "route"),
1919
}) %>
2020
<% end %>
2121

spec/features/self_consent_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ def and_the_child_can_give_their_own_consent_that_the_nurse_records
199199
click_on "Continue"
200200

201201
# confirmation page
202+
click_on "Change response method"
203+
choose "Child (Gillick competent)"
204+
5.times { click_on "Continue" }
205+
202206
click_on "Confirm"
203207

204208
expect(page).to have_content("Consent recorded for #{@patient.full_name}")

0 commit comments

Comments
 (0)