Skip to content

Commit

Permalink
EY practitioner confirmation page
Browse files Browse the repository at this point in the history
  • Loading branch information
alkesh committed Oct 16, 2024
1 parent a65ed96 commit 1fef007
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
placeholder
<% content_for(:page_title, page_title("Claim submitted", journey: current_journey_routing_name)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">

<div class="govuk-panel govuk-panel--confirmation">
<h1 class="govuk-panel__title" id="submitted-title">
Claim submitted
</h1>

<div class="govuk-panel__body">
Your claim reference<br>
<strong><%= submitted_claim.reference %></strong>
</div>
</div>

<h2 class="govuk-heading-m">
You’ve completed a claim for an early years incentive payment.
</h2>

<p class="govuk-body">
We’ve sent a confirmation email to <%= submitted_claim.email_address %>.
</p>

<h2 class="govuk-heading-m">
What happens next
</h2>

<p class="govuk-body">
We’ll review your claim and let you know by email if it’s been accepted or rejected.
</p>

<p class="govuk-body">
After 6 months in your role, we’ll check with <%= submitted_claim.eligibility.eligible_ey_provider.nursery_name %> that you’re still working for them. If you are, we’ll:
</p>
<%= govuk_list [
"pay the full amount into your bank account",
"email you to confirm the payment"
], type: :bullet %>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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) }
let!(:nursery) { create(:eligible_ey_provider, primary_key_contact_email_address: email_address, nursery_name: "Acme Nursery Ltd") }
let(:claim) { Claim.last }

scenario "Happy path" do
Expand Down Expand Up @@ -68,10 +68,14 @@
click_on "Accept and send"
end.to change { Claim.count }.by(0)
.and change { Policies::EarlyYearsPayments::Eligibility.count }.by(0)
.and have_enqueued_mail(ClaimMailer, :submitted).with(claim)

expect(claim.eligibility.reload.practitioner_claim_submitted_at).to be_present

# check answers were saved on the claim
expect(claim.reload.national_insurance_number).to eq "PX321499A"

expect(page).to have_content("Claim submitted")
expect(page).to have_content("After 6 months in your role, we’ll check with Acme Nursery Ltd that you’re still working for them")
end
end

0 comments on commit 1fef007

Please sign in to comment.