-
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.
[LUPEYALPHA-882] Change checkbox to radio buttons for child-facing pa…
…ge (#3119)
- Loading branch information
Showing
9 changed files
with
92 additions
and
18 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
26 changes: 26 additions & 0 deletions
26
...ars_payment/provider/authenticated/claims/_ineligibility_not_child_facing_enough.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,26 @@ | ||
<% title = "#{answers.first_name} is not eligible for this payment" %> | ||
<% content_for(:page_title, page_title(title, journey: current_journey_routing_name)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h1 class="govuk-heading-l"><%= title %></h1> | ||
<p class="govuk-body"> | ||
Based on the information you have provided, | ||
<%= answers.first_name %> is not eligible to claim an early years 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"> | ||
If you have any questions, contact us for help at | ||
<%= mail_to support_email_address(current_journey_routing_name), support_email_address(current_journey_routing_name), class: "govuk-link" %> | ||
</p> | ||
<%= govuk_button_link_to "Start a new claim", 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
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
44 changes: 44 additions & 0 deletions
44
spec/features/early_years_payment/provider/authenticated/not_child_facing_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,44 @@ | ||
require "rails_helper" | ||
|
||
RSpec.feature "Early years payment provider child facing" do | ||
let(:email_address) { "johndoe@example.com" } | ||
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 "selecting No" do | ||
when_early_years_payment_provider_authenticated_journey_configuration_exists | ||
when_early_years_payment_provider_start_journey_completed | ||
|
||
visit magic_link | ||
check "I confirm that I have obtained consent from my employee and have provided them with the relevant privacy notice." | ||
click_button "Continue" | ||
|
||
choose nursery.nursery_name | ||
click_button "Continue" | ||
|
||
fill_in "claim-paye-reference-field", with: "123/123456SE90" | ||
click_button "Continue" | ||
|
||
fill_in "First name", with: "Bobby" | ||
fill_in "Last name", with: "Bobberson" | ||
click_button "Continue" | ||
|
||
date = Date.yesterday | ||
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/child-facing" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "You must select an option below to continue" | ||
choose "No" | ||
click_button "Continue" | ||
|
||
expect(page.current_path).to eq "/early-years-payment-provider/ineligible" | ||
expect(page).to have_content("Bobby is not eligible for this payment") | ||
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