-
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.
Merge pull request #3409 from DFE-Digital/ey-dependent-answers
[CAPT-1984] EY clear dependent answers
- Loading branch information
Showing
17 changed files
with
177 additions
and
22 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
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
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
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
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 |
---|---|---|
|
@@ -18,4 +18,72 @@ | |
|
||
expect(page.current_path).to eq "/early-years-payment-provider/check-your-answers" | ||
end | ||
|
||
scenario "changing answers on the check-your-answers page that impacts journey" do | ||
when_early_years_payment_provider_authenticated_journey_configuration_exists | ||
when_early_years_payment_provider_start_journey_completed | ||
|
||
nursery = EligibleEyProvider.last || create(:eligible_ey_provider, primary_key_contact_email_address: "[email protected]") | ||
|
||
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).to have_content "most of their time in their job working directly with children?" | ||
choose "Yes" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "work in early years between" | ||
choose "Yes" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "previous role in an early years setting involve mostly working directly with children?" | ||
choose "Yes" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "Select the contract type" | ||
choose "casual or temporary" | ||
click_button "Continue" | ||
|
||
fill_in "claim-practitioner-email-address-field", with: "[email protected]" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "Check your answers before submitting this claim" | ||
find("a[href='#{claim_path(Journeys::EarlyYearsPayment::Provider::Authenticated::ROUTING_NAME, "returner-worked-with-children")}']").click | ||
|
||
expect(page).to have_content("previous role in an early years setting involve mostly working directly with children?") | ||
choose "No" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "Check your answers before submitting this claim" | ||
expect(page).not_to have_content "Contract type" | ||
find("a[href='#{claim_path(Journeys::EarlyYearsPayment::Provider::Authenticated::ROUTING_NAME, "returner-worked-with-children")}']").click | ||
|
||
expect(page).to have_content("previous role in an early years setting involve mostly working directly with children?") | ||
choose "Yes" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "Select the contract type" | ||
choose "casual or temporary" | ||
click_button "Continue" | ||
|
||
expect(page).to have_content "Check your answers before submitting this claim" | ||
expect(page).to have_content "Contract type" | ||
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
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