Skip to content

Commit

Permalink
Update system tests for verifying LoPS
Browse files Browse the repository at this point in the history
This updates the system tests for verifying LoPS to use the newer verify
page and updates to use the right permissions.
  • Loading branch information
thomasleese committed Oct 13, 2023
1 parent 86e4eb1 commit fa6c919
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa6c919

Please sign in to comment.