Skip to content

Commit c7a3e6f

Browse files
authored
Merge pull request #6448 from NHSDigital/mike/use-initials-on-vaccs-record
Use patient's initials and programme in vaccs record page title
2 parents a31551e + e4c0aca commit c7a3e6f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

app/views/vaccination_records/show.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<%= render AppBreadcrumbComponent.new(items: @breadcrumb_items) %>
33
<% end %>
44

5-
<%= h1 @patient.full_name %>
5+
<%= h1 page_title: "#{@patient.initials} – #{@vaccination_record.programme.name}" do %>
6+
<%= @patient.full_name %>
7+
<% end %>
68

79
<%= render AppPatientCardComponent.new(@patient, current_team:, show_parents: !current_team.has_national_reporting_access?) %>
810

spec/features/edit_vaccination_record_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
when_i_go_to_the_vaccination_record_for_the_patient
1515
then_i_should_see_the_vaccination_record
16+
and_i_should_see_the_correct_page_title
1617

1718
when_i_click_on_edit_vaccination_record
1819
then_i_see_the_edit_vaccination_record_page
@@ -714,6 +715,10 @@ def then_i_should_see_the_vaccination_record
714715
expect(page).to have_content("Full nameSMITH, John")
715716
end
716717

718+
def and_i_should_see_the_correct_page_title
719+
expect(page.title).to include("JS – HPV")
720+
end
721+
717722
def when_i_click_on_edit_vaccination_record
718723
click_on "Edit vaccination record"
719724
end

0 commit comments

Comments
 (0)