Skip to content

Commit

Permalink
Change accredited provider to ratifying partner in courses
Browse files Browse the repository at this point in the history
  • Loading branch information
inulty-dfe committed Jan 9, 2025
1 parent 049c324 commit 03ae2ae
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def errors_for_search_query(code, query)
if other_selected_with_no_autocompleted_code?(code) && query.length < 2
errors = { accredited_provider: ['Accredited provider search too short, enter 2 or more characters'] }
elsif code.blank?
errors = { accredited_provider_code: ['Select an accredited provider'] }
errors = { accredited_provider_code: ['Select a ratifying partner'] }
end

errors
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ en:
applications_open_from:
blank: "Select an applications open date"
accrediting_provider:
blank: "Select an accredited partner"
blank: "Select a ratifying partner"
is_not_accredited: "Update the ratifying partner"
does_not_exist_in_cycle: "The accredited partner %{accredited_provider_code} does not exist in this cycle"
is_send:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
given_i_am_authenticated_as_a_provider_user
end

scenario 'Add accrediting provider to provider and provider has no accrediting providers, change accrediting provider of course then publish' do
and_the_provider_has_no_accredited_provider
scenario 'Add ratifying provider to training provider and provider has no accredited partner, change ratifying provider of course then publish' do
and_the_provider_has_no_accredited_partners
and_there_is_a_draft_course_with_an_unaccredited_provider

# Publising is invalid
Expand Down Expand Up @@ -68,7 +68,7 @@ def and_the_provider_has_a_valid_accrediting_provider
provider.update!(accrediting_provider_enrichments: [enrichment])
end

def and_the_provider_has_no_accredited_provider
def and_the_provider_has_no_accredited_partners
expect(provider.accredited_providers).to be_empty
end

Expand Down Expand Up @@ -104,11 +104,11 @@ def then_i_should_see_a_success_message
end

def then_i_should_see_an_error_message_that_accredited_provider_is_not_accredited
expect(publish_provider_courses_show_page.error_messages).to include('Update the ratifying provider')
expect(publish_provider_courses_show_page.error_messages).to include('Update the ratifying partner')
end

def then_i_should_see_an_error_message_for_the_accrediting_provider
expect(publish_provider_courses_show_page.error_messages).to include('Select an accredited provider')
expect(publish_provider_courses_show_page.error_messages).to include('Select a ratifying partner')
end

def when_i_click_the_error_message_link
Expand Down Expand Up @@ -142,15 +142,15 @@ def and_i_confirm_creation_of_the_accredited_provider
end

def then_i_see_that_the_accredited_provider_has_been_added
expect(page).to have_content('Ratifying partner added')
expect(page).to have_content('Accredited partner added')
end

def and_i_click_the_publish_button
publish_provider_courses_show_page.publish_button.click
end

def when_i_click_the_select_accredited_provider_error_message_link
page.click_link_or_button('Select an ratifying partner')
page.click_link_or_button('Select a ratifying partner')
end

def and_i_choose_the_new_accredited_provider
Expand Down
2 changes: 1 addition & 1 deletion spec/models/course/publishable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
expect(course).not_to be_publishable
expect(course.errors.messages).to eq(
{ sites: ['^Select at least one school'],
accrediting_provider: ['Select an accredited partner'],
accrediting_provider: ['Select a ratifying partner'],
about_course: ['^Enter information about this course'],
how_school_placements_work: ['^Enter details about how placements work'],
course_length: ['^Enter a course length'],
Expand Down

0 comments on commit 03ae2ae

Please sign in to comment.