Skip to content

Commit

Permalink
Avoid invalid prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-G committed Jan 5, 2024
1 parent 2d0ed26 commit b03d537
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
expect(publish_degree_subject_requirement_page.copy_content_warning).to have_content(name)
end

expect(publish_degree_subject_requirement_page.yes_radio).to be_checked
expect(publish_degree_subject_requirement_page.no_radio).not_to be_checked
expect(publish_degree_subject_requirement_page.radio_yes).to be_checked
expect(publish_degree_subject_requirement_page.radio_no).not_to be_checked
expect(publish_degree_subject_requirement_page.requirements.text).to eq(course2.degree_subject_requirements)
end

Expand Down Expand Up @@ -174,12 +174,12 @@ def when_i_visit_the_degrees_subject_requirements_page
end

def and_i_require_a_classification
publish_degree_start_page.yes_radio.choose
publish_degree_start_page.radio_yes.choose
and_i_submit
end

def and_i_do_not_require_a_classification
publish_degree_start_page.no_radio.choose
publish_degree_start_page.radio_no.choose
and_i_submit
end

Expand All @@ -199,7 +199,7 @@ def then_i_should_see_the_subject_requirements_page
def when_i_set_additional_requirements
@some_additional_requiremet = 'Some additional requirement'

publish_degree_subject_requirement_page.yes_radio.choose
publish_degree_subject_requirement_page.radio_yes.choose
publish_degree_subject_requirement_page.requirements.set(@some_additional_requiremet)
and_i_submit
end
Expand All @@ -224,15 +224,15 @@ def and_the_required_grade_is_updated_with(grade)
end

def then_the_start_page_should_show_the_selected_classification
expect(publish_degree_start_page.yes_radio).to be_checked
expect(publish_degree_start_page.radio_yes).to be_checked
end

def then_the_grade_page_should_show_the_selected_grade
expect(publish_degree_grade_page.two_one).to be_checked
end

def then_the_subject_requirements_page_should_show_the_requirements
expect(publish_degree_subject_requirement_page.yes_radio).to be_checked
expect(publish_degree_subject_requirement_page.radio_yes).to be_checked
expect(publish_degree_subject_requirement_page.requirements.value).to eq('Maths A Level')
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class EditEngineersTeachPhysics < PageObjects::Base

section :campaign_fields, '[data-qa="course__engineers_teach_physics_radio_group"]' do
element :engineers_teach_physics, '[data-qa="course__campaign_name_engineers_teach_physics_radio"]'
element :no_campaign, '[data-qa="course__campaign_name_no_campaign_radio"]'
element :selected_no_campaign, '[data-qa="course__campaign_name_no_campaign_radio"]'
end

element :continue, '[data-qa="course__save"]'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class NewEngineersTeachPhysics < PageObjects::Base

section :campaign_fields, '[data-qa="course__engineers_teach_physics_radio_group"]' do
element :engineers_teach_physics, '[data-qa="course__campaign_name_engineers_teach_physics_radio"]'
element :no_campaign, '[data-qa="course__campaign_name_no_campaign_radio"]'
element :selected_no_campaign, '[data-qa="course__campaign_name_no_campaign_radio"]'
end

element :continue, '[data-qa="course__save"]'
Expand Down
4 changes: 2 additions & 2 deletions spec/support/page_objects/publish/degree_start.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class DegreeStart < PageObjects::Base

sections :errors, Sections::ErrorLink, '.govuk-error-summary__list li>a'

element :yes_radio, '[data-qa="start__yes_radio"]'
element :no_radio, '[data-qa="start__no_radio"]'
element :radio_yes, '[data-qa="start__yes_radio"]'
element :radio_no, '[data-qa="start__no_radio"]'

element :submit, 'button.govuk-button[type="submit"]'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class DegreeSubjectRequirement < PageObjects::Base
sections :errors, Sections::ErrorLink, '.govuk-error-summary__list li>a'

element :copy_content_warning, '[data-qa="copy-course-warning"]'
element :yes_radio, '[data-qa="degree_subject_requirements__yes_radio"]'
element :no_radio, '[data-qa="degree_subject_requirements__no_radio"]'
element :radio_yes, '[data-qa="degree_subject_requirements__yes_radio"]'
element :radio_no, '[data-qa="degree_subject_requirements__no_radio"]'
element :requirements, '[data-qa="degree_subject_requirements__requirements"]'
element :use_content, '[data-qa="course__use_content"]'

Expand Down

0 comments on commit b03d537

Please sign in to comment.