From aaf644e81ae2eac16ecb13fcdb8835106bd5c119 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Mon, 1 Jul 2024 11:41:57 +0100 Subject: [PATCH] add eligible page to FE journey --- .../check_your_answers_form.rb | 9 +++++++ .../eligible_form.rb | 9 +++++++ .../journeys/further_education_payments.rb | 1 + .../slug_sequence.rb | 1 + .../claims/check_your_answers.html.erb | 4 +++ .../claims/eligible.html.erb | 26 +++++++++++++++++++ .../happy_js_path_spec.rb | 4 +++ .../happy_path_spec.rb | 4 +++ 8 files changed, 58 insertions(+) create mode 100644 app/forms/journeys/further_education_payments/check_your_answers_form.rb create mode 100644 app/forms/journeys/further_education_payments/eligible_form.rb create mode 100644 app/views/further_education_payments/claims/eligible.html.erb diff --git a/app/forms/journeys/further_education_payments/check_your_answers_form.rb b/app/forms/journeys/further_education_payments/check_your_answers_form.rb new file mode 100644 index 0000000000..ead9c4a800 --- /dev/null +++ b/app/forms/journeys/further_education_payments/check_your_answers_form.rb @@ -0,0 +1,9 @@ +module Journeys + module FurtherEducationPayments + class CheckYourAnswersForm < Form + def save + true + end + end + end +end diff --git a/app/forms/journeys/further_education_payments/eligible_form.rb b/app/forms/journeys/further_education_payments/eligible_form.rb new file mode 100644 index 0000000000..c1cebb5e1b --- /dev/null +++ b/app/forms/journeys/further_education_payments/eligible_form.rb @@ -0,0 +1,9 @@ +module Journeys + module FurtherEducationPayments + class EligibleForm < Form + def save + true + end + end + end +end diff --git a/app/models/journeys/further_education_payments.rb b/app/models/journeys/further_education_payments.rb index 6e6351c3a2..0a417d8184 100644 --- a/app/models/journeys/further_education_payments.rb +++ b/app/models/journeys/further_education_payments.rb @@ -18,6 +18,7 @@ module FurtherEducationPayments "subjects-taught" => SubjectsTaughtForm, "teaching-qualification" => TeachingQualificationForm, "poor-performance" => PoorPerformanceForm, + "check-your-answers" => CheckYourAnswersForm, "ineligible" => IneligibleForm } } diff --git a/app/models/journeys/further_education_payments/slug_sequence.rb b/app/models/journeys/further_education_payments/slug_sequence.rb index eca2f510c9..e55a8f29df 100644 --- a/app/models/journeys/further_education_payments/slug_sequence.rb +++ b/app/models/journeys/further_education_payments/slug_sequence.rb @@ -18,6 +18,7 @@ class SlugSequence RESULTS_SLUGS = %w[ check-your-answers + eligible ineligible ].freeze diff --git a/app/views/further_education_payments/claims/check_your_answers.html.erb b/app/views/further_education_payments/claims/check_your_answers.html.erb index 533f8cb82e..4cfef0b5be 100644 --- a/app/views/further_education_payments/claims/check_your_answers.html.erb +++ b/app/views/further_education_payments/claims/check_your_answers.html.erb @@ -1,3 +1,7 @@

FE check your answers goes here

+ +<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> + <%= f.govuk_submit %> +<% end %> diff --git a/app/views/further_education_payments/claims/eligible.html.erb b/app/views/further_education_payments/claims/eligible.html.erb new file mode 100644 index 0000000000..9a1a8936d9 --- /dev/null +++ b/app/views/further_education_payments/claims/eligible.html.erb @@ -0,0 +1,26 @@ +
+
+ <%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> + <%= govuk_panel( + title_text: "You’re eligible for a financial incentive payment", + html_attributes: { + class: "govuk-panel--informational" + } + ) %> + +
+ Based on what you’ve told us, you can apply for an early career further education financial incentive payment of: +
+ +
+ £??? +
+ +
+ For more information about why you are eligible, read about the <%= govuk_link_to "levelling up premium payments for early career further education teachers", "https://www.gov.uk/guidance/levelling-up-premium-payments-for-fe-teachers", new_tab: true %>. +
+ + <%= f.govuk_submit "Apply now" %> + <% end %> +
+
diff --git a/spec/features/further_education_payments/happy_js_path_spec.rb b/spec/features/further_education_payments/happy_js_path_spec.rb index 65760be790..31f3c45586 100644 --- a/spec/features/further_education_payments/happy_js_path_spec.rb +++ b/spec/features/further_education_payments/happy_js_path_spec.rb @@ -66,6 +66,10 @@ click_button "Continue" expect(page).to have_content("FE check your answers goes here") + click_button "Continue" + + expect(page).to have_content("You’re eligible for a financial incentive payment") + expect(page).to have_content("Apply now") end def when_further_education_payments_journey_configuration_exists diff --git a/spec/features/further_education_payments/happy_path_spec.rb b/spec/features/further_education_payments/happy_path_spec.rb index 4379d34daf..66d673dbe8 100644 --- a/spec/features/further_education_payments/happy_path_spec.rb +++ b/spec/features/further_education_payments/happy_path_spec.rb @@ -63,6 +63,10 @@ click_button "Continue" expect(page).to have_content("FE check your answers goes here") + click_button "Continue" + + expect(page).to have_content("You’re eligible for a financial incentive payment") + expect(page).to have_content("Apply now") end def when_further_education_payments_journey_configuration_exists