From ff30124bb1355e28810d7d72d2ed38a30e60e89b Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Mon, 19 Feb 2024 15:38:24 +0100 Subject: [PATCH] Show verification tasks even with nothing to do All applications will go through verification now so we need to always show the task if we're passed the unknown or FI stage. --- .../application_forms_show_view_object.rb | 4 ++-- .../verifying_professional_standing_spec.rb | 2 ++ .../verifying_qualifications_spec.rb | 4 ++-- .../application_forms_show_view_object_spec.rb | 15 ++++++++++++--- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/view_objects/assessor_interface/application_forms_show_view_object.rb b/app/view_objects/assessor_interface/application_forms_show_view_object.rb index c259b453a6..8331076e67 100644 --- a/app/view_objects/assessor_interface/application_forms_show_view_object.rb +++ b/app/view_objects/assessor_interface/application_forms_show_view_object.rb @@ -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( diff --git a/spec/system/assessor_interface/verifying_professional_standing_spec.rb b/spec/system/assessor_interface/verifying_professional_standing_spec.rb index 26469acd64..e21223ee8d 100644 --- a/spec/system/assessor_interface/verifying_professional_standing_spec.rb +++ b/spec/system/assessor_interface/verifying_professional_standing_spec.rb @@ -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 diff --git a/spec/system/assessor_interface/verifying_qualifications_spec.rb b/spec/system/assessor_interface/verifying_qualifications_spec.rb index 65dc504393..52106678ef 100644 --- a/spec/system/assessor_interface/verifying_qualifications_spec.rb +++ b/spec/system/assessor_interface/verifying_qualifications_spec.rb @@ -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 @@ -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 diff --git a/spec/view_objects/assessor_interface/application_forms_show_view_object_spec.rb b/spec/view_objects/assessor_interface/application_forms_show_view_object_spec.rb index 08a3c832ef..bfd0284e8f 100644 --- a/spec/view_objects/assessor_interface/application_forms_show_view_object_spec.rb +++ b/spec/view_objects/assessor_interface/application_forms_show_view_object_spec.rb @@ -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") @@ -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( @@ -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(