-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...ment/provider/authenticated/claims/_ineligibility_start_date_before_policy_start.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<% title = "This person may not be eligible" %> | ||
<% content_for(:page_title, page_title(title, journey: current_journey_routing_name)) %> | ||
<% @backlink_path = claim_path(current_journey_routing_name, "start-date") %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h1 class="govuk-heading-l"><%= title %></h1> | ||
|
||
<p class="govuk-body"> | ||
This person needs to have started their role on or after <%= l(Policies::EarlyYearsPayments::POLICY_START_DATE) %>. | ||
</p> | ||
|
||
<p class="govuk-body"> | ||
Based on the date you’ve provided, this person is not eligible for an early years financial incentive payment. | ||
</p> | ||
|
||
<p class="govuk-body"> | ||
For further guidance, you should refer to the | ||
<%= govuk_link_to "full eligibility criteria", claim_path(Journeys::EarlyYearsPayment::Provider::Start::ROUTING_NAME, "landing-page") %> | ||
at the start of this service. | ||
</p> | ||
|
||
<h2 class="govuk-heading-m">Get help with your claim</h2> | ||
|
||
<p class="govuk-body"> | ||
Contact us for help at | ||
<%= govuk_mail_to support_email_address(current_journey_routing_name), support_email_address(current_journey_routing_name) %> | ||
</p> | ||
<%= govuk_button_link_to "Start again", claim_path(Journeys::EarlyYearsPayment::Provider::Start::ROUTING_NAME, "landing-page") %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
surname { "Doe" } | ||
practitioner_first_name { "John" } | ||
practitioner_surname { "Doe" } | ||
start_date { Date.parse("1/1/2024") } | ||
start_date { Policies::EarlyYearsPayments::POLICY_START_DATE + 1.day } | ||
child_facing_confirmation_given { true } | ||
returning_within_6_months { true } | ||
practitioner_email_address { "[email protected]" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
spec/features/early_years_payment/provider/authenticated/ineligible_start_date_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
require "rails_helper" | ||
|
||
RSpec.feature "Early years payment provider" do | ||
let(:email_address) { "[email protected]" } | ||
let(:journey_session) { Journeys::EarlyYearsPayment::Provider::Authenticated::Session.last } | ||
let(:mail) { ActionMailer::Base.deliveries.last } | ||
let(:magic_link) { mail[:personalisation].unparsed_value[:magic_link] } | ||
let!(:nursery) { create(:eligible_ey_provider, primary_key_contact_email_address: email_address) } | ||
|
||
scenario "magic link onwards" do | ||
when_early_years_payment_provider_authenticated_journey_configuration_exists | ||
when_early_years_payment_provider_start_journey_completed | ||
|
||
visit magic_link | ||
expect(page).to have_content("Declaration of Employee Consent") | ||
expect(page.current_path).to eq "/early-years-payment-provider/consent" | ||
check "I confirm that I have obtained consent from my employee and have provided them with the relevant privacy notice." | ||
click_button "Continue" | ||
|
||
expect(journey_session.reload.answers.email_address).to be nil | ||
expect(journey_session.reload.answers.email_verified).to be nil | ||
expect(journey_session.reload.answers.provider_email_address).to eq email_address | ||
|
||
expect(page.current_path).to eq "/early-years-payment-provider/current-nursery" | ||
choose nursery.nursery_name | ||
click_button "Continue" | ||
|
||
expect(page.current_path).to eq "/early-years-payment-provider/paye-reference" | ||
expect(page).to have_content("What is #{nursery.nursery_name}’s employer PAYE reference?") | ||
fill_in "claim-paye-reference-field", with: "123/123456SE90" | ||
click_button "Continue" | ||
|
||
expect(page.current_path).to eq "/early-years-payment-provider/claimant-name" | ||
fill_in "First name", with: "Bobby" | ||
fill_in "Last name", with: "Bobberson" | ||
click_button "Continue" | ||
|
||
expect(page.current_path).to eq "/early-years-payment-provider/start-date" | ||
date = Policies::EarlyYearsPayments::POLICY_START_DATE - 10.days | ||
fill_in("Day", with: date.day) | ||
fill_in("Month", with: date.month) | ||
fill_in("Year", with: date.year) | ||
click_button "Continue" | ||
|
||
expect(page.current_path).to eq "/early-years-payment-provider/ineligible" | ||
expect(page).to have_content("This person may not be eligible") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters