Skip to content

Commit

Permalink
Rename files and test concepts
Browse files Browse the repository at this point in the history
  • Loading branch information
inulty-dfe committed Jan 9, 2025
1 parent 2e2ea45 commit c9f40a1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ def and_i_search_for_an_accredited_provider
end

def and_i_fill_in_the_accredited_provider_form
publish_courses_new_accredited_provider_page.about_section_input.set('About course')
publish_courses_new_ratifying_partner_page.about_section_input.set('About course')

publish_courses_new_accredited_provider_page.submit.click
publish_courses_new_ratifying_partner_page.submit.click
end

def and_i_confirm_creation_of_the_accredited_provider
publish_courses_new_accredited_provider_page.submit.click
publish_courses_new_ratifying_partner_page.submit.click
end

def then_i_see_that_the_accredited_provider_has_been_added
Expand Down
16 changes: 8 additions & 8 deletions spec/features/publish/courses/new_accredited_provider_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
feature 'selection accredited_bodies', { can_edit_current_and_next_cycles: false } do
before do
given_i_am_authenticated_as_a_provider_user
when_i_visit_the_new_accredited_providers_page
when_i_visit_the_new_ratifying_partner_page
end

scenario 'selecting multiple accredited_bodies' do
when_i_select_an_accredited_provider
when_i_select_a_ratifying_partner
and_i_click_continue
then_i_am_met_with_the_applications_open_page
end
Expand All @@ -33,16 +33,16 @@ def given_i_am_authenticated_as_a_provider_user
given_i_am_authenticated(user: @user)
end

def when_i_visit_the_new_accredited_providers_page
publish_courses_new_accredited_provider_page.load(provider_code: provider.provider_code, recruitment_cycle_year: Settings.current_recruitment_cycle_year, query: accredited_provider_params)
def when_i_visit_the_new_ratifying_partner_page
publish_courses_new_ratifying_partner_page.load(provider_code: provider.provider_code, recruitment_cycle_year: Settings.current_recruitment_cycle_year, query: accredited_provider_params)
end

def when_i_select_an_accredited_provider
publish_courses_new_accredited_provider_page.find("#course_accredited_provider_code_#{@accredited_provider_code.downcase}").click
def when_i_select_a_ratifying_partner
publish_courses_new_ratifying_partner_page.find("#course_accredited_provider_code_#{@accredited_provider_code.downcase}").click
end

def and_i_click_continue
publish_courses_new_accredited_provider_page.continue.click
publish_courses_new_ratifying_partner_page.continue.click
end

def provider
Expand All @@ -56,6 +56,6 @@ def then_i_am_met_with_the_applications_open_page

def then_i_am_met_with_errors
expect(page).to have_content('There is a problem')
expect(page).to have_content('Select an accredited provider')
expect(page).to have_content('Select a ratifying partner')
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module PageObjects
module Publish
module Courses
class NewAccreditedProvider < PageObjects::Base
class NewRatifyingPartner < PageObjects::Base
set_url '/publish/organisations/{provider_code}/{recruitment_cycle_year}/courses/accredited-provider/new{?query*}'

elements :suggested_accredited_bodies, '[data-qa="course__ratifying_partner_option"]'
Expand Down

0 comments on commit c9f40a1

Please sign in to comment.