Skip to content

Commit

Permalink
Add "Verify LoPS" assessor task list item
Browse files Browse the repository at this point in the history
This updates the task list item that assessors and admins see when they
need to verify the LoPS.
  • Loading branch information
thomasleese committed Sep 27, 2023
1 parent d24c898 commit 6fa3f3c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ def verification_task_list_section
items = [
qualification_requests_task_list_item,
reference_requests_task_list_item,
locate_professional_standing_request_task_list_item,
review_professional_standing_request_task_list_item,
professional_standing_request_task_list_item,
].compact

items << assessment_recommendation_task_list_item if items.present?
Expand Down Expand Up @@ -341,7 +340,7 @@ def assessment_recommendation_task_list_item
}
end

def locate_professional_standing_request_task_list_item
def professional_standing_request_task_list_item
if teaching_authority_provides_written_statement ||
professional_standing_request.blank?
return
Expand All @@ -350,7 +349,7 @@ def locate_professional_standing_request_task_list_item
{
name:
I18n.t(
"assessor_interface.application_forms.show.assessment_tasks.items.locate_professional_standing_request",
"assessor_interface.application_forms.show.assessment_tasks.items.professional_standing_request",
),
link: [
:location,
Expand All @@ -359,49 +358,7 @@ def locate_professional_standing_request_task_list_item
assessment,
:professional_standing_request,
],
status:
if professional_standing_request.ready_for_review ||
professional_standing_request.received?
:completed
elsif professional_standing_request.expired?
:overdue
else
:waiting_on
end,
}
end

def review_professional_standing_request_task_list_item
if teaching_authority_provides_written_statement ||
professional_standing_request.blank?
return
end

{
name:
I18n.t(
"assessor_interface.application_forms.show.assessment_tasks.items.review_professional_standing_request",
),
link:
if professional_standing_request.received? ||
professional_standing_request.ready_for_review
[
:review,
:assessor_interface,
application_form,
assessment,
:professional_standing_request,
]
end,
status:
if professional_standing_request.reviewed?
:completed
elsif professional_standing_request.received? ||
professional_standing_request.ready_for_review
:received
else
:cannot_start
end,
status: professional_standing_request.status,
}
end

Expand Down
3 changes: 1 addition & 2 deletions config/locales/assessor_interface.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ en:
assessment_recommendation: Assessment recommendation
await_professional_standing_request: Awaiting third-party professional standing
initial_assessment_recommendation: Initial assessment recommendation
locate_professional_standing_request: Record LOPS response
professional_standing_request: Verify LoPS
qualification_requests: Record qualifications responses
reference_requests: Verify reference requests
review_professional_standing_request: Review LOPS response
review_requested_information: Review requested information from applicant

assessments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,8 @@ def verify_references_task
task_list.find_item("Verify reference requests")
end

def record_professional_standing_request_task
task_list.find_item("Record LOPS response")
end

def review_professional_standing_request_task
task_list.find_item("Review LOPS response")
def professional_standing_request_task
task_list.find_item("Verify LoPS")
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
it "record location and review" do
when_i_visit_the(:assessor_application_page, application_id:)
and_i_see_a_waiting_on_status
and_i_click_record_professional_standing_task
and_i_click_professional_standing_task
then_i_see_the(
:assessor_edit_professional_standing_request_location_page,
application_id:,
Expand Down Expand Up @@ -44,18 +44,16 @@ def and_i_see_a_waiting_on_status
)
end

def and_i_click_record_professional_standing_task
assessor_application_page
.record_professional_standing_request_task
.link
.click
def and_i_click_professional_standing_task
assessor_application_page.professional_standing_request_task.link.click
end

def when_i_click_review_professional_standing_task
assessor_application_page
.review_professional_standing_request_task
.link
.click
when_i_visit_the(
:assessor_edit_professional_standing_request_review_page,
application_id:,
assessment_id: application_form.assessment.id,
)
end

def when_i_fill_in_the_location_form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,7 @@
it do
is_expected.to include_task_list_item(
"Verification requests",
"Record LOPS response",
)
end
it do
is_expected.to include_task_list_item(
"Verification requests",
"Review LOPS response",
"Verify LoPS",
)
end
it do
Expand Down

0 comments on commit 6fa3f3c

Please sign in to comment.