From 56ce3d5eaff2c5496a157d9aab6887087536bba4 Mon Sep 17 00:00:00 2001 From: Alkesh Vaghmaria Date: Wed, 28 Aug 2024 13:35:18 +0100 Subject: [PATCH] Update error messages in claimant journey --- .../contract_type_form.rb | 9 ++++++- .../fixed_term_contract_form.rb | 11 +++++---- ...ther_education_teaching_start_year_form.rb | 20 ++++++++++------ .../teaching_hours_per_week_form.rb | 9 ++++++- .../teaching_hours_per_week_next_term_form.rb | 7 +++--- .../claims/fixed_term_contract.html.erb | 4 ++-- config/locales/en.yml | 24 +++++++++---------- ...building_construction_courses_form_spec.rb | 4 ++-- .../chemistry_courses_form_spec.rb | 4 ++-- .../computing_courses_form_spec.rb | 4 ++-- .../contract_type_form_spec.rb | 2 +- .../early_years_courses_form_spec.rb | 4 ++-- ...neering_manufacturing_courses_form_spec.rb | 4 ++-- .../fixed_term_contract_form_spec.rb | 12 ++++++---- ...er_education_provision_search_form_spec.rb | 2 +- ...education_teaching_start_year_form_spec.rb | 12 ++++++---- .../maths_courses_form_spec.rb | 4 ++-- .../physics_courses_form_spec.rb | 4 ++-- .../select_provision_form_spec.rb | 2 +- .../subjects_taught_form_spec.rb | 4 ++-- .../teaching_hours_per_week_form_spec.rb | 2 +- ...hing_hours_per_week_next_term_form_spec.rb | 2 +- .../teaching_qualification_form_spec.rb | 4 ++-- 23 files changed, 91 insertions(+), 63 deletions(-) diff --git a/app/forms/journeys/further_education_payments/contract_type_form.rb b/app/forms/journeys/further_education_payments/contract_type_form.rb index 1b1ace4f32..29539aa930 100644 --- a/app/forms/journeys/further_education_payments/contract_type_form.rb +++ b/app/forms/journeys/further_education_payments/contract_type_form.rb @@ -4,7 +4,10 @@ class ContractTypeForm < Form attribute :contract_type, :string validates :contract_type, - inclusion: {in: ->(form) { form.radio_options.map(&:id) }, message: i18n_error_message(:inclusion)} + inclusion: { + in: ->(form) { form.radio_options.map(&:id) }, + message: ->(object, data) { i18n_error_message(:inclusion, school_name: object.school.name).call(object, data) } + } def radio_options [ @@ -34,6 +37,10 @@ def save journey_session.save! end + def school + journey_session.answers.school + end + private def reset_dependent_answers diff --git a/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb b/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb index b0bdcac443..d670a85f57 100644 --- a/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb +++ b/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb @@ -4,17 +4,20 @@ class FixedTermContractForm < Form attribute :fixed_term_full_year, :boolean validates :fixed_term_full_year, - inclusion: {in: ->(form) { form.radio_options.map(&:id) }, message: i18n_error_message(:inclusion)} + inclusion: { + in: ->(form) { form.radio_options.map(&:id) }, + message: ->(object, data) { i18n_error_message(:inclusion, current_academic_year: object.current_academic_year).call(object, data) } + } def radio_options [ OpenStruct.new( id: true, - name: t("options.true", current_academic_year: current_academic_year.to_s(:long)) + name: t("options.true", current_academic_year: current_academic_year) ), OpenStruct.new( id: false, - name: t("options.false", current_academic_year: current_academic_year.to_s(:long)) + name: t("options.false", current_academic_year: current_academic_year) ) ] end @@ -27,7 +30,7 @@ def save end def current_academic_year - @current_academic_year ||= AcademicYear.current + @current_academic_year ||= AcademicYear.current.to_s(:long) end end end diff --git a/app/forms/journeys/further_education_payments/further_education_teaching_start_year_form.rb b/app/forms/journeys/further_education_payments/further_education_teaching_start_year_form.rb index cf5933d1c2..ef92ae3b24 100644 --- a/app/forms/journeys/further_education_payments/further_education_teaching_start_year_form.rb +++ b/app/forms/journeys/further_education_payments/further_education_teaching_start_year_form.rb @@ -4,12 +4,14 @@ class FurtherEducationTeachingStartYearForm < Form attribute :further_education_teaching_start_year, :string validates :further_education_teaching_start_year, - presence: {message: i18n_error_message(:blank)} + presence: { + message: ->(object, data) { i18n_error_message(:blank, before_year: object.before_year).call(object, data) } + } - def radio_options - years_before = -4 + YEARS_BEFORE = -4 - array = (years_before..0).map do |delta| + def radio_options + array = (YEARS_BEFORE..0).map do |delta| academic_year = AcademicYear.current + delta OpenStruct.new( id: academic_year.start_year.to_s, @@ -17,10 +19,9 @@ def radio_options ) end - academic_year = AcademicYear.current + years_before array << OpenStruct.new( - id: "pre-#{academic_year.start_year}", - name: t("options.before_date", year: academic_year.start_year) + id: "pre-#{before_year}", + name: t("options.before_date", year: before_year) ) array @@ -32,6 +33,11 @@ def save journey_session.answers.assign_attributes(further_education_teaching_start_year:) journey_session.save! end + + def before_year + academic_year = AcademicYear.current + YEARS_BEFORE + academic_year.start_year + end end end end diff --git a/app/forms/journeys/further_education_payments/teaching_hours_per_week_form.rb b/app/forms/journeys/further_education_payments/teaching_hours_per_week_form.rb index 92cbbb3862..38bc814746 100644 --- a/app/forms/journeys/further_education_payments/teaching_hours_per_week_form.rb +++ b/app/forms/journeys/further_education_payments/teaching_hours_per_week_form.rb @@ -4,7 +4,10 @@ class TeachingHoursPerWeekForm < Form attribute :teaching_hours_per_week, :string validates :teaching_hours_per_week, - inclusion: {in: ->(form) { form.radio_options.map(&:id) }, message: i18n_error_message(:inclusion)} + inclusion: { + in: ->(form) { form.radio_options.map(&:id) }, + message: ->(object, data) { i18n_error_message(:inclusion, school_name: object.school.name).call(object, data) } + } def radio_options @radio_options ||= [ @@ -29,6 +32,10 @@ def save journey_session.answers.assign_attributes(teaching_hours_per_week:) journey_session.save! end + + def school + journey_session.answers.school + end end end end diff --git a/app/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form.rb b/app/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form.rb index fe8f724dfd..493e4beabf 100644 --- a/app/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form.rb +++ b/app/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form.rb @@ -4,7 +4,10 @@ class TeachingHoursPerWeekNextTermForm < Form attribute :teaching_hours_per_week_next_term, :string validates :teaching_hours_per_week_next_term, - inclusion: {in: ->(form) { form.radio_options.map(&:id) }, message: i18n_error_message(:inclusion)} + inclusion: { + in: ->(form) { form.radio_options.map(&:id) }, + message: ->(object, data) { i18n_error_message(:inclusion, school_name: object.school.name).call(object, data) } + } def radio_options @radio_options ||= [ @@ -26,8 +29,6 @@ def save journey_session.save! end - private - def school journey_session.answers.school end diff --git a/app/views/further_education_payments/claims/fixed_term_contract.html.erb b/app/views/further_education_payments/claims/fixed_term_contract.html.erb index f7a2ff8dcb..d31683bb64 100644 --- a/app/views/further_education_payments/claims/fixed_term_contract.html.erb +++ b/app/views/further_education_payments/claims/fixed_term_contract.html.erb @@ -1,4 +1,4 @@ -<% content_for(:page_title, page_title(@form.t(:question, academic_year: @form.current_academic_year.to_s(:long)), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +<% content_for(:page_title, page_title(@form.t(:question, academic_year: @form.current_academic_year), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>
@@ -7,7 +7,7 @@ <%= f.govuk_collection_radio_buttons :fixed_term_full_year, @form.radio_options, :id, :name, legend: { - text: @form.t(:question, academic_year: @form.current_academic_year.to_s(:long)), + text: @form.t(:question, academic_year: @form.current_academic_year), tag: "h1", size: "l" } %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8856c9ef89..159b5a37f2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -866,7 +866,7 @@ en: further_education_provision_search: question: Which FE provider are you employed by? errors: - blank: Enter a college name or postcode + blank: Enter the name of the FE provider you are employed by min_length: Enter a college name or postcode that is at least 3 characters long select_provision: heading: Select where you are employed @@ -874,7 +874,7 @@ en: Select the further education provider you are employed by. If you work for a college or sixth-form group, you should select the group name. errors: - blank: Select where you are employed + blank: Select the further education provider you are employed by contract_type: question: What type of contract do you have with %{school_name}? options: @@ -882,14 +882,14 @@ en: fixed_term: Fixed-term contract variable_hours: Variable hours contract errors: - inclusion: Select the contract type you have + inclusion: Select the type of contract you have with %{school_name} fixed_term_contract: question: Does your fixed-term contract cover the full %{academic_year} academic year? options: true: Yes, it covers the full %{current_academic_year} academic year false: No, it does not cover the full %{current_academic_year} academic year errors: - inclusion: Select yes if your fixed-term contract covers the full academic year + inclusion: Select yes if your fixed-term contract covers the full %{current_academic_year} academic year taught_at_least_one_term: question: Have you taught at %{school_name} for at least one academic term? options: @@ -906,7 +906,7 @@ en: between_2_5_and_12: Between 2.5 and 12 hours per week less_than_2_5: Less than 2.5 hours per week errors: - inclusion: Select how many hours per week you are timetabled to teach during the current term + inclusion: Select the number of hours you are timetabled to teach per week at %{school_name} during the current term teaching_hours_per_week_next_term: question: Are you timetabled to teach at least 2.5 hours per week at %{school_name} next term? hint: If you are unsure, you should speak to HR or apply when you know your arrangements for next term. @@ -914,14 +914,14 @@ en: at_least_2_5: Yes, I am timetabled to teach at least 2.5 hours per week at %{school_name} next term less_than_2_5: No, I’m not timetabled to teach at least 2.5 hours per week at %{school_name} next term errors: - inclusion: Select yes if you are timetabled to teach at least 2.5 hours next term otherwise select you are not + inclusion: Select yes if you are timetabled to teach at least 2.5 hours per week next term at %{school_name} further_education_teaching_start_year: question: Which academic year did you start teaching in further education (FE) in England? options: between_dates: September %{start_year} to August %{end_year} before_date: I started before September %{year} errors: - blank: Select which academic year you started teaching in further education in England + blank: Select the academic year you started teaching further education in England, or select ‘I started before September %{before_year}’ subjects_taught: question: Which subject areas do you teach? hint: Select all that apply @@ -935,13 +935,13 @@ en: physics: Physics none: I do not teach any of these subjects errors: - inclusion: Select the subject areas you teach in or select you do not teach any of the listed subject areas + inclusion: Select the subject areas that you teach, or select ‘I do not teach any of these subjects’ courses: &courses hint: |

If you are unsure whether the course(s) you teach is eligible, please email:
%{email}

Select all that apply

errors: - inclusion: Select all the courses you teach otherwise select you do not teach any of these courses + inclusion: Select the courses that you teach, or select ‘I do not teach any of these courses’ building_construction_courses: <<: *courses question: Which building and construction courses do you teach? @@ -1052,7 +1052,7 @@ en: no_but_planned: No, but I plan to enrol on one in the next 12 months no_not_planned: No, and I do not plan to enrol on one in the next 12 months errors: - inclusion: Select whether you have, are currently enrolled or plan to enrol on a teaching qualification + inclusion: Select if you have a teaching qualification, or are currently enrolled on one or are planning to enrol on one poor_performance: heading: Tell us if you are currently under any performance measures or disciplinary action questions: @@ -1069,9 +1069,9 @@ en: check with your FE provider as it will affect your eligibility. errors: performance: - inclusion: Select yes if you are subject to formal action for poor performance at work + inclusion: Select yes if any performance measures have been started against you disciplinary: - inclusion: Select yes if you are subject to disciplinary action + inclusion: Select yes if you are currently subject to disciplinary action half_teaching_hours: question: Are at least half of your timetabled teaching hours spent teaching 16 to 19-year-olds, including those up to diff --git a/spec/forms/journeys/further_education_payments/building_construction_courses_form_spec.rb b/spec/forms/journeys/further_education_payments/building_construction_courses_form_spec.rb index 7d328b8133..9f8d2033d0 100644 --- a/spec/forms/journeys/further_education_payments/building_construction_courses_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/building_construction_courses_form_spec.rb @@ -27,7 +27,7 @@ is_expected.not_to( allow_value([""]) .for(:building_construction_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end @@ -37,7 +37,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:building_construction_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end diff --git a/spec/forms/journeys/further_education_payments/chemistry_courses_form_spec.rb b/spec/forms/journeys/further_education_payments/chemistry_courses_form_spec.rb index 32c09a230a..2f25c9987d 100644 --- a/spec/forms/journeys/further_education_payments/chemistry_courses_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/chemistry_courses_form_spec.rb @@ -27,7 +27,7 @@ is_expected.not_to( allow_value([""]) .for(:chemistry_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end @@ -37,7 +37,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:chemistry_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end diff --git a/spec/forms/journeys/further_education_payments/computing_courses_form_spec.rb b/spec/forms/journeys/further_education_payments/computing_courses_form_spec.rb index 441cd22d10..2177f9a12c 100644 --- a/spec/forms/journeys/further_education_payments/computing_courses_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/computing_courses_form_spec.rb @@ -27,7 +27,7 @@ is_expected.not_to( allow_value([""]) .for(:computing_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end @@ -37,7 +37,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:computing_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end diff --git a/spec/forms/journeys/further_education_payments/contract_type_form_spec.rb b/spec/forms/journeys/further_education_payments/contract_type_form_spec.rb index ded36ef65c..a3c156b8c8 100644 --- a/spec/forms/journeys/further_education_payments/contract_type_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/contract_type_form_spec.rb @@ -29,7 +29,7 @@ is_expected.not_to( allow_value(nil) .for(:contract_type) - .with_message("Select the contract type you have") + .with_message("Select the type of contract you have with #{college.name}") ) end end diff --git a/spec/forms/journeys/further_education_payments/early_years_courses_form_spec.rb b/spec/forms/journeys/further_education_payments/early_years_courses_form_spec.rb index 6a20f65c70..910eb38cf2 100644 --- a/spec/forms/journeys/further_education_payments/early_years_courses_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/early_years_courses_form_spec.rb @@ -27,7 +27,7 @@ is_expected.not_to( allow_value([""]) .for(:early_years_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end @@ -37,7 +37,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:early_years_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end diff --git a/spec/forms/journeys/further_education_payments/engineering_manufacturing_courses_form_spec.rb b/spec/forms/journeys/further_education_payments/engineering_manufacturing_courses_form_spec.rb index 09e0a1fc4e..0f6a5a9061 100644 --- a/spec/forms/journeys/further_education_payments/engineering_manufacturing_courses_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/engineering_manufacturing_courses_form_spec.rb @@ -27,7 +27,7 @@ is_expected.not_to( allow_value([""]) .for(:engineering_manufacturing_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end @@ -37,7 +37,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:engineering_manufacturing_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end diff --git a/spec/forms/journeys/further_education_payments/fixed_term_contract_form_spec.rb b/spec/forms/journeys/further_education_payments/fixed_term_contract_form_spec.rb index 56e6059312..1e9dab5d9b 100644 --- a/spec/forms/journeys/further_education_payments/fixed_term_contract_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/fixed_term_contract_form_spec.rb @@ -23,11 +23,13 @@ describe "validations" do it do - is_expected.not_to( - allow_value(fixed_term_full_year) - .for(:fixed_term_full_year) - .with_message("Select yes if your fixed-term contract covers the full academic year") - ) + travel_to Date.new(2024, 10, 1) do + is_expected.not_to( + allow_value(fixed_term_full_year) + .for(:fixed_term_full_year) + .with_message("Select yes if your fixed-term contract covers the full 2024 to 2025 academic year") + ) + end end end diff --git a/spec/forms/journeys/further_education_payments/further_education_provision_search_form_spec.rb b/spec/forms/journeys/further_education_payments/further_education_provision_search_form_spec.rb index ab8130978d..1f01187c4c 100644 --- a/spec/forms/journeys/further_education_payments/further_education_provision_search_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/further_education_provision_search_form_spec.rb @@ -33,7 +33,7 @@ is_expected.not_to( allow_value(provision_search) .for(:provision_search) - .with_message("Enter a college name or postcode") + .with_message("Enter the name of the FE provider you are employed by") ) end end diff --git a/spec/forms/journeys/further_education_payments/further_education_teaching_start_year_form_spec.rb b/spec/forms/journeys/further_education_payments/further_education_teaching_start_year_form_spec.rb index cdd8503fa5..3912c84124 100644 --- a/spec/forms/journeys/further_education_payments/further_education_teaching_start_year_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/further_education_teaching_start_year_form_spec.rb @@ -46,11 +46,13 @@ let(:further_education_teaching_start_year) { nil } it do - is_expected.not_to( - allow_value(further_education_teaching_start_year) - .for(:further_education_teaching_start_year) - .with_message("Select which academic year you started teaching in further education in England") - ) + travel_to Date.new(2024, 12, 1) do + is_expected.not_to( + allow_value(further_education_teaching_start_year) + .for(:further_education_teaching_start_year) + .with_message("Select the academic year you started teaching further education in England, or select ‘I started before September 2020’") + ) + end end end diff --git a/spec/forms/journeys/further_education_payments/maths_courses_form_spec.rb b/spec/forms/journeys/further_education_payments/maths_courses_form_spec.rb index f427b4f8c3..551825144c 100644 --- a/spec/forms/journeys/further_education_payments/maths_courses_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/maths_courses_form_spec.rb @@ -27,7 +27,7 @@ is_expected.not_to( allow_value([""]) .for(:maths_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end @@ -37,7 +37,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:maths_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end diff --git a/spec/forms/journeys/further_education_payments/physics_courses_form_spec.rb b/spec/forms/journeys/further_education_payments/physics_courses_form_spec.rb index 3b9bc198ab..e162d9cd58 100644 --- a/spec/forms/journeys/further_education_payments/physics_courses_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/physics_courses_form_spec.rb @@ -27,7 +27,7 @@ is_expected.not_to( allow_value([""]) .for(:physics_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end @@ -37,7 +37,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:physics_courses) - .with_message("Select all the courses you teach otherwise select you do not teach any of these courses") + .with_message("Select the courses that you teach, or select ‘I do not teach any of these courses’") ) end end diff --git a/spec/forms/journeys/further_education_payments/select_provision_form_spec.rb b/spec/forms/journeys/further_education_payments/select_provision_form_spec.rb index 278cee9b4b..0d25173748 100644 --- a/spec/forms/journeys/further_education_payments/select_provision_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/select_provision_form_spec.rb @@ -28,7 +28,7 @@ is_expected.not_to( allow_value("") .for(:possible_school_id) - .with_message("Select where you are employed") + .with_message("Select the further education provider you are employed by") ) end end diff --git a/spec/forms/journeys/further_education_payments/subjects_taught_form_spec.rb b/spec/forms/journeys/further_education_payments/subjects_taught_form_spec.rb index fa1734b383..38eb4becc3 100644 --- a/spec/forms/journeys/further_education_payments/subjects_taught_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/subjects_taught_form_spec.rb @@ -31,7 +31,7 @@ is_expected.not_to( allow_value([]) .for(:subjects_taught) - .with_message("Select the subject areas you teach in or select you do not teach any of the listed subject areas") + .with_message("Select the subject areas that you teach, or select ‘I do not teach any of these subjects’") ) end end @@ -43,7 +43,7 @@ is_expected.not_to( allow_value(["foo"]) .for(:subjects_taught) - .with_message("Select the subject areas you teach in or select you do not teach any of the listed subject areas") + .with_message("Select the subject areas that you teach, or select ‘I do not teach any of these subjects’") ) end end diff --git a/spec/forms/journeys/further_education_payments/teaching_hours_per_week_form_spec.rb b/spec/forms/journeys/further_education_payments/teaching_hours_per_week_form_spec.rb index 68518709c3..cdf0d1a708 100644 --- a/spec/forms/journeys/further_education_payments/teaching_hours_per_week_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/teaching_hours_per_week_form_spec.rb @@ -33,7 +33,7 @@ is_expected.not_to( allow_value(nil) .for(:teaching_hours_per_week) - .with_message("Select how many hours per week you are timetabled to teach during the current term") + .with_message("Select the number of hours you are timetabled to teach per week at #{college.name} during the current term") ) end end diff --git a/spec/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form_spec.rb b/spec/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form_spec.rb index c197b64fdb..cfa8c09977 100644 --- a/spec/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/teaching_hours_per_week_next_term_form_spec.rb @@ -31,7 +31,7 @@ is_expected.not_to( allow_value(nil) .for(:teaching_hours_per_week_next_term) - .with_message("Select yes if you are timetabled to teach at least 2.5 hours next term otherwise select you are not") + .with_message("Select yes if you are timetabled to teach at least 2.5 hours per week next term at #{college.name}") ) end end diff --git a/spec/forms/journeys/further_education_payments/teaching_qualification_form_spec.rb b/spec/forms/journeys/further_education_payments/teaching_qualification_form_spec.rb index 1cb660aad5..573e6655cd 100644 --- a/spec/forms/journeys/further_education_payments/teaching_qualification_form_spec.rb +++ b/spec/forms/journeys/further_education_payments/teaching_qualification_form_spec.rb @@ -29,7 +29,7 @@ is_expected.not_to( allow_value(nil) .for(:teaching_qualification) - .with_message("Select whether you have, are currently enrolled or plan to enrol on a teaching qualification") + .with_message("Select if you have a teaching qualification, or are currently enrolled on one or are planning to enrol on one") ) end end @@ -41,7 +41,7 @@ is_expected.not_to( allow_value("foo") .for(:teaching_qualification) - .with_message("Select whether you have, are currently enrolled or plan to enrol on a teaching qualification") + .with_message("Select if you have a teaching qualification, or are currently enrolled on one or are planning to enrol on one") ) end end