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 Nov 2, 2023
1 parent ab28dfc commit 6f6fcf2
Show file tree
Hide file tree
Showing 4 changed files with 44 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
6 changes: 3 additions & 3 deletions spec/system/assessor_interface/pre_assessment_tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
end

it "locate professional standing" do
when_i_visit_the(:assessor_application_page, application_id:)
then_i_see_the(:assessor_application_page, application_id:)
when_i_visit_the(:assessor_application_page, application_form_id:)
then_i_see_the(:assessor_application_page, application_form_id:)
and_i_see_a_waiting_on_status
and_i_click_awaiting_professional_standing
then_i_see_the(
Expand All @@ -53,7 +53,7 @@
)

when_i_fill_in_the_locate_form
then_i_see_the(:assessor_application_page, application_id:)
then_i_see_the(:assessor_application_page, application_form_id:)
and_i_see_a_preliminary_check_status
and_the_teacher_receives_a_professional_standing_received_email
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
then_i_see_the(:assessor_application_page, application_form_id:)

when_i_click_on_verification_decision
then_i_see_the(:assessor_complete_assessment_page, 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_form_id:)

when_i_click_on_overview_button
then_i_see_the(:assessor_application_page, application_form_id:)

when_i_click_on_review_verifications
Expand Down Expand Up @@ -58,12 +70,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
assessor_complete_assessment_page.send_for_review.choose
assessor_complete_assessment_page.continue_button.click
end

# TODO: reload the page
when_i_visit_the(:assessor_application_page, 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 6f6fcf2

Please sign in to comment.