-
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.
Add an ineligibility page for when the claim has already been submitted
- Loading branch information
Showing
8 changed files
with
130 additions
and
11 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
28 changes: 28 additions & 0 deletions
28
...s/early_years_payment/practitioner/claims/_ineligibility_claim_already_submitted.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,28 @@ | ||
<% content_for(:page_title, page_title("You've already submitted your claim", journey: current_journey_routing_name)) %> | ||
<% @backlink_path = claim_path(current_journey_routing_name, "find-reference", request.query_parameters) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h1 class="govuk-heading-l"> | ||
You've already submitted your claim | ||
</h1> | ||
|
||
<p class="govuk-body"> | ||
We're reviewing your application and we'll let you know by email if it's accepted or rejected. | ||
</p> | ||
|
||
<p class="govuk-body"> | ||
After 6 months in your role, we'll check that you’re still working at <%= answers.nursery_name %>. If you are: | ||
</p> | ||
|
||
<ul class="govuk-list govuk-list--bullet"> | ||
<li>we’ll pay the full incentive amount into your bank account</li> | ||
<li>email you to confirm the payment</li> | ||
</ul> | ||
|
||
<p class="govuk-body"> | ||
If you have questions or need support with this claim, email | ||
<%= govuk_link_to t("early_years_payment_practitioner.feedback_email"), "mailto:#{t("early_years_payment_practitioner.feedback_email")}", no_visited_state: true %> | ||
</p> | ||
</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
...s/journeys/early_years_payment/provider/authenticated/early_years_practitioner_answers.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,4 @@ | ||
FactoryBot.define do | ||
factory :early_years_practitioner_answers, class: "Journeys::EarlyYearsPayment::Practitioner::SessionAnswers" do | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,34 @@ | |
|
||
expect(page).to have_content "Enter your claim reference" | ||
end | ||
|
||
context "when the claim is already submitted" do | ||
let(:eligible_ey_provider) { create(:eligible_ey_provider, nursery_name: "Test Nursery") } | ||
|
||
let(:claim) do | ||
create( | ||
:claim, | ||
:submitted, | ||
policy: Policies::EarlyYearsPayments, | ||
eligibility: build(:early_years_payments_eligibility, nursery_urn: eligible_ey_provider.urn), | ||
reference: "foo", | ||
practitioner_email_address: "[email protected]" | ||
) | ||
end | ||
|
||
scenario "should show ineligibility page when a submitted claim reference is given" do | ||
when_early_years_payment_practitioner_journey_configuration_exists | ||
|
||
visit "/early-years-payment-practitioner/find-reference?skip_landing_page=true&[email protected]" | ||
expect(page).to have_content "Enter your claim reference" | ||
fill_in "Claim reference number", with: claim.reference | ||
click_button "Submit" | ||
|
||
expect(page).to have_content "You've already submitted your claim" | ||
expect(page).to have_content "After 6 months in your role, we'll check that you’re still working at Test Nursery." | ||
|
||
click_link "Back" | ||
expect(page).to have_content "Enter your claim reference" | ||
end | ||
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