Skip to content

Commit

Permalink
Update tests following tag changes
Browse files Browse the repository at this point in the history
In the new version of GOV.UK Frontend the tags are not written in upper
case so we need to change the tests.
  • Loading branch information
thomasleese committed Feb 27, 2024
1 parent 7bfda10 commit b036763
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def personal_information_task_item
def and_i_see_check_personal_information_completed
expect(
assessor_application_page.personal_information_task.status_tag.text,
).to eq("COMPLETED")
).to eq("Completed")
end

def when_i_choose_check_personal_information_no
Expand Down Expand Up @@ -314,7 +314,7 @@ def when_i_choose_check_qualifications_no

def and_i_see_check_qualifications_completed
expect(assessor_application_page.qualifications_task.status_tag.text).to eq(
"COMPLETED",
"Completed",
)
end

Expand Down Expand Up @@ -366,7 +366,7 @@ def and_i_choose_verify_age_range_subjects_no
def and_i_see_verify_age_range_subjects_completed
expect(
assessor_application_page.age_range_subjects_task.status_tag.text,
).to eq("COMPLETED")
).to eq("Completed")
end

def then_i_see_the_work_history
Expand All @@ -383,7 +383,7 @@ def when_i_choose_check_work_history_yes

def and_i_see_check_work_history_completed
expect(assessor_application_page.work_history_task.status_tag.text).to eq(
"COMPLETED",
"Completed",
)
end

Expand Down Expand Up @@ -437,7 +437,7 @@ def and_i_choose_induction_not_required
def and_i_see_check_professional_standing_completed
expect(
assessor_application_page.professional_standing_task.status_tag.text,
).to eq("COMPLETED")
).to eq("Completed")
end

def when_i_choose_check_professional_standing_no
Expand Down
6 changes: 3 additions & 3 deletions spec/system/assessor_interface/completing_assessment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,19 @@ def when_i_click_on_overview_button

def then_the_application_form_is_awarded
expect(assessor_application_page.status_summary.value).to have_text(
"AWARDED",
"Awarded",
)
end

def then_the_application_form_is_waiting_on
expect(assessor_application_page.status_summary.value.text).to include(
"WAITING ON",
"Waiting on",
)
end

def then_the_application_form_is_declined
expect(assessor_application_page.status_summary.value).to have_text(
"DECLINED",
"Declined",
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def and_the_english_language_section_is_complete
def assert_section_is_complete(section)
expect(
assessor_application_page.send("#{section}_task").status_tag.text,
).to eq("COMPLETED")
).to eq("Completed")
end

def application_form
Expand Down
12 changes: 6 additions & 6 deletions spec/system/assessor_interface/pre_assessment_tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def given_there_is_an_application_form_with_professional_standing_request

def and_i_see_a_waiting_on_status
expect(assessor_application_page.status_summary.value).to have_text(
"PRELIMINARY CHECK",
"Preliminary check",
)
end

Expand All @@ -75,11 +75,11 @@ def and_i_see_an_unstarted_preliminary_check_task
"Preliminary check (qualifications)",
)
expect(assessor_application_page.preliminary_check_task).to have_content(
"NOT STARTED",
"Not started",
)
expect(
assessor_application_page.awaiting_professional_standing_task,
).to have_content("WAITING ON")
).to have_content("Waiting on")
end

def when_i_click_on_the_preliminary_check_task
Expand Down Expand Up @@ -126,11 +126,11 @@ def and_i_see_the_failure_reasons

def and_i_see_a_completed_preliminary_check_task
expect(assessor_application_page.preliminary_check_task).to have_content(
"COMPLETED",
"Completed",
)
expect(
assessor_application_page.awaiting_professional_standing_task,
).to have_content("WAITING ON")
).to have_content("Waiting on")
end

def and_the_teacher_receives_a_checks_passed_email
Expand Down Expand Up @@ -158,7 +158,7 @@ def when_i_fill_in_the_locate_form

def and_i_see_a_preliminary_check_status
expect(assessor_application_page.status_summary.value).to have_text(
"PRELIMINARY CHECK",
"Preliminary check",
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,23 @@ def and_i_see_the_lops_not_started
assessor_review_verifications_page.task_list.find_item(
"Relevant competent authority",
)
expect(item.status_tag.text).to eq("NOT STARTED")
expect(item.status_tag.text).to eq("Not started")
end

def and_i_see_the_lops_accepted
item =
assessor_review_verifications_page.task_list.find_item(
"Relevant competent authority",
)
expect(item.status_tag.text).to eq("ACCEPTED")
expect(item.status_tag.text).to eq("Accepted")
end

def and_i_see_the_lops_rejected
item =
assessor_review_verifications_page.task_list.find_item(
"Relevant competent authority",
)
expect(item.status_tag.text).to eq("REJECTED")
expect(item.status_tag.text).to eq("Rejected")
end

def application_form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ def when_i_click_on_back_to_overview
def and_i_see_the_qualification_accepted
item =
assessor_review_verifications_page.task_list.find_item("BSc Teaching")
expect(item.status_tag.text).to eq("ACCEPTED")
expect(item.status_tag.text).to eq("Accepted")
end

def and_i_see_the_qualification_rejected
item =
assessor_review_verifications_page.task_list.find_item("BSc Teaching")
expect(item.status_tag.text).to eq("REJECTED")
expect(item.status_tag.text).to eq("Rejected")
end

def application_form
Expand Down
8 changes: 4 additions & 4 deletions spec/system/assessor_interface/reviewing_references_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def when_i_click_on_the_reference

def and_i_see_the_overdue_status
expect(assessor_review_verifications_page).to have_content(
"This reference’s status has changed from OVERDUE to RECEIVED",
"This reference’s status has changed from Overdue to Received",
)
end

Expand All @@ -130,17 +130,17 @@ def when_i_click_on_back_to_overview

def and_i_see_the_reference_not_started
item = assessor_review_verifications_page.task_list.find_item("School")
expect(item.status_tag.text).to eq("NOT STARTED")
expect(item.status_tag.text).to eq("Not started")
end

def and_i_see_the_reference_accepted
item = assessor_review_verifications_page.task_list.find_item("School")
expect(item.status_tag.text).to eq("ACCEPTED")
expect(item.status_tag.text).to eq("Accepted")
end

def and_i_see_the_reference_rejected
item = assessor_review_verifications_page.task_list.find_item("School")
expect(item.status_tag.text).to eq("REJECTED")
expect(item.status_tag.text).to eq("Rejected")
end

def application_form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
reference:,
assessment_id:,
)
and_the_request_lops_verification_status_is("NOT STARTED")
and_the_record_lops_response_status_is("CANNOT START")
and_the_request_lops_verification_status_is("Not started")
and_the_record_lops_response_status_is("Cannot start")

when_i_click_request_lops_verification
then_i_see_the(
Expand All @@ -32,8 +32,8 @@
reference:,
assessment_id:,
)
and_the_request_lops_verification_status_is("NOT STARTED")
and_the_record_lops_response_status_is("CANNOT START")
and_the_request_lops_verification_status_is("Not started")
and_the_record_lops_response_status_is("Cannot start")

when_i_click_request_lops_verification
and_i_submit_checked_on_the_request_form
Expand All @@ -42,8 +42,8 @@
reference:,
assessment_id:,
)
and_the_request_lops_verification_status_is("COMPLETED")
and_the_record_lops_response_status_is("WAITING ON")
and_the_request_lops_verification_status_is("Completed")
and_the_record_lops_response_status_is("Waiting on")
end

it "record" do
Expand All @@ -56,8 +56,8 @@
reference:,
assessment_id:,
)
and_the_request_lops_verification_status_is("COMPLETED")
and_the_record_lops_response_status_is("WAITING ON")
and_the_request_lops_verification_status_is("Completed")
and_the_record_lops_response_status_is("Waiting on")

when_i_click_record_lops_response
then_i_see_the(
Expand All @@ -71,7 +71,7 @@
reference:,
assessment_id:,
)
and_the_record_lops_response_status_is("COMPLETED")
and_the_record_lops_response_status_is("Completed")

when_i_click_record_lops_response
then_i_see_the(
Expand All @@ -91,7 +91,7 @@
reference:,
assessment_id:,
)
and_the_record_lops_response_status_is("REVIEW")
and_the_record_lops_response_status_is("Review")
end

it "record after overdue" do
Expand All @@ -105,8 +105,8 @@
reference:,
assessment_id:,
)
and_the_request_lops_verification_status_is("COMPLETED")
and_the_record_lops_response_status_is("OVERDUE")
and_the_request_lops_verification_status_is("Completed")
and_the_record_lops_response_status_is("Overdue")

when_i_click_record_lops_response
then_i_see_the(
Expand All @@ -121,7 +121,7 @@
reference:,
assessment_id:,
)
and_the_record_lops_response_status_is("COMPLETED")
and_the_record_lops_response_status_is("Completed")

when_i_click_record_lops_response
then_i_see_the(
Expand All @@ -141,7 +141,7 @@
reference:,
assessment_id:,
)
and_the_record_lops_response_status_is("REVIEW")
and_the_record_lops_response_status_is("Review")

when_i_click_record_lops_response
then_i_see_the(
Expand All @@ -161,7 +161,7 @@
reference:,
assessment_id:,
)
and_the_record_lops_response_status_is("REVIEW")
and_the_record_lops_response_status_is("Review")
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def given_there_is_an_application_form_with_qualification_request

def and_i_see_a_waiting_on_status
expect(assessor_application_page.status_summary.value).to have_text(
"WAITING ON QUALIFICATION",
"Waiting on qualification",
)
end

Expand Down Expand Up @@ -140,13 +140,13 @@ def when_i_go_back_to_overview

def and_i_see_a_received_status
expect(assessor_application_page.status_summary.value).to have_text(
"RECEIVED",
"Received",
)
end

def and_i_see_an_in_progress_status
expect(assessor_application_page.status_summary.value).to have_text(
"ASSESSMENT IN PROGRESS",
"Assessment in progress",
)
end

Expand Down
Loading

0 comments on commit b036763

Please sign in to comment.