Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpattinson committed Oct 11, 2023
1 parent bf56605 commit f3caa3a
Show file tree
Hide file tree
Showing 17 changed files with 190 additions and 74 deletions.
26 changes: 16 additions & 10 deletions spec/support/page_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def assessor_application_page
end

def assessor_applications_page
@assessor_applications_page ||= PageObjects::AssessorInterface::Applications.new
@assessor_applications_page ||=
PageObjects::AssessorInterface::Applications.new
end

def assessor_application_status_page
Expand All @@ -32,16 +33,18 @@ def assessor_assessment_recommendation_review_page
end

def assessor_assign_assessor_page
@assessor_assign_assessor_page ||= PageObjects::AssessorInterface::AssignAssessor.new
@assessor_assign_assessor_page ||=
PageObjects::AssessorInterface::AssignAssessor.new
end

def assessor_assessment_section_page
@assessor_assessment_section_page ||=
PageObjects::AssessorInterface::AssessmentSection.new
end

def assessor_assign_reviewer_page
@assessor_assign_reviewer_page ||= PageObjects::AssessorInterface::AssignReviewer.new
@assessor_assign_reviewer_page ||=
PageObjects::AssessorInterface::AssignReviewer.new
end

def assessor_check_english_language_proficiency_page
Expand Down Expand Up @@ -197,7 +200,7 @@ def assessor_review_verifications_page
@assessor_review_verifications_page ||=
PageObjects::AssessorInterface::ReviewVerifications.new
end

def assessor_timeline_page
@assessor_timeline_page ||= PageObjects::AssessorInterface::Timeline.new
end
Expand All @@ -208,7 +211,8 @@ def assessor_verify_professional_standing_request_page
end

def assessor_qualified_for_subject_page
@assessor_qualified_for_subject_page ||= PageObjects::AssessorInterface::CreateNote.new
@assessor_qualified_for_subject_page ||=
PageObjects::AssessorInterface::CreateNote.new
end

def assessor_verify_age_range_subjects_page
Expand Down Expand Up @@ -244,15 +248,18 @@ def eligibility_eligible_page
end

def eligibility_ineligible_page
@eligibility_ineligible_page = PageObjects::EligibilityInterface::Ineligible.new
@eligibility_ineligible_page =
PageObjects::EligibilityInterface::Ineligible.new
end

def eligibility_misconduct_page
@eligibility_misconduct_page ||= PageObjects::EligibilityInterface::Misconduct.new
@eligibility_misconduct_page ||=
PageObjects::EligibilityInterface::Misconduct.new
end

def eligibility_qualification_page
@eligibility_qualification_page ||= PageObjects::EligibilityInterface::Qualification.new
@eligibility_qualification_page ||=
PageObjects::EligibilityInterface::Qualification.new
end

def eligibility_region_page
Expand Down Expand Up @@ -367,7 +374,6 @@ def teacher_check_work_histories_page
PageObjects::TeacherInterface::CheckWorkHistories.new
end


def teacher_check_your_answers_page
@teacher_check_your_answers_page =
PageObjects::TeacherInterface::CheckYourAnswers.new
Expand Down
15 changes: 12 additions & 3 deletions spec/system/assessor_interface/assigning_assessor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
it "assigns an assessor" do
given_i_am_authorized_as_an_assessor_user

when_i_visit_the(:assessor_assign_assessor_page, application_id: application_form.id)
when_i_visit_the(
:assessor_assign_assessor_page,
application_id: application_form.id,
)
and_i_select_an_assessor
then_i_see_the(
:assessor_application_page,
Expand All @@ -23,7 +26,10 @@
it "assigns a reviewer" do
given_i_am_authorized_as_an_assessor_user

when_i_visit_the(:assessor_assign_reviewer_page, application_id: application_form.id)
when_i_visit_the(
:assessor_assign_reviewer_page,
application_id: application_form.id,
)
and_i_select_a_reviewer
then_i_see_the(
:assessor_application_page,
Expand All @@ -35,7 +41,10 @@
it "requires permission" do
given_i_am_authorized_as_a_support_user

when_i_visit_the(:assessor_assign_assessor_page, application_id: application_form.id)
when_i_visit_the(
:assessor_assign_assessor_page,
application_id: application_form.id,
)
then_i_see_the_forbidden_page
end

Expand Down
37 changes: 23 additions & 14 deletions spec/system/assessor_interface/checking_submitted_details_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,16 @@ def given_application_form_doesnt_need_work_history

def then_i_see_the_personal_information
expect(
assessor_check_personal_information_page.personal_information.given_names.text,
assessor_check_personal_information_page
.personal_information
.given_names
.text,
).to eq(application_form.given_names)
expect(
assessor_check_personal_information_page.personal_information.family_name.text,
assessor_check_personal_information_page
.personal_information
.family_name
.text,
).to eq(application_form.family_name)
end

Expand Down Expand Up @@ -281,9 +287,9 @@ def when_i_choose_check_personal_information_no
def then_i_see_the_qualifications
teaching_qualification =
application_form.qualifications.find(&:is_teaching_qualification?)
expect(assessor_check_qualifications_page.teaching_qualification.title.text).to eq(
teaching_qualification.title,
)
expect(
assessor_check_qualifications_page.teaching_qualification.title.text,
).to eq(teaching_qualification.title)
end

def when_i_choose_check_qualifications_yes
Expand Down Expand Up @@ -313,18 +319,21 @@ def and_i_see_check_qualifications_completed
end

def then_i_see_the_age_range_and_subjects
expect(assessor_verify_age_range_subjects_page.age_range.heading.text).to eq(
"Enter the age range you can teach",
)
expect(
assessor_verify_age_range_subjects_page.age_range.heading.text,
).to eq("Enter the age range you can teach")
expect(assessor_verify_age_range_subjects_page.subjects.heading.text).to eq(
"Enter the subjects you can teach",
)
end

def when_i_fill_in_age_range
assessor_verify_age_range_subjects_page.age_range_form.minimum.fill_in with: "7"
assessor_verify_age_range_subjects_page.age_range_form.maximum.fill_in with: "11"
assessor_verify_age_range_subjects_page.age_range_form.note.fill_in with: "A note."
assessor_verify_age_range_subjects_page.age_range_form.minimum.fill_in with:
"7"
assessor_verify_age_range_subjects_page.age_range_form.maximum.fill_in with:
"11"
assessor_verify_age_range_subjects_page.age_range_form.note.fill_in with:
"A note."
end

def and_i_fill_in_subjects
Expand Down Expand Up @@ -362,9 +371,9 @@ def and_i_see_verify_age_range_subjects_completed

def then_i_see_the_work_history
most_recent_role = application_form.work_histories.first
expect(assessor_check_work_history_page.most_recent_role.school_name.text).to eq(
most_recent_role.school_name,
)
expect(
assessor_check_work_history_page.most_recent_role.school_name.text,
).to eq(most_recent_role.school_name)
end

def when_i_choose_check_work_history_yes
Expand Down
29 changes: 24 additions & 5 deletions spec/system/assessor_interface/completing_assessment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
given_there_is_an_awardable_application_form(%i[old_regs])
given_i_can_request_dqt_api

when_i_visit_the(:assessor_complete_assessment_page, application_id:, assessment_id:)
when_i_visit_the(
:assessor_complete_assessment_page,
application_id:,
assessment_id:,
)

when_i_select_award_qts
and_i_click_continue
Expand Down Expand Up @@ -78,7 +82,11 @@
given_i_am_authorized_as_an_assessor_user
given_there_is_an_awardable_application_form_under_new_regulations

when_i_visit_the(:assessor_complete_assessment_page, application_id:, assessment_id:)
when_i_visit_the(
:assessor_complete_assessment_page,
application_id:,
assessment_id:,
)

when_i_select_award_qts
and_i_click_continue
Expand Down Expand Up @@ -149,7 +157,11 @@
given_i_am_authorized_as_an_assessor_user
given_there_is_a_declinable_application_form

when_i_visit_the(:assessor_complete_assessment_page, application_id:, assessment_id:)
when_i_visit_the(
:assessor_complete_assessment_page,
application_id:,
assessment_id:,
)

when_i_select_decline_qts
and_i_click_continue
Expand Down Expand Up @@ -304,7 +316,10 @@ def and_i_see_failure_reasons
end

def when_i_check_declaration
assessor_declare_assessment_recommendation_page.form.declaration_checkbox.click
assessor_declare_assessment_recommendation_page
.form
.declaration_checkbox
.click
assessor_declare_assessment_recommendation_page.form.submit_button.click
end

Expand Down Expand Up @@ -365,7 +380,11 @@ def when_i_send_the_email
end

def when_i_check_confirmation
assessor_confirm_assessment_recommendation_page.form.yes_radio_item.input.click
assessor_confirm_assessment_recommendation_page
.form
.yes_radio_item
.input
.click
assessor_confirm_assessment_recommendation_page.form.continue_button.click
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
assessor_check_personal_information_page,
"english_language_exemption_by_citizenship_not_confirmed",
)
and_i_confirm_english_language_exemption(assessor_check_personal_information_page)
and_i_confirm_the_section_as_complete(assessor_check_personal_information_page)
and_i_confirm_english_language_exemption(
assessor_check_personal_information_page,
)
and_i_confirm_the_section_as_complete(
assessor_check_personal_information_page,
)
then_i_see_the_personal_information_section_is_complete
and_the_english_language_section_is_complete
end
Expand Down Expand Up @@ -176,19 +180,19 @@ def then_i_am_asked_to_confirm_english_language_proficiency_in_the_personal_info
expect(assessor_check_english_language_proficiency_page.heading.text).to eq(
"Check English language proficiency",
)
expect(assessor_check_english_language_proficiency_page.h2s.last.text).to eq(
"English language exemption by birth/citizenship",
)
expect(
assessor_check_english_language_proficiency_page.h2s.last.text,
).to eq("English language exemption by birth/citizenship")
assessor_check_english_language_proficiency_page.return_button.click
end

def then_i_am_asked_to_confirm_english_language_proficiency_in_the_qualifications_section
expect(assessor_check_english_language_proficiency_page.heading.text).to eq(
"Check English language proficiency",
)
expect(assessor_check_english_language_proficiency_page.h2s.last.text).to eq(
"English language exemption by country of study",
)
expect(
assessor_check_english_language_proficiency_page.h2s.last.text,
).to eq("English language exemption by country of study")
assessor_check_english_language_proficiency_page.return_button.click
end

Expand All @@ -199,7 +203,9 @@ def then_i_am_asked_to_confirm_english_language_proficiency_by_provider
expect(
assessor_check_english_language_proficiency_page.cards.first.heading.text,
).to eq("Verify your English language proficiency")
expect(assessor_check_english_language_proficiency_page.lists.last.text).to eq(
expect(
assessor_check_english_language_proficiency_page.lists.last.text,
).to eq(
I18n.t(
"assessor_interface.assessment_sections.checks.english_language_valid_provider",
),
Expand All @@ -214,7 +220,9 @@ def then_i_am_asked_to_confirm_english_language_proficiency_by_moi
assessor_check_english_language_proficiency_page.cards.first.heading.text,
).to eq("Verify your English language proficiency")

expect(assessor_check_english_language_proficiency_page.lists.last.text).to eq(
expect(
assessor_check_english_language_proficiency_page.lists.last.text,
).to eq(
I18n.t(
"assessor_interface.assessment_sections.checks.english_language_valid_moi",
),
Expand Down
13 changes: 10 additions & 3 deletions spec/system/assessor_interface/creating_note_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@
application_id: application_form.id,
)
and_i_click_add_note
then_i_see_the(:assessor_qualified_for_subject_page, application_id: application_form.id)
then_i_see_the(
:assessor_qualified_for_subject_page,
application_id: application_form.id,
)

when_i_create_a_note
then_i_see_the(
:assessor_application_page,
application_id: application_form.id,
)

when_i_visit_the(:assessor_timeline_page, application_id: application_form.id)
when_i_visit_the(
:assessor_timeline_page,
application_id: application_form.id,
)
then_i_see_the(:assessor_timeline_page, application_id: application_form.id)
and_i_see_the_note_timeline_event
end
Expand All @@ -37,7 +43,8 @@ def and_i_click_add_note
end

def when_i_create_a_note
assessor_qualified_for_subject_page.form.text_textarea.fill_in with: "A note."
assessor_qualified_for_subject_page.form.text_textarea.fill_in with:
"A note."
assessor_qualified_for_subject_page.form.submit_button.click
end

Expand Down
16 changes: 12 additions & 4 deletions spec/system/assessor_interface/filtering_application_forms_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def and_i_apply_the_reference_filter

def then_i_see_a_list_of_applications_filtered_by_reference
expect(assessor_applications_page.search_results.count).to eq(1)
expect(assessor_applications_page.search_results.first.name.text).to eq("Cher Bert")
expect(assessor_applications_page.search_results.first.name.text).to eq(
"Cher Bert",
)
end

def and_i_apply_the_name_filter
Expand All @@ -101,7 +103,9 @@ def and_i_apply_the_name_filter

def then_i_see_a_list_of_applications_filtered_by_name
expect(assessor_applications_page.search_results.count).to eq(1)
expect(assessor_applications_page.search_results.first.name.text).to eq("Cher Bert")
expect(assessor_applications_page.search_results.first.name.text).to eq(
"Cher Bert",
)
end

def and_i_apply_the_email_filter
Expand All @@ -125,7 +129,9 @@ def and_i_apply_the_submitted_at_filter

def then_i_see_a_list_of_applications_filtered_by_submitted_at
expect(assessor_applications_page.search_results.count).to eq(1)
expect(assessor_applications_page.search_results.first.name.text).to eq("John Smith")
expect(assessor_applications_page.search_results.first.name.text).to eq(
"John Smith",
)
end

def and_i_apply_the_action_required_by_filter
Expand Down Expand Up @@ -159,7 +165,9 @@ def and_i_apply_the_stage_filter

def then_i_see_a_list_of_applications_filtered_by_stage
expect(assessor_applications_page.search_results.count).to eq(1)
expect(assessor_applications_page.search_results.first.name.text).to eq("John Smith")
expect(assessor_applications_page.search_results.first.name.text).to eq(
"John Smith",
)
end

def application_forms
Expand Down
Loading

0 comments on commit f3caa3a

Please sign in to comment.