Skip to content

Commit 9d28f93

Browse files
authored
Merge pull request #4109 from nhsuk/fix-consent-given-labels
2 parents 9574e93 + 6e4519b commit 9d28f93

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

config/locales/en.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
en:
22
activemodel:
3-
attributes:
4-
draft_consent:
5-
responses:
6-
given: Consent given
7-
given_injection: Consent given
8-
given_nasal: Consent given
9-
not_provided: Not provided
10-
refused: Consent refused
113
errors:
124
models:
135
batch_form:
@@ -158,6 +150,8 @@ en:
158150
will_be_vaccinated_elsewhere: Vaccine will be given elsewhere
159151
responses:
160152
given: Consent given
153+
given_injection: Consent given
154+
given_nasal: Consent given
161155
not_provided: Not provided
162156
refused: Consent refused
163157
routes:

spec/features/verbal_consent_given_spec.rb

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@
1515
and_i_can_see_the_consent_response_details
1616
end
1717

18+
scenario "Given flu injection" do
19+
given_an_flu_programme_is_underway
20+
and_i_am_signed_in
21+
22+
when_i_record_that_verbal_injection_consent_was_given
23+
then_i_see_the_check_and_confirm_page
24+
and_i_see_the_flu_injection_consent_given
25+
26+
when_i_confirm_the_consent_response
27+
then_an_email_is_sent_to_the_parent_confirming_their_consent
28+
and_a_text_is_sent_to_the_parent_confirming_their_consent
29+
end
30+
1831
scenario "Given flu nasal spray" do
1932
given_an_flu_programme_is_underway
2033
and_i_am_signed_in
@@ -71,6 +84,14 @@ def when_i_record_that_verbal_consent_was_given
7184
)
7285
end
7386

87+
def when_i_record_that_verbal_injection_consent_was_given
88+
record_that_verbal_consent_was_given(
89+
consent_option: "Yes, for the injected vaccine only",
90+
number_of_health_questions: 4,
91+
triage_option: "Yes, it’s safe to vaccinate with injected vaccine"
92+
)
93+
end
94+
7495
def when_i_record_that_verbal_nasal_consent_was_given
7596
record_that_verbal_consent_was_given(
7697
consent_option: "Yes, for the nasal spray",
@@ -140,13 +161,17 @@ def then_i_see_the_check_and_confirm_page
140161
expect(page).to have_content(["Method", "By phone"].join)
141162
end
142163

164+
def and_i_see_the_flu_injection_consent_given
165+
expect(page).to have_content("Consent givenInjection")
166+
end
167+
143168
def and_i_see_the_flu_nasal_consent_given
144-
expect(page).to have_content("Given nasalNasal spray")
169+
expect(page).to have_content("Consent givenNasal spray")
145170
expect(page).to have_content("Consent also given for injected vaccine?No")
146171
end
147172

148173
def and_i_see_the_flu_nasal_and_injection_consent_given
149-
expect(page).to have_content("Given nasalNasal spray")
174+
expect(page).to have_content("Consent givenNasal spray")
150175
expect(page).to have_content("Consent also given for injected vaccine?Yes")
151176
end
152177

0 commit comments

Comments
 (0)