diff --git a/app/components/check_records/npq_summary_component.rb b/app/components/check_records/npq_summary_component.rb index 2f6ae8e9..9f4afc6b 100644 --- a/app/components/check_records/npq_summary_component.rb +++ b/app/components/check_records/npq_summary_component.rb @@ -9,7 +9,7 @@ def rows npqs.map do |npq| { key: { - text: ["Date", npq.name, "awarded"].join(" ") + text: key_text(npq) }, value: { text: npq.awarded_at.to_fs(:long_uk) @@ -17,4 +17,11 @@ def rows } end end + + private + + def key_text(npq) + tidied_name = npq.name.gsub(/National Professional Qualification \(NPQ\) for /, '') + "Date NPQ for #{tidied_name} awarded" + end end diff --git a/spec/support/fake_qualifications_data.rb b/spec/support/fake_qualifications_data.rb index 8fbfb746..3582a94a 100644 --- a/spec/support/fake_qualifications_data.rb +++ b/spec/support/fake_qualifications_data.rb @@ -74,7 +74,7 @@ def quals_data(trn: nil, itt: true) certificateUrl: "/v3/certificates/npq/missing", type: { code: "NPQSL", - name: "NPQ senior leadership" + name: "National Professional Qualification (NPQ) for Early Years Leadership" } } ], diff --git a/spec/system/check_records/user_searches_with_valid_last_name_and_dob_spec.rb b/spec/system/check_records/user_searches_with_valid_last_name_and_dob_spec.rb index 9bfe7269..506173e2 100644 --- a/spec/system/check_records/user_searches_with_valid_last_name_and_dob_spec.rb +++ b/spec/system/check_records/user_searches_with_valid_last_name_and_dob_spec.rb @@ -80,7 +80,7 @@ def then_i_see_itt_details end def then_i_see_npq_details - expect(page).to have_content("Date NPQ headteacher awarded") + expect(page).to have_content("Date NPQ for Early Years Leadership awarded") expect(page).to have_content("27 February 2023") end