From 03ae2ae1fcc19eb1392d43e024921b8b7aa2493f Mon Sep 17 00:00:00 2001 From: Iain McNulty Date: Thu, 9 Jan 2025 11:38:42 +0000 Subject: [PATCH] Change accredited provider to ratifying partner in courses --- .../courses/accredited_provider_controller.rb | 2 +- config/locales/en.yml | 2 +- ...dited_provider_when_publishing_a_course_spec.rb | 14 +++++++------- spec/models/course/publishable_spec.rb | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/controllers/publish/courses/accredited_provider_controller.rb b/app/controllers/publish/courses/accredited_provider_controller.rb index 1578e46396..59993ca901 100644 --- a/app/controllers/publish/courses/accredited_provider_controller.rb +++ b/app/controllers/publish/courses/accredited_provider_controller.rb @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 99eddaac4a..5275f7bf04 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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: diff --git a/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb b/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb index 0de4ea0111..db9b1f0fd5 100644 --- a/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb +++ b/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb @@ -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 @@ -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 @@ -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 @@ -142,7 +142,7 @@ 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 @@ -150,7 +150,7 @@ def and_i_click_the_publish_button 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 diff --git a/spec/models/course/publishable_spec.rb b/spec/models/course/publishable_spec.rb index e7781d1b9b..4df135b0be 100644 --- a/spec/models/course/publishable_spec.rb +++ b/spec/models/course/publishable_spec.rb @@ -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'],