diff --git a/app/forms/journeys/early_years_payment/practitioner/find_reference_form.rb b/app/forms/journeys/early_years_payment/practitioner/find_reference_form.rb index 1511006318..3e2adc3a9b 100644 --- a/app/forms/journeys/early_years_payment/practitioner/find_reference_form.rb +++ b/app/forms/journeys/early_years_payment/practitioner/find_reference_form.rb @@ -2,6 +2,9 @@ module Journeys module EarlyYearsPayment module Practitioner class FindReferenceForm < Form + def save + true + end end end end diff --git a/app/models/journeys/early_years_payment/practitioner/slug_sequence.rb b/app/models/journeys/early_years_payment/practitioner/slug_sequence.rb index 907ffa53b2..e2119be7c6 100644 --- a/app/models/journeys/early_years_payment/practitioner/slug_sequence.rb +++ b/app/models/journeys/early_years_payment/practitioner/slug_sequence.rb @@ -4,6 +4,9 @@ module Practitioner class SlugSequence SLUGS = %w[ find-reference + one-login-sign-in + how-we-use-your-information + personal-details ].freeze def self.start_page_url diff --git a/app/views/early_years_payment/practitioner/claims/find_reference.html.erb b/app/views/early_years_payment/practitioner/claims/find_reference.html.erb new file mode 100644 index 0000000000..6a5966adca --- /dev/null +++ b/app/views/early_years_payment/practitioner/claims/find_reference.html.erb @@ -0,0 +1 @@ +<%= govuk_button_to "Continue", claim_path(current_journey_routing_name), method: :patch %> diff --git a/app/views/early_years_payment/practitioner/claims/how_we_use_your_information.html.erb b/app/views/early_years_payment/practitioner/claims/how_we_use_your_information.html.erb new file mode 100644 index 0000000000..48bf7948f1 --- /dev/null +++ b/app/views/early_years_payment/practitioner/claims/how_we_use_your_information.html.erb @@ -0,0 +1,52 @@ +<% title = "How we’ll use the information you provide" %> +<% content_for(:page_title, page_title(title, journey: current_journey_routing_name)) %> + +
+
+ +

+ <%= title %> +

+ +

+ How we process your claim +

+ +

+ We’ll check the information you’ve given us with the early years provider where you currently work. +

+ +

+ How we pay you +

+ +

+ The Department for Education will make the payment directly to you. +

+ +

+ Student loan deductions +

+ +

+ If your payslip shows that you’re currently paying off a student loan, a deduction from your payment will go towards repaying it. +

+ +

+ If your payment takes you over the amount you must earn to start paying back a student loan, a deduction may go towards repaying it. + Read more about <%= govuk_link_to("when you start paying back a student loan", "https://www.gov.uk/repaying-your-student-loan/when-you-start-repaying") %> + and <%= govuk_link_to("what you’ll pay", "https://www.gov.uk/repaying-your-student-loan/what-you-pay") %>. +

+ +

+ Income Tax +

+ +

+ The Department for Education will pay Income Tax and National Insurance on your incentive payment if your total annual income is less than £50,270. +

+ + <%= govuk_button_to "Continue", claim_path(current_journey_routing_name), method: :patch %> + +
+
diff --git a/app/views/early_years_payment/practitioner/claims/one_login_sign_in.html.erb b/app/views/early_years_payment/practitioner/claims/one_login_sign_in.html.erb new file mode 100644 index 0000000000..e05d02bca9 --- /dev/null +++ b/app/views/early_years_payment/practitioner/claims/one_login_sign_in.html.erb @@ -0,0 +1,3 @@ +<%= 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/early_years_payment/practitioner/claims/personal_details.html.erb b/app/views/early_years_payment/practitioner/claims/personal_details.html.erb new file mode 100644 index 0000000000..e69de29bb2 diff --git a/config/locales/en.yml b/config/locales/en.yml index 4ebdac63b8..4bc0751e59 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1402,6 +1402,7 @@ en: early_years_payment_practitioner: journey_name: Claim an early years financial incentive payment - practitioner feedback_email: implementme@example.com + claim_description: for early years financial incentive payment activerecord: errors: models: diff --git a/spec/factories/journey_configurations.rb b/spec/factories/journey_configurations.rb index ca2db29ffb..0c20571941 100644 --- a/spec/factories/journey_configurations.rb +++ b/spec/factories/journey_configurations.rb @@ -42,6 +42,10 @@ routing_name { Journeys::EarlyYearsPayment::Provider::Authenticated::ROUTING_NAME } end + trait :early_years_payment_practitioner do + routing_name { Journeys::EarlyYearsPayment::Practitioner::ROUTING_NAME } + end + trait :closed do open_for_submissions { false } end diff --git a/spec/features/early_years_payment/practitioner/happy_path_spec.rb b/spec/features/early_years_payment/practitioner/happy_path_spec.rb new file mode 100644 index 0000000000..c6c07025c6 --- /dev/null +++ b/spec/features/early_years_payment/practitioner/happy_path_spec.rb @@ -0,0 +1,20 @@ +require "rails_helper" + +RSpec.feature "Early years payment practitioner" do + scenario "Happy path" do + when_early_years_payment_practitioner_journey_configuration_exists + + visit landing_page_path(Journeys::EarlyYearsPayment::Practitioner::ROUTING_NAME) + + # find-reference page stuff + visit claim_path(Journeys::EarlyYearsPayment::Practitioner::ROUTING_NAME, :claim) # temporary step until landing page implemented + click_on "Continue" + + # one login stuff + click_on "Continue" + + expect(page.title).to have_text("How we’ll use the information you provide") + expect(page).to have_content("How we’ll use the information you provide") + click_on "Continue" + end +end diff --git a/spec/support/steps/journey_configuration.rb b/spec/support/steps/journey_configuration.rb index e7006d0885..ba8e1dd2a8 100644 --- a/spec/support/steps/journey_configuration.rb +++ b/spec/support/steps/journey_configuration.rb @@ -9,3 +9,7 @@ def when_early_years_payment_provider_start_journey_configuration_exists def when_early_years_payment_provider_authenticated_journey_configuration_exists create(:journey_configuration, :early_years_payment_provider_authenticated) end + +def when_early_years_payment_practitioner_journey_configuration_exists + create(:journey_configuration, :early_years_payment_practitioner) +end