diff --git a/spec/support/autoload/page_objects/assessor_interface/complete_assessment.rb b/spec/support/autoload/page_objects/assessor_interface/complete_assessment.rb index f8f3dac3c5..847408f481 100644 --- a/spec/support/autoload/page_objects/assessor_interface/complete_assessment.rb +++ b/spec/support/autoload/page_objects/assessor_interface/complete_assessment.rb @@ -20,6 +20,12 @@ def request_further_information def decline_qts new_states.find { |radio_item| radio_item.label.text == "Decline QTS" } end + + def send_for_review + new_states.find do |radio_item| + radio_item.label.text == "Send application for review" + end + end end end end diff --git a/spec/system/assessor_interface/reviewing_verifications_spec.rb b/spec/system/assessor_interface/reviewing_professional_standing_spec.rb similarity index 81% rename from spec/system/assessor_interface/reviewing_verifications_spec.rb rename to spec/system/assessor_interface/reviewing_professional_standing_spec.rb index b6ec7664ba..edff9ef09c 100644 --- a/spec/system/assessor_interface/reviewing_verifications_spec.rb +++ b/spec/system/assessor_interface/reviewing_professional_standing_spec.rb @@ -20,6 +20,24 @@ ) when_i_click_on_verification_decision + then_i_see_the( + :complete_assessment_page, + application_id: application_form_id, + ) + + when_i_select_send_for_review + then_i_see_the( + :assessor_assessment_recommendation_review_page, + application_form_id:, + ) + + when_i_click_continue_from_review + then_i_see_the( + :assessor_application_status_page, + application_id: application_form_id, + ) + + when_i_click_on_overview_button then_i_see_the( :assessor_application_page, application_id: application_form_id, @@ -70,15 +88,19 @@ def given_there_is_an_application_form_with_failed_verifications def when_i_click_on_verification_decision assessor_application_page.verification_decision_task.click + end - # TODO: review functionality is not built yet, this page can never be reached - application_form.assessment.review! + def when_i_select_send_for_review + complete_assessment_page.send_for_review.choose + complete_assessment_page.continue_button.click + end - # TODO: reload the page - when_i_visit_the( - :assessor_application_page, - application_id: application_form_id, - ) + def when_i_click_continue_from_review + assessor_assessment_recommendation_review_page.continue_button.click + end + + def when_i_click_on_overview_button + assessor_application_status_page.button_group.overview_button.click end def when_i_click_on_review_verifications diff --git a/spec/system/assessor_interface/verifying_professional_standing_spec.rb b/spec/system/assessor_interface/verifying_professional_standing_spec.rb index 9ff0094435..645cff5fc5 100644 --- a/spec/system/assessor_interface/verifying_professional_standing_spec.rb +++ b/spec/system/assessor_interface/verifying_professional_standing_spec.rb @@ -43,18 +43,18 @@ ) and_the_request_lops_verification_status_is("COMPLETED") - # when_i_click_record_lops_verification - # then_i_see_the( - # :assessor_verify_professional_standing_request_page, - # application_form_id:, - # assessment_id:, - # ) - # and_i_fill_in_the_verify_form - # then_i_see_the( - # :assessor_professional_standing_request_page, - # application_form_id:, - # assessment_id:, - # ) + when_i_click_record_lops_verification + then_i_see_the( + :assessor_verify_professional_standing_request_page, + application_form_id:, + assessment_id:, + ) + and_i_fill_in_the_verify_form + then_i_see_the( + :assessor_professional_standing_request_page, + application_form_id:, + assessment_id:, + ) end private