Skip to content

Commit

Permalink
Show verification tasks even with nothing to do
Browse files Browse the repository at this point in the history
All applications will go through verification now so we need to always
show the task if we're passed the unknown or FI stage.
  • Loading branch information
thomasleese committed Feb 28, 2024
1 parent 653477f commit 5a1d37b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ def further_information_request_task_list_item(further_information_request)

def verification_task_list_section
return unless pre_assessment_complete?
return if assessment.unknown? || assessment.request_further_information?

items = [
qualification_requests_task_list_item,
reference_requests_task_list_item,
professional_standing_request_task_list_item,
verification_decision_task_list_item,
].compact

items << verification_decision_task_list_item if items.present?

{
title:
I18n.t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ def application_form
create(:application_form, :submitted, :verification_stage)
create(
:assessment,
:started,
:with_professional_standing_request,
:verify,
application_form:,
)
application_form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def and_i_see_a_received_status

def and_i_see_an_in_progress_status
expect(assessor_application_page.status_summary.value).to have_text(
"ASSESSMENT IN PROGRESS",
"VERIFICATION IN PROGRESS",
)
end

Expand All @@ -160,7 +160,7 @@ def application_form
statuses: %w[waiting_on_qualification],
)
qualification = create(:qualification, :completed, application_form:)
assessment = create(:assessment, :started, application_form:)
assessment = create(:assessment, :started, :verify, application_form:)
create(:qualification_request, :requested, assessment:, qualification:)
application_form
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@
end

context "with a professional standing request" do
before { create(:professional_standing_request, assessment:) }
before do
assessment.verify!
create(:professional_standing_request, assessment:)
end

it do
is_expected.to include_task_list_item("Verification", "Verify LoPS")
Expand All @@ -373,7 +376,10 @@
end

context "with a qualification request" do
before { create(:qualification_request, assessment:) }
before do
assessment.verify!
create(:qualification_request, assessment:)
end

it do
is_expected.to include_task_list_item(
Expand All @@ -390,7 +396,10 @@
end

context "with a reference request" do
before { create(:reference_request, assessment:) }
before do
assessment.verify!
create(:reference_request, assessment:)
end

it do
is_expected.to include_task_list_item(
Expand Down

0 comments on commit 5a1d37b

Please sign in to comment.