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

Update school rejection copy #1377

Merged
merged 2 commits into from
Feb 12, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<span class="govuk-caption-l"><%= t(".caption", reference: current_step.claim.reference) %></span>
<h1 class="govuk-heading-l"><%= t(".title") %></h1>

<p><%= t(".information") %></p>

<% @wizard.not_assured_mentor_trainings.each_with_index do |mentor_training| %>
<h2 class="govuk-heading-m">
<%= t(".school_rejection_details", mentor_name: mentor_training.mentor_full_name) %>
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion app/wizards/claims/reject_claim_wizard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def initialize(claim:, current_user:, params:, state:, current_step: nil)
end

def define_steps
add_step(ConfirmationStep)
not_assured_mentor_trainings.each do |mentor_training|
add_step(SchoolResponseStep,
{ mentor_training_id: mentor_training.id },
Expand Down
3 changes: 0 additions & 3 deletions app/wizards/claims/reject_claim_wizard/confirmation_step.rb

This file was deleted.

22 changes: 5 additions & 17 deletions config/locales/en/wizards/claims/reject_claim_wizard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,20 @@ en:
wizards:
claims:
reject_claim_wizard:
confirmation_step:
page_title: Are you sure you want to reject the claim? - Reject - Claim %{reference} - Auditing - Claims
title: Are you sure you want to reject the claim?
caption: Reject - Claim %{reference}
continue: Continue
checklist_html: |
<p>To reject this claim, you must have:</p>
<ol class="govuk-list govuk-list--number">
<li>reviewed any evidence sent by the school and deemed it insufficient to prove the claim is legitimate</li>
<li>received second approval from within the support team or policy team</li>
<li>contacted the school to let them know their evidence has been rejected</li>
<li>told the school which claims you are rejecting and how much will be clawed back</li>
</ol>
school_response_step:
page_title: What is the schools response to the claim about %{mentor_name}? - Reject - Claim %{reference} - Auditing - Claims
page_title: What is the schools response to the claim about %{mentor_name}? - School rejection - Claim %{reference} - Auditing - Claims
title: What is the schools response to the claim about %{mentor_name}?
caption: Reject - Claim %{reference}
caption: School rejection - Claim %{reference}
continue: Continue
hours_completed:
one: The school originally claimed %{mentor_name} has completed %{count} hour.
other: The school originally claimed %{mentor_name} has completed %{count} hours.
please_add_reason: Only include details related to %{mentor_name}.
provider_response: Provider response
check_your_answers_step:
page_title: Check your answers - Reject - Claim %{reference} - Auditing - Claims
page_title: Check your answers - School rejection - Claim %{reference} - Auditing - Claims
title: Check your answers
caption: Reject - Claim %{reference}
caption: School rejection - Claim %{reference}
reason_for_rejection: Reason for rejection
school_rejection_details: Response to rejection for %{mentor_name}
provider_comments: Provider comments
Expand All @@ -40,3 +27,4 @@ en:
hours:
one: "%{count} hour"
other: "%{count} hours"
information: The information you have entered will inform the clawback process.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
then_i_see_the_details_of_the_claim

when_i_click_on_reject_claim
then_i_see_the_confirmation_page

when_i_click_on_continue
then_i_see_the_rejection_reason_page_for_john_smith

when_i_enter_a_reason_why_the_school_rejected_john_smith
Expand Down Expand Up @@ -117,11 +114,11 @@ def when_i_enter_a_new_reason_why_the_school_rejected_john_smith

def then_i_see_the_check_your_answers_page
expect(page).to have_title(
"Check your answers - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
"Check your answers - School rejection - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
text: "School rejection - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("Check your answers")
Expand Down Expand Up @@ -158,11 +155,11 @@ def when_i_click_on_confirm_and_reject_claim

def then_i_see_the_rejection_reason_page_for_jane_doe
expect(page).to have_title(
"What is the schools response to the claim about Jane Doe? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
"What is the schools response to the claim about Jane Doe? - School rejection - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
text: "School rejection - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("What is the schools response to the claim about Jane Doe?")
Expand All @@ -178,11 +175,11 @@ def then_i_see_the_rejection_reason_page_for_jane_doe

def then_i_see_the_rejection_reason_page_for_john_smith
expect(page).to have_title(
"What is the schools response to the claim about John Smith? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
"What is the schools response to the claim about John Smith? - School rejection - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
text: "School rejection - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("What is the schools response to the claim about John Smith?")
Expand All @@ -200,35 +197,6 @@ def when_i_enter_a_reason_why_the_school_rejected_john_smith
fill_in "Only include details related to John Smith", with: "School rejected John Smith"
end

def then_i_see_the_confirmation_page
expect(page).to have_title(
"Are you sure you want to reject the claim? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("Are you sure you want to reject the claim?")
expect(page).to have_element(:p, text: "To reject this claim, you must have:")
expect(page).to have_element(
:li,
text: "reviewed any evidence sent by the school and deemed it insufficient to prove the claim is legitimate",
)
expect(page).to have_element(
:li,
text: "received second approval from within the support team or policy team",
)
expect(page).to have_element(
:li,
text: "contacted the school to let them know their evidence has been rejected",
)
expect(page).to have_element(
:li,
text: "told the school which claims you are rejecting and how much will be clawed back",
)
end

def when_i_click_on_change_reason_for_rejection_for_john_smith
click_on "Change Reason for rejection for John Smith"
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
then_i_see_the_details_of_the_claim

when_i_click_on_reject_claim
then_i_see_the_confirmation_page

when_i_click_on_continue
then_i_see_the_rejection_reason_page_for_john_smith

when_i_click_on_continue
Expand Down Expand Up @@ -84,11 +81,11 @@ def when_i_click_on_continue

def then_i_see_the_rejection_reason_page_for_john_smith
expect(page).to have_title(
"What is the schools response to the claim about John Smith? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
"What is the schools response to the claim about John Smith? - School rejection - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
text: "School rejection - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("What is the schools response to the claim about John Smith?")
Expand All @@ -105,33 +102,4 @@ def then_i_see_the_rejection_reason_page_for_john_smith
def then_i_see_a_validation_error_for_entering_a_reason_with_john_smith_was_rejected_by_the_provider
expect(page).to have_validation_error("Enter the response the school has given for rejecting this mentor.")
end

def then_i_see_the_confirmation_page
expect(page).to have_title(
"Are you sure you want to reject the claim? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("Are you sure you want to reject the claim?")
expect(page).to have_element(:p, text: "To reject this claim, you must have:")
expect(page).to have_element(
:li,
text: "reviewed any evidence sent by the school and deemed it insufficient to prove the claim is legitimate",
)
expect(page).to have_element(
:li,
text: "received second approval from within the support team or policy team",
)
expect(page).to have_element(
:li,
text: "contacted the school to let them know their evidence has been rejected",
)
expect(page).to have_element(
:li,
text: "told the school which claims you are rejecting and how much will be clawed back",
)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
then_i_see_the_details_of_the_claim

when_i_click_on_reject_claim
then_i_see_the_confirmation_page

when_i_click_on_continue
then_i_see_the_rejection_reason_page_for_jane_doe

when_i_enter_a_reason_why_the_school_rejected_jane_doe
Expand All @@ -31,13 +28,12 @@
then_i_see_the_details_of_the_claim

when_i_click_on_reject_claim
then_i_see_the_confirmation_page
then_i_see_the_rejection_reason_page_for_jane_doe

when_i_click_on_cancel
then_i_see_the_details_of_the_claim

when_i_click_on_reject_claim
and_i_click_on_continue
and_i_enter_a_reason_why_the_school_rejected_jane_doe
and_i_click_on_continue
and_i_enter_a_reason_why_the_school_rejected_john_smith
Expand All @@ -54,14 +50,10 @@
then_i_see_the_rejection_reason_page_for_jane_doe
and_the_reason_why_the_school_rejected_jane_doe_is_prefilled

when_i_click_on_back
then_i_see_the_confirmation_page

when_i_click_on_back
then_i_see_the_details_of_the_claim

when_i_click_on_reject_claim
and_i_click_on_continue
and_i_enter_a_reason_why_the_school_rejected_jane_doe
and_i_click_on_continue
and_i_enter_a_reason_why_the_school_rejected_john_smith
Expand Down Expand Up @@ -177,14 +169,15 @@ def when_i_enter_a_reason_why_the_school_rejected_john_smith

def then_i_see_the_check_your_answers_page
expect(page).to have_title(
"Check your answers - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
"Check your answers - School rejection - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
text: "School rejection - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("Check your answers")
expect(page).to have_element(:p, text: "The information you have entered will inform the clawback process.")
expect(page).to have_element(
:div,
text: "This will update the claim status to ‘rejected by school’ and move it to the clawback queue.",
Expand Down Expand Up @@ -226,11 +219,11 @@ def when_i_click_on_confirm_and_reject_claim

def then_i_see_the_rejection_reason_page_for_jane_doe
expect(page).to have_title(
"What is the schools response to the claim about Jane Doe? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
"What is the schools response to the claim about Jane Doe? - School rejection - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
text: "School rejection - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("What is the schools response to the claim about Jane Doe?")
Expand All @@ -246,11 +239,11 @@ def then_i_see_the_rejection_reason_page_for_jane_doe

def then_i_see_the_rejection_reason_page_for_john_smith
expect(page).to have_title(
"What is the schools response to the claim about John Smith? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
"What is the schools response to the claim about John Smith? - School rejection - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
text: "School rejection - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("What is the schools response to the claim about John Smith?")
Expand All @@ -269,33 +262,4 @@ def when_i_enter_a_reason_why_the_school_rejected_jane_doe
end
alias_method :and_i_enter_a_reason_why_the_school_rejected_jane_doe,
:when_i_enter_a_reason_why_the_school_rejected_jane_doe

def then_i_see_the_confirmation_page
expect(page).to have_title(
"Are you sure you want to reject the claim? - Reject - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
text: "Reject - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1("Are you sure you want to reject the claim?")
expect(page).to have_element(:p, text: "To reject this claim, you must have:")
expect(page).to have_element(
:li,
text: "reviewed any evidence sent by the school and deemed it insufficient to prove the claim is legitimate",
)
expect(page).to have_element(
:li,
text: "received second approval from within the support team or policy team",
)
expect(page).to have_element(
:li,
text: "contacted the school to let them know their evidence has been rejected",
)
expect(page).to have_element(
:li,
text: "told the school which claims you are rejecting and how much will be clawed back",
)
end
end

This file was deleted.

5 changes: 2 additions & 3 deletions spec/wizards/claims/reject_claim_wizard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
subject(:steps) { wizard.steps.keys }

context "when no mentors have been selected" do
it { is_expected.to eq(%i[confirmation check_your_answers]) }
it { is_expected.to eq(%i[check_your_answers]) }
end

context "when the claim has mentor trainings which are assured" do
before { create(:mentor_training, claim:, mentor: mentor_jane_doe) }

it { is_expected.to eq(%i[confirmation check_your_answers]) }
it { is_expected.to eq(%i[check_your_answers]) }
end

context "when the claim has not assured mentor trainings" do
Expand All @@ -46,7 +46,6 @@

it do
expect(steps).to contain_exactly(
:confirmation,
"school_response_#{mentor_training_1.id}".to_sym,
"school_response_#{mentor_training_2.id}".to_sym,
:check_your_answers,
Expand Down