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 161ce2c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def show

def update
accredited_provider_form.save!
redirect_to publish_provider_recruitment_cycle_accredited_providers_path(@provider.provider_code, @provider.recruitment_cycle_year), flash: { success: 'Accredited partner added' }
redirect_to publish_provider_recruitment_cycle_accredited_providers_path(@provider.provider_code, @provider.recruitment_cycle_year), flash: { success: 'Ratifying partner added' }
end

private
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 @@ -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
Expand Down

0 comments on commit 161ce2c

Please sign in to comment.