Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LUPEYALPHA-1121] Update find ref copy #3256

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ en:
claim_description: for early years financial incentive payment
forms:
find_reference:
question: Track your application
question: Enter your claim reference
errors:
presence: Enter your claim reference number
impermissible: Enter a valid claim reference number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@
skip_tid

# - Which school do you teach at
choose_school school
choose_school_js school

# - NQT in Academic Year after ITT
choose "Yes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@
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 "Track your application"
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 "Track your application"
expect(page).to have_content "Enter your claim reference"
end

scenario "after multiple attempts should work" 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 "Track your application"
expect(page).to have_content "Enter your claim reference"
fill_in "Claim reference number", with: "foo"
click_button "Submit"

expect(page).to have_content "Track your application"
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 "Sign in with GOV.UK One Login"
click_link "Back"

expect(page).to have_content "Track your application"
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 "Sign in with GOV.UK One Login"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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 "Track your application"
expect(page).to have_content "Enter your claim reference"
fill_in "Claim reference number", with: claim.reference
click_button "Submit"

Expand Down
16 changes: 16 additions & 0 deletions spec/support/feature_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ def choose_school(school)
click_button "Continue"
end

def choose_school_js(school)
expect(page).to have_text(/Which (additional )?school/) # there can be variations of the full text depending on which journey/page

fill_in :school_search, with: school.name.sub("The ", "").split(" ").first

within("#school_search__listbox") do
sleep(1) # seems to aid in success, as if click happens before event is bound
find("li", text: school.name).click
end

click_button "Continue"

choose school.name
click_button "Continue"
end

def choose_still_teaching(teaching_at = "Yes, at Penistone Grammar School")
choose teaching_at
click_on "Continue"
Expand Down