Skip to content

Commit 64542d6

Browse files
committed
Hide vaccinations card on child record
When the `child_record_redesign` feature flag is enabled we don't need to display the vaccinations table on the child record tab. Jira-Issue: MAV-3837
1 parent 2744d51 commit 64542d6

2 files changed

Lines changed: 22 additions & 16 deletions

File tree

app/views/patients/show.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,7 @@
5454
<% end %>
5555
<% end %>
5656

57-
<%= vaccinations_card %>
57+
<% unless Flipper.enabled?(:child_record_redesign) %>
58+
<%= vaccinations_card %>
59+
<% end %>
5860
<% end %>

spec/components/app_patient_programmes_table_component_spec.rb

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@
2929
end
3030

3131
it { should have_content("Vaccination programmes") }
32-
it do
33-
should have_link(
34-
"Flu (winter 2025)",
35-
href: patient_programme_path(patient, "flu")
36-
)
32+
33+
it "renders a link to the Flu tab" do
34+
expect(rendered).to have_link(
35+
"Flu (winter 2025)",
36+
href: patient_programme_path(patient, "flu")
37+
)
3738
end
39+
3840
it { should_not have_content("Vaccinated") }
3941

4042
context "when vaccinated" do
@@ -149,17 +151,19 @@
149151

150152
it { should have_content("Vaccination programmes") }
151153
it { should have_link("HPV", href: patient_programme_path(patient, "hpv")) }
152-
it do
153-
should have_link(
154-
"Td/IPV",
155-
href: patient_programme_path(patient, "td_ipv")
156-
)
154+
155+
it "renders a link to the Td/IPV tab" do
156+
expect(rendered).to have_link(
157+
"Td/IPV",
158+
href: patient_programme_path(patient, "td_ipv")
159+
)
157160
end
158-
it do
159-
should have_link(
160-
"MenACWY",
161-
href: patient_programme_path(patient, "menacwy")
162-
)
161+
162+
it "renders a link to the MenACWY tab" do
163+
expect(rendered).to have_link(
164+
"MenACWY",
165+
href: patient_programme_path(patient, "menacwy")
166+
)
163167
end
164168

165169
context "when vaccinated last year" do

0 commit comments

Comments
 (0)