Skip to content

Commit

Permalink
Replace sampling with auditing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie committed Jan 23, 2025
1 parent c206eae commit 4c6ff8b
Show file tree
Hide file tree
Showing 45 changed files with 244 additions and 246 deletions.
2 changes: 1 addition & 1 deletion app/controllers/claims/sampling/claims_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Claims::Sampling::ClaimsController < Claims::ApplicationController

def download
provider_name = @provider_sampling.provider_name.parameterize
send_data @provider_sampling.csv_file.download, filename: "sampling-claims-#{provider_name}-#{Time.current.iso8601}.csv"
send_data @provider_sampling.csv_file.download, filename: "quality_assurance_for_#{provider_name.parameterize(separator: "_")}_response.csv"
end

private
Expand Down
6 changes: 3 additions & 3 deletions config/locales/en/activerecord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ en:
claims/claim_activity/action:
payment_request_delivered: Claims sent to ESFA for payment
payment_response_uploaded: ESFA payment response uploaded
sampling_uploaded: Sampling data uploaded
sampling_response_uploaded: Provider sampling response uploaded
sampling_uploaded: Audit data uploaded
sampling_response_uploaded: Provider audit response uploaded
clawback_request_delivered: Claims sent to ESFA for clawback
clawback_response_uploaded: ESFA clawback response uploaded
claims/claim_activity/document:
payment_request_delivered: Claims sent to ESFA
payment_response_uploaded: ESFA payment response
sampling_response_uploaded: Provider sampling response
sampling_response_uploaded: Provider audit response
clawback_request_delivered: Claims sent to ESFA
clawback_response_uploaded: ESFA clawback response
claims/claim_window:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en/claims/support/claims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ en:
show:
page_caption: Claim %{reference}
page_title: "%{school_name} - Claim %{reference}"
reason: Reason claim is being sampled
reason: Reason claim is being audited
approve: Approve claim
confirm_provider_reject: Confirm provider rejected claim
status: Status
Expand Down
24 changes: 12 additions & 12 deletions config/locales/en/claims/support/claims/samplings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ en:
index:
heading: Claims
sub_heading:
zero: Sampling
one: Sampling (%{count})
other: Sampling (%{count})
zero: Auditing
one: Auditing (%{count})
other: Auditing (%{count})
no_claims: There are no claims waiting to be processed.
upload_claims: Upload claims to be sampled
upload_claims: Upload claims to be audited
upload_provider_response: Upload provider response
show:
page_caption: Sampling - Claim %{reference}
page_title: "%{school_name} - Sampling - Claim %{reference}"
reason: Reason claim is being sampled
page_caption: Auditing - Claim %{reference}
page_title: "%{school_name} - Auditing - Claim %{reference}"
reason: Reason claim is being audited
approve: Approve claim
confirm_provider_reject: Confirm provider rejected claim
reject_claim: Reject claim
Expand All @@ -26,16 +26,16 @@ en:
submitted_by: Submitted by %{name} on %{date}.
provider_response: Provider response
confirm_approval:
page_caption: Sampling - Claim %{reference}
page_caption: Auditing - Claim %{reference}
page_title: Are you sure you want to approve the claim?
mark_as_paid: This will mark the claim as 'Paid'.
approve: Approve claim
cancel: Cancel
update:
success_heading: Claim updated
confirm_provider_rejected:
page_title: Are you sure you want to confirm the provider has rejected the claim? - Sampling - Claim %{reference}
caption: Sampling - Claim %{reference}
page_title: Are you sure you want to confirm the provider has rejected the claim? - Auditing - Claim %{reference}
caption: Auditing - Claim %{reference}
title: Are you sure you want to confirm the provider has rejected the claim?
cancel: Cancel
provider_has_rejected: You confirm you have spoken to the provider and they have rejected the claim.
Expand All @@ -44,8 +44,8 @@ en:
provider_rejected:
success: Claim updated
confirm_rejection:
page_title: Are you sure you want to reject the claim? - Sampling - Claim %{reference}
caption: Sampling - Claim %{reference}
page_title: Are you sure you want to reject the claim? - Auditing - Claim %{reference}
caption: Auditing - Claim %{reference}
title: Are you sure you want to reject the claim?
cancel: Cancel
mark_as_claim_not_approved: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ en:
edit:
cancel: Cancel
update:
success: Sampling data uploaded
success: Auditing data uploaded
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ en:
secondary_navigation:
all_claims: All claims
payments: Payments
sampling: Sampling
sampling: Auditing
clawbacks: Clawbacks
activity_log: Activity log
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ en:
claims:
provider_rejected_claim_wizard:
mentor_training_step:
page_title: Select a mentor - Rejected by provider - Claim %{reference} - Sampling - Claims
page_title: Select a mentor - Rejected by provider - Claim %{reference} - Auditing - Claims
title: Rejection details from the provider
caption: Rejected by provider - Claim %{reference}
continue: Continue
which_mentors: Which mentors are being rejected?
include_partial_or_whole_clawback: Include mentors which need partial or whole clawback.
provider_response_step:
page_title: What reason has the provider given for rejecting %{mentor_name}? - Rejected by provider - Claim %{reference} - Sampling - Claims
page_title: What reason has the provider given for rejecting %{mentor_name}? - Rejected by provider - Claim %{reference} - Auditing - Claims
title: What reason has the provider given for rejecting %{mentor_name}?
caption: Rejected by provider - Claim %{reference}
mentor_training_assured: Has the provider assured this mentor's training?
Expand All @@ -20,7 +20,7 @@ en:
one: The school originally claimed %{mentor_name} has completed %{count} hour.
other: The school originally claimed %{mentor_name} has completed %{count} hours.
check_your_answers_step:
page_title: Check your answers - Rejected by provider - Claim %{reference} - Sampling - Claims
page_title: Check your answers - Rejected by provider - Claim %{reference} - Auditing - Claims
title: Check your answers
caption: Rejected by provider - Claim %{reference}
reason_for_rejection: Reason for rejection
Expand Down
6 changes: 3 additions & 3 deletions config/locales/en/wizards/claims/reject_claim_wizard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ en:
claims:
reject_claim_wizard:
confirmation_step:
page_title: Are you sure you want to reject the claim? - Reject - Claim %{reference} - Sampling - Claims
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
Expand All @@ -16,7 +16,7 @@ en:
<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} - Sampling - Claims
page_title: What is the schools response to the claim about %{mentor_name}? - Reject - Claim %{reference} - Auditing - Claims
title: What is the schools response to the claim about %{mentor_name}?
caption: Reject - Claim %{reference}
continue: Continue
Expand All @@ -26,7 +26,7 @@ en:
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} - Sampling - Claims
page_title: Check your answers - Reject - Claim %{reference} - Auditing - Claims
title: Check your answers
caption: Reject - Claim %{reference}
reason_for_rejection: Reason for rejection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ en:
claims:
upload_provider_response_wizard:
upload_step:
page_title: Sampling - Claims
page_title: Auditing - Claims
title: Upload provider response
caption: Sampling
caption: Auditing
upload_csv_file: Upload CSV file
csv_help: Help with the CSV file
csv_help_details: |
Expand All @@ -25,27 +25,27 @@ en:
- claim_accepted
- rejection_reason
confirmation_step:
page_title: Are you sure you want to upload the provider's response? - Sampling - Claims
page_title: Are you sure you want to upload the provider's response? - Auditing - Claims
title: Are you sure you want to upload the provider's response?
caption: Sampling
caption: Auditing
claims_count:
one: There is %{count} claim included in this upload.
other: There are %{count} claims included in this upload.
upload_data: Upload responses
no_claims_step:
title: You cannot upload a provider response
page_title: You cannot upload a provider response - Sampling - Claims
caption: Sampling
page_title: You cannot upload a provider response - Auditing - Claims
caption: Auditing
you_cannot_upload: You cannot upload a provider response as there are no claims waiting for a response.
upload_errors_step:
title: There is a problem with the CSV file
caption: Sampling
page_title: There is a problem with the CSV file - Sampling - Claims
caption: Auditing
page_title: There is a problem with the CSV file - Auditing - Claims
status: Status
claim_reference: Claim reference
view: View (opens in new tab)
incorrect_claim_reference: There are no claims associated with the following references:-
incorrect_status: The following claims do not have the status 'Sampling in progress':-
incorrect_status: The following claims do not have the status 'Audit in progress':-
missing_mentors: The following claims are missing mentors from the uploaded CSV:-
invalid_assured_status: The following claims are missing a claim assured status:-
missing_not_assured_message: The following claims are missing a claim not assured reason:-
Expand Down
23 changes: 11 additions & 12 deletions config/locales/en/wizards/claims/upload_sampling_data_wizard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ en:
claims:
upload_sampling_data_wizard:
upload_step:
page_title: Upload claims to be sampled - Sampling - Claims
caption: Sampling
title: Upload claims to be sampled
page_title: Upload claims to be audited - Auditing - Claims
caption: Auditing
title: Upload claims to be audited
upload_csv_file: Upload CSV file
csv_help: Help with the CSV file
csv_help_details: |
Expand All @@ -16,18 +16,17 @@ en:
- claim_reference
- sample_reason
confirmation_step:
page_title: Are you sure you want to upload the sampling data? - Sampling - Claims
title: Are you sure you want to upload the sampling data?
caption: Sampling
page_title: Are you sure you want to upload the auditing data? - Auditing - Claims
title: Are you sure you want to upload the auditing data?
caption: Auditing
claims_count:
one: There is %{count} claim included in this upload.
other: There are %{count} claims included in this upload.
providers_will_be_emailed:
Each accredited provider included in the sample data will receive an email
instructing them to assure their partner schools' claim.
Each accredited provider will receive an email instructing them to assure their partner schools' claim.
upload_data: Upload data
no_claims_step:
title: You cannot upload any claims to be sampled
page_title: You cannot upload any claims to be sampled - Sampling - Claims
caption: Sampling
you_cannot_upload: You cannot upload a sampling file as there are no claims that have been paid.
title: You cannot upload any claims to be audited
page_title: You cannot upload any claims to be audited - Auditing - Claims
caption: Auditing
you_cannot_upload: You cannot upload an auditing file as there are no claims that have been paid.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ def when_i_click_on_the_download_button
end

def then_the_csv_is_downloaded
current_time = Time.zone.now.utc.strftime("%Y-%m-%dT%H%%3A%M%%3A%SZ")
provider_name = @provider_sampling.provider_name.parameterize
expect(page.response_headers["Content-Type"]).to eq("text/csv")
expect(page.response_headers["Content-Disposition"]).to eq("attachment; filename=\"sampling-claims-#{provider_name}-#{current_time}.csv\"; filename*=UTF-8''sampling-claims-#{provider_name}-#{current_time}.csv")
expect(page.response_headers["Content-Disposition"]).to eq("attachment; filename=\"quality_assurance_for_#{provider_name}_response.csv\"; filename*=UTF-8''quality_assurance_for_#{provider_name}_response.csv")
end

def and_the_sampling_is_marked_as_downloaded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ def when_i_navigate_to_the_sampling_claims_index_page
end

within secondary_navigation do
click_on "Sampling"
click_on "Auditing"
end
end

def then_i_see_the_sampling_claims_index_page
expect(page).to have_title("Claims - Claim funding for mentor training - GOV.UK")
expect(page).to have_h1("Claims")
expect(page).to have_h2("Sampling (1)")
expect(page).to have_h2("Auditing (1)")
expect(primary_navigation).to have_current_item("Claims")
expect(secondary_navigation).to have_current_item("Sampling")
expect(secondary_navigation).to have_current_item("Auditing")
expect(page).to have_current_path(claims_support_claims_samplings_path, ignore_query: true)
end

Expand All @@ -85,9 +85,9 @@ def when_i_click_to_view_the_claim

def then_i_see_the_details_of_the_claim
expect(page).to have_title(
"#{@claim.school.name} - Sampling - Claim #{@claim.reference} - Claim funding for mentor training - GOV.UK",
"#{@claim.school.name} - Auditing - Claim #{@claim.reference} - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(:p, text: "Sampling - Claim #{@claim.reference}", class: "govuk-caption-l")
expect(page).to have_element(:p, text: "Auditing - Claim #{@claim.reference}", class: "govuk-caption-l")
expect(page).to have_h1(@claim.school.name)
expect(page).to have_element(:strong, text: "Audit requested", class: "govuk-tag govuk-tag--yellow")
end
Expand All @@ -99,11 +99,11 @@ def when_i_click_on_confirm_provider_rejected_claim
def then_i_see_that_the_claim_has_been_updated_to_provider_not_approved
expect(page).to have_current_path(claims_support_claims_sampling_path(@claim), ignore_query: true)
expect(page).to have_title(
"#{@claim.school.name} - Sampling - Claim #{@claim.reference} - Claim funding for mentor training - GOV.UK",
"#{@claim.school.name} - Auditing - Claim #{@claim.reference} - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:p,
text: "Sampling - Claim #{@claim.reference}",
text: "Auditing - Claim #{@claim.reference}",
class: "govuk-caption-l",
)
expect(page).to have_h1(@claim.school.name)
Expand All @@ -114,7 +114,7 @@ def then_i_see_that_the_claim_has_been_updated_to_provider_not_approved

def then_i_see_the_mentor_selection_page
expect(page).to have_title(
"Select a mentor - Rejected by provider - Claim #{@claim.reference} - Sampling - Claims - Claim funding for mentor training - GOV.UK",
"Select a mentor - Rejected by provider - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(:span, text: "Rejected by provider - Claim #{@claim.reference}", class: "govuk-caption-l")
expect(page).to have_h1("Rejection details from the provider")
Expand All @@ -132,7 +132,7 @@ def when_i_select_john_smith

def then_i_see_the_rejection_reason_page_for_john_smith
expect(page).to have_title(
"What reason has the provider given for rejecting John Smith? - Rejected by provider - Claim #{@claim.reference} - Sampling - Claims - Claim funding for mentor training - GOV.UK",
"What reason has the provider given for rejecting John Smith? - Rejected by provider - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
Expand All @@ -154,7 +154,7 @@ def when_i_enter_a_reason_why_the_provider_rejected_john_smith

def then_i_see_the_check_your_answers_page
expect(page).to have_title(
"Check your answers - Rejected by provider - Claim #{@claim.reference} - Sampling - Claims - Claim funding for mentor training - GOV.UK",
"Check your answers - Rejected by provider - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
Expand Down Expand Up @@ -197,7 +197,7 @@ def and_i_select_jane_doe

def then_i_see_the_rejection_reason_page_for_jane_doe
expect(page).to have_title(
"What reason has the provider given for rejecting Jane Doe? - Rejected by provider - Claim #{@claim.reference} - Sampling - Claims - Claim funding for mentor training - GOV.UK",
"What reason has the provider given for rejecting Jane Doe? - Rejected by provider - Claim #{@claim.reference} - Auditing - Claims - Claim funding for mentor training - GOV.UK",
)
expect(page).to have_element(
:span,
Expand Down
Loading

0 comments on commit 4c6ff8b

Please sign in to comment.