-
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1143,6 +1143,7 @@ en: | |
claim_description: for an early years financial incentive payment | ||
journey_name: Claim an early years financial incentive payment - provider | ||
feedback_email: "[email protected]" | ||
support_email_address: "[email protected]" | ||
forms: | ||
consent: | ||
question: Declaration of Employee Consent | ||
|
@@ -1184,14 +1185,12 @@ en: | |
date_not_in_future: Start date cannot be in the future | ||
year_must_have_4_digits: Year must include 4 numbers | ||
child_facing: | ||
question: Confirm %{first_name} spends most of their time in their job working directly with children | ||
question: Does %{first_name} spend most of their time in their job working directly with children? | ||
hint: | ||
"%{first_name}’s job must involve spending most of their contracted hours (approximately 70% or more) working | ||
directly with children." | ||
option: | ||
I confirm that at least 70% of %{first_name}’s time in their job is spent working directly with children. | ||
"%{first_name}’s job must involve spending most of their contracted hours (approximately 70% or more) directly working | ||
with children." | ||
errors: | ||
presence: You must be able to confirm this information to continue | ||
inclusion: You must select an option below to continue | ||
returner: | ||
question: | ||
Did %{first_name} work in an early years setting between %{six_months_before_start_date} and %{start_date}? | ||
|
@@ -1214,7 +1213,6 @@ en: | |
early_years_payments: | ||
<<: *early_years_payment_provider_authenticated | ||
claim_subject: "Early Years Payment" | ||
support_email_address: "[email protected]" | ||
activerecord: | ||
errors: | ||
models: | ||
|
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) { "[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 "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