From 682d4e3ca828dfd9b3dd6263231f04c6c876eab0 Mon Sep 17 00:00:00 2001 From: Richard Lynch Date: Tue, 3 Dec 2024 15:01:39 +0000 Subject: [PATCH] Fix hint text Previously the hint text was showing all subjects to claimants, even if they were not eligible for those subjects, instead only show subjects the claimant is eligible for. If the claimant is not eligible for any subjects they will have been kicked out of the journey prior to this screen. --- app/helpers/claims/itt_subject_helper.rb | 5 ++++- spec/helpers/claims/itt_subject_helper_spec.rb | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/helpers/claims/itt_subject_helper.rb b/app/helpers/claims/itt_subject_helper.rb index 2a6a4253e7..07ad7d2d31 100644 --- a/app/helpers/claims/itt_subject_helper.rb +++ b/app/helpers/claims/itt_subject_helper.rb @@ -1,7 +1,10 @@ module Claims module IttSubjectHelper def subjects_to_sentence_for_hint_text(answers) - all_ecp_subjects = [:chemistry, :foreign_languages, :mathematics, :physics] + all_ecp_subjects = Policies::EarlyCareerPayments.subject_symbols( + claim_year: answers.policy_year, + itt_year: answers.itt_academic_year + ) all_lup_subjects = Policies::LevellingUpPremiumPayments.fixed_subject_symbols hint_subject_symbols = Set[] diff --git a/spec/helpers/claims/itt_subject_helper_spec.rb b/spec/helpers/claims/itt_subject_helper_spec.rb index 77ac2364c0..3c1c4b4ff3 100644 --- a/spec/helpers/claims/itt_subject_helper_spec.rb +++ b/spec/helpers/claims/itt_subject_helper_spec.rb @@ -94,7 +94,8 @@ build( :additional_payments_answers, :lup_ineligible, - :ecp_eligible_later + :ecp_eligible_later, + itt_academic_year: AcademicYear.new(2020) ) end