diff --git a/app/models/journeys/get_a_teacher_relocation_payment/answers_presenter.rb b/app/models/journeys/get_a_teacher_relocation_payment/answers_presenter.rb index b338407226..ec332742d5 100644 --- a/app/models/journeys/get_a_teacher_relocation_payment/answers_presenter.rb +++ b/app/models/journeys/get_a_teacher_relocation_payment/answers_presenter.rb @@ -8,6 +8,7 @@ def eligibility_answers a << application_route a << state_funded_secondary_school a << current_school + a << school_headteacher_name a << contract_details a << start_date_details a << subject_details @@ -23,12 +24,6 @@ def identity_answers end end - def employment_answers - [].tap do |a| - a << school_headteacher_name - end - end - private def show_trn? diff --git a/app/models/journeys/get_a_teacher_relocation_payment/slug_sequence.rb b/app/models/journeys/get_a_teacher_relocation_payment/slug_sequence.rb index 4d35d01c86..3974c56afe 100644 --- a/app/models/journeys/get_a_teacher_relocation_payment/slug_sequence.rb +++ b/app/models/journeys/get_a_teacher_relocation_payment/slug_sequence.rb @@ -5,6 +5,7 @@ class SlugSequence "application-route", "state-funded-secondary-school", "current-school", + "headteacher-details", "contract-details", "start-date", "subject", @@ -16,7 +17,6 @@ class SlugSequence PERSONAL_DETAILS_SLUGS = [ "nationality", "passport-number", - "headteacher-details", "personal-details", "postcode-search", "select-home-address", diff --git a/app/views/get_a_teacher_relocation_payment/claims/check_your_answers.html.erb b/app/views/get_a_teacher_relocation_payment/claims/check_your_answers.html.erb index b611eb0d72..7ec5c0d37c 100644 --- a/app/views/get_a_teacher_relocation_payment/claims/check_your_answers.html.erb +++ b/app/views/get_a_teacher_relocation_payment/claims/check_your_answers.html.erb @@ -23,14 +23,6 @@ } ) %> - <%= render( - partial: "claims/check_your_answers_section", - locals: { - heading: "Employment information", - answers: journey.answers_for_claim(@form.journey_session).employment_answers - } - ) %> - <%= render( partial: "claims/check_your_answers_section", locals: { diff --git a/spec/factories/journeys/get_a_teacher_relocation_payment/get_a_teacher_relocation_payment_answers.rb b/spec/factories/journeys/get_a_teacher_relocation_payment/get_a_teacher_relocation_payment_answers.rb index dcce9946a4..648e80e2ef 100644 --- a/spec/factories/journeys/get_a_teacher_relocation_payment/get_a_teacher_relocation_payment_answers.rb +++ b/spec/factories/journeys/get_a_teacher_relocation_payment/get_a_teacher_relocation_payment_answers.rb @@ -70,7 +70,7 @@ bank_account_number { rand(10000000..99999999) } end - trait :with_employment_details do + trait :with_headteacher_details do school_headteacher_name { "Seymour Skinner" } end @@ -78,6 +78,7 @@ with_teacher_application_route with_state_funded_secondary_school with_current_school + with_headteacher_details with_one_year_contract with_start_date with_visa diff --git a/spec/features/get_a_teacher_relocation_payment/ineligible_route_completing_the_form_spec.rb b/spec/features/get_a_teacher_relocation_payment/ineligible_route_completing_the_form_spec.rb index 73944cbeb0..637c37c219 100644 --- a/spec/features/get_a_teacher_relocation_payment/ineligible_route_completing_the_form_spec.rb +++ b/spec/features/get_a_teacher_relocation_payment/ineligible_route_completing_the_form_spec.rb @@ -68,6 +68,7 @@ ) and_i_complete_the_state_funded_secondary_school_step_with(option: "Yes") and_i_complete_the_current_school_step(create(:school, phase: :secondary)) + and_i_complete_the_headteacher_step and_i_complete_the_contract_details_step_with(option: "No") then_i_see_the_ineligible_page end @@ -81,6 +82,7 @@ ) and_i_complete_the_state_funded_secondary_school_step_with(option: "Yes") and_i_complete_the_current_school_step(create(:school, phase: :secondary)) + and_i_complete_the_headteacher_step and_i_complete_the_contract_details_step_with(option: "Yes") and_i_complete_the_contract_start_date_step_with( date: Policies::InternationalRelocationPayments::PolicyEligibilityChecker @@ -98,6 +100,7 @@ ) and_i_complete_the_state_funded_secondary_school_step_with(option: "Yes") and_i_complete_the_current_school_step(create(:school, phase: :secondary)) + and_i_complete_the_headteacher_step and_i_complete_the_contract_details_step_with(option: "Yes") and_i_complete_the_contract_start_date_step_with( date: contract_start_date @@ -115,6 +118,7 @@ ) and_i_complete_the_state_funded_secondary_school_step_with(option: "Yes") and_i_complete_the_current_school_step(create(:school, phase: :secondary)) + and_i_complete_the_headteacher_step and_i_complete_the_contract_details_step_with(option: "Yes") and_i_complete_the_contract_start_date_step_with( date: contract_start_date @@ -133,6 +137,7 @@ ) and_i_complete_the_state_funded_secondary_school_step_with(option: "Yes") and_i_complete_the_current_school_step(create(:school, phase: :secondary)) + and_i_complete_the_headteacher_step and_i_complete_the_contract_details_step_with(option: "Yes") and_i_complete_the_contract_start_date_step_with( date: contract_start_date diff --git a/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb b/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb index c034ea0e6c..89a253c0e0 100644 --- a/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb +++ b/spec/features/get_a_teacher_relocation_payment/teacher_route_completing_the_form_spec.rb @@ -32,6 +32,7 @@ ) and_i_complete_the_state_funded_secondary_school_step_with(option: "Yes") and_i_complete_the_current_school_step(school) + and_i_complete_the_headteacher_step and_i_complete_the_contract_details_step_with(option: "Yes") and_i_complete_the_contract_start_date_step_with( date: contract_start_date @@ -47,7 +48,6 @@ it "submits an application" do and_i_complete_the_nationality_step_with(option: "Australian") and_i_complete_the_passport_number_step_with(options: "123456789") - and_i_complete_the_headteacher_step and_i_complete_the_personal_details_step and_i_complete_the_postcode_step and_i_complete_the_email_address_step @@ -64,7 +64,6 @@ it "submits an application", js: true do and_i_complete_the_nationality_step_with(option: "Australian") and_i_complete_the_passport_number_step_with(options: "123456789") - and_i_complete_the_headteacher_step and_i_complete_the_personal_details_step and_i_complete_the_manual_address_step and_i_complete_the_email_address_step @@ -81,7 +80,6 @@ it "submits an application" do and_i_complete_the_nationality_step_with(option: "Australian") and_i_complete_the_passport_number_step_with(options: "123456789") - and_i_complete_the_headteacher_step and_i_complete_the_personal_details_step and_i_complete_the_manual_address_step and_i_complete_the_email_address_step @@ -98,7 +96,6 @@ it "submits an application" do and_i_complete_the_nationality_step_with(option: "Australian") and_i_complete_the_passport_number_step_with(options: "123456789") - and_i_complete_the_headteacher_step and_i_complete_the_personal_details_step and_i_complete_the_manual_address_step and_i_complete_the_email_address_step @@ -131,6 +128,10 @@ def then_the_check_your_answers_part_one_page_shows_my_answers "Which school are you currently employed to teach at? #{school.name}" ) + expect(page).to have_text( + "Enter the name of the headteacher of the school where you are employed as a teacher Seymour Skinner" + ) + expect(page).to have_text( "Are you employed on a contract lasting at least one year? Yes" ) @@ -179,10 +180,6 @@ def then_the_check_your_answers_part_page_shows_my_answers(school, mobile_number "Enter your passport number, as it appears on your passport 123456789" ) - expect(page).to have_text( - "Enter the name of the headteacher of the school where you are employed as a teacher Seymour Skinner" - ) - if mobile_number expect(page).to have_text("Mobile number 01234567890") else diff --git a/spec/models/journeys/get_a_teacher_relocation_payment/answers_presenter_spec.rb b/spec/models/journeys/get_a_teacher_relocation_payment/answers_presenter_spec.rb index 3e8f58f4ed..1afd702632 100644 --- a/spec/models/journeys/get_a_teacher_relocation_payment/answers_presenter_spec.rb +++ b/spec/models/journeys/get_a_teacher_relocation_payment/answers_presenter_spec.rb @@ -16,6 +16,7 @@ :with_teacher_application_route, :with_state_funded_secondary_school, :with_current_school, + :with_headteacher_details, :with_one_year_contract, :with_start_date, :with_subject, @@ -32,15 +33,20 @@ "I am employed as a teacher in a school in England", "application-route" ], + [ + "Are you employed by an English state secondary school?", + "Yes", + "state-funded-secondary-school" + ], [ "Which school are you currently employed to teach at?", answers.current_school.name, "current-school" ], [ - "Are you employed by an English state secondary school?", - "Yes", - "state-funded-secondary-school" + "Enter the name of the headteacher of the school where you are employed as a teacher", + "Seymour Skinner", + "headteacher-details" ], [ "Are you employed on a contract lasting at least one year?", @@ -97,25 +103,4 @@ ) end end - - describe "#employment_answers" do - subject { presenter.employment_answers } - - let(:answers) do - build( - :get_a_teacher_relocation_payment_answers, - :with_employment_details - ) - end - - it do - is_expected.to include( - [ - "Enter the name of the headteacher of the school where you are employed as a teacher", - "Seymour Skinner", - "headteacher-details" - ] - ) - end - end end