diff --git a/app/decorators/course_decorator.rb b/app/decorators/course_decorator.rb index 005598efbb..ed2d25ea67 100644 --- a/app/decorators/course_decorator.rb +++ b/app/decorators/course_decorator.rb @@ -262,7 +262,13 @@ def subject_present?(subject_to_find) end def placements_heading - CourseEnrichment.human_attribute_name("how_school_placements_work#{further_education? ? '/further_education' : nil}") + CourseEnrichment.human_attribute_name('how_school_placements_work') + end + + def length_and_fees_or_salary_heading + heading = has_fees? ? 'course_length_and_fees_heading' : 'course_length_and_salary_heading' + + I18n.t("publish.providers.courses.description_content.#{heading}") end def further_education? diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 29daffa284..5736f7cc40 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -37,8 +37,8 @@ def enrichment_error_link(model, field, error) end # TODO: refactor enrichment_summary method to not use an instance variable - def enrichment_summary(summary_list, model, key, value, fields, truncate_value: true, action_path: nil, action_visually_hidden_text: nil) - action = render_action(action_path, action_visually_hidden_text) + def enrichment_summary(summary_list, model, key, value, fields, action_path: nil, action_visually_hidden_text: nil) + action = render_action(action_path, action_visually_hidden_text || key.downcase) if fields.any? { |field| @errors&.key? field.to_sym } errors = fields.map do |field| @@ -47,15 +47,13 @@ def enrichment_summary(summary_list, model, key, value, fields, truncate_value: value = raw(*errors) action = nil - elsif truncate_value - classes = 'app-summary-list__value--truncate' end value = raw('Empty') if value.blank? summary_list.with_row(html_attributes: { data: { qa: "enrichment__#{fields.first}" } }) do |row| row.with_key { key.html_safe } - row.with_value(classes: classes || ['govuk-summary-list__value']) { value } + row.with_value(classes: ['govuk-summary-list__value']) { value } if action row.with_action(**action) else diff --git a/app/services/courses/copy.rb b/app/services/courses/copy.rb index a332640ece..48d6e43d66 100644 --- a/app/services/courses/copy.rb +++ b/app/services/courses/copy.rb @@ -24,7 +24,7 @@ class Copy ].freeze SCHOOL_PLACEMENTS_FIELDS = [ - ['How school placements work', 'how_school_placements_work'] + ['How placements work', 'how_school_placements_work'] ].freeze FEES_FIELDS = [ diff --git a/app/views/publish/courses/_description_content.html.erb b/app/views/publish/courses/_description_content.html.erb index 17e1a9b497..3c64beb19c 100644 --- a/app/views/publish/courses/_description_content.html.erb +++ b/app/views/publish/courses/_description_content.html.erb @@ -1,170 +1,161 @@ -
Give candidates information about the schools they will be training in
Tell them:
@@ -564,8 +589,9 @@ en: course_enrichment: fee_uk_eu: "Course fees for UK and EU students" fee_international: "Course fees for international students" - how_school_placements_work/further_education: Teaching placements + how_school_placements_work: How placements work fee_details: Fees and financial support + about_course: About this course site: location_name: "Name" address1: "Building and street" @@ -665,7 +691,7 @@ en: about_course: blank: "^Enter information about this course" how_school_placements_work: - blank: "^Enter details about how school placements work" + blank: "^Enter details about how placements work" required_qualifications: blank: "^Enter details about the qualifications needed" course_length: @@ -913,8 +939,8 @@ en: publish/course_school_placements_form: attributes: how_school_placements_work: - blank: Enter details about how school placements work - too_long: Reduce the word count for how school placements work + blank: Enter details about how placements work + too_long: Reduce the word count for how placements work publish/course_fees_and_financial_support_form: attributes: fee_details: diff --git a/spec/components/course_preview/missing_information_component_spec.rb b/spec/components/course_preview/missing_information_component_spec.rb index 41782ea491..c41748dff9 100644 --- a/spec/components/course_preview/missing_information_component_spec.rb +++ b/spec/components/course_preview/missing_information_component_spec.rb @@ -48,7 +48,7 @@ module CoursePreview include_examples 'course with missing information', :degree, 'Enter degree requirements' include_examples 'course with missing information', :fee_uk_eu, 'Enter details about fees and financial support' include_examples 'course with missing information', :gcse, 'Enter GCSE and equivalency test requirements' - include_examples 'course with missing information', :how_school_placements_work, 'Enter details about how school placements work' + include_examples 'course with missing information', :how_school_placements_work, 'Enter details about how placements work' include_examples 'course with missing information', :train_with_disability, 'Enter details about training with disabilities and other needs' include_examples 'course with missing information', :train_with_us, 'Enter details about the training provider' include_examples 'course with missing information', :about_accrediting_provider, 'Enter details about the accredited provider' diff --git a/spec/components/find/courses/about_schools_component/view_preview.rb b/spec/components/find/courses/about_schools_component/view_preview.rb index 5c5c64be0c..5a3327a45a 100644 --- a/spec/components/find/courses/about_schools_component/view_preview.rb +++ b/spec/components/find/courses/about_schools_component/view_preview.rb @@ -33,7 +33,7 @@ def hei_with_placements_and_sites def mock_scitt_course FakeCourse.new(provider: Provider.new(provider_code: 'DFE'), published_how_school_placements_work: 'you will go on placement and learn more', - placements_heading: 'Teaching placements', + placements_heading: 'How placements work', program_type: 'scitt_programme', study_sites: [fake_study_site], site_statuses: [SiteStatus.new(id: 2_245_455, course_id: 12_983_436, publish: 'published', site_id: 11_228_658, status: 'running', vac_status: 'part_time_vacancies'), SiteStatus.new(id: 22_454_556, course_id: 12_983_436, publish: 'published', site_id: 11_228_659, status: 'running', vac_status: 'part_time_vacancies')]) @@ -42,7 +42,7 @@ def mock_scitt_course def mock_hei_course FakeCourse.new(provider: Provider.new(provider_code: 'DFE'), published_how_school_placements_work: 'you will go on placement and learn more', - placements_heading: 'Teaching placements', + placements_heading: 'How placements work', program_type: 'higher_education_programme', study_sites: [fake_study_site], site_statuses: [SiteStatus.new(id: 2_245_455, course_id: 12_983_436, publish: 'published', site_id: 11_228_658, status: 'running', vac_status: 'part_time_vacancies'), SiteStatus.new(id: 22_454_556, course_id: 12_983_436, publish: 'published', site_id: 11_228_659, status: 'running', vac_status: 'part_time_vacancies')]) diff --git a/spec/components/find/courses/about_schools_component/view_spec.rb b/spec/components/find/courses/about_schools_component/view_spec.rb index be53d6fd29..df88c5fa78 100644 --- a/spec/components/find/courses/about_schools_component/view_spec.rb +++ b/spec/components/find/courses/about_schools_component/view_spec.rb @@ -25,7 +25,7 @@ provider:).decorate result = render_inline(described_class.new(course)) - expect(result.text).to include('Enter details about how school placements work') + expect(result.text).to include('Enter details about how placements work') end end @@ -82,7 +82,7 @@ ]).decorate result = render_inline(described_class.new(course)) - expect(result.text).to include('Enter details about how school placements work') + expect(result.text).to include('Enter details about how placements work') end end diff --git a/spec/features/find/search/viewing_a_course_spec.rb b/spec/features/find/search/viewing_a_course_spec.rb index b4c62ef6ca..6300667893 100644 --- a/spec/features/find/search/viewing_a_course_spec.rb +++ b/spec/features/find/search/viewing_a_course_spec.rb @@ -109,7 +109,7 @@ def given_there_is_a_findable_course personal_qualities: 'We are looking for ambitious trainee teachers who are passionate.', other_requirements: 'You will need three years of prior work experience, but not necessarily in an educational context.', interview_process: 'Some helpful guidance about the interview process', - how_school_placements_work: 'Some info about how school placements work', + how_school_placements_work: 'Some info about how placements work', about_course: 'This is a course', required_qualifications: 'You need some qualifications for this course' ) diff --git a/spec/features/publish/courses/editing_course_school_placements_copy_content_spec.rb b/spec/features/publish/courses/editing_course_school_placements_copy_content_spec.rb index a60c5d2af5..d3cb25cab5 100644 --- a/spec/features/publish/courses/editing_course_school_placements_copy_content_spec.rb +++ b/spec/features/publish/courses/editing_course_school_placements_copy_content_spec.rb @@ -66,7 +66,7 @@ def and_i_select_the_other_course_from_the_copy_content_dropdown def and_i_see_the_warning_that_changes_are_not_saved expect(page).to have_content 'Your changes are not yet saved' expect(page).to have_content "We have copied this field from #{copied_course_name_and_code}." - expect(page).to have_link 'How school placements work' + expect(page).to have_link 'How placements work' expect(page).to have_content 'Please check it and make your changes before saving' end @@ -75,17 +75,17 @@ def and_i_do_not_see_the_warning_that_changes_are_not_saved end def and_the_warning_has_a_link_to_the_school_placements_input_field - href = find_link('How school placements work')[:href] - school_placements_id = (find_field 'How school placements work')[:id] + href = find_link('How placements work')[:href] + school_placements_id = (find_field 'How placements work')[:id] expect(school_placements_id).to eq(href.remove('#')) end def then_i_see_the_copied_course_data - expect(find_field('How school placements work').value).to eq @copied_course.enrichments.first.how_school_placements_work + expect(find_field('How placements work').value).to eq @copied_course.enrichments.first.how_school_placements_work end def then_i_do_not_see_copied_course_data - expect(find_field('How school placements work').value).to eq @course.enrichments.first.how_school_placements_work + expect(find_field('How placements work').value).to eq @course.enrichments.first.how_school_placements_work end def then_the_focus_is_on_the_input diff --git a/spec/features/publish/courses/editing_course_school_placements_spec.rb b/spec/features/publish/courses/editing_course_school_placements_spec.rb index e09e1ccd02..8ac2a25990 100644 --- a/spec/features/publish/courses/editing_course_school_placements_spec.rb +++ b/spec/features/publish/courses/editing_course_school_placements_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -feature 'Editing how school placements work', { can_edit_current_and_next_cycles: false } do +feature 'Editing how placements work', { can_edit_current_and_next_cycles: false } do scenario 'I can update some information about the course' do given_i_am_authenticated_as_a_provider_user and_there_is_a_course_i_want_to_edit @@ -92,25 +92,25 @@ def when_i_visit_the_publish_course_information_edit_page def and_i_set_information_about_the_course @school_placements = 'This is a new school placements' - fill_in 'How school placements work', with: @school_placements + fill_in 'How placements work', with: @school_placements end def and_i_submit_with_too_many_words - fill_in 'How school placements work', with: Faker::Lorem.sentence(word_count: 351) + fill_in 'How placements work', with: Faker::Lorem.sentence(word_count: 351) and_i_submit end def and_i_submit_without_any_data - fill_in 'How school placements work', with: '' + fill_in 'How placements work', with: '' and_i_submit end def and_i_submit - click_on 'Update how school placements work' + click_on 'Update how placements work' end def then_i_see_a_success_message - expect(page).to have_content 'How school placements work updated' + expect(page).to have_content 'How placements work updated' end def and_the_course_information_is_updated @@ -120,11 +120,11 @@ def and_the_course_information_is_updated end def then_i_see_an_error_message_about_reducing_word_count - expect(page).to have_content('Reduce the word count for how school placements work').twice + expect(page).to have_content('Reduce the word count for how placements work').twice end def then_i_see_an_error_message_about_entering_data - expect(page).to have_content('Enter details about how school placements work').twice + expect(page).to have_content('Enter details about how placements work').twice end def provider diff --git a/spec/features/publish/courses/new_tda_course_spec.rb b/spec/features/publish/courses/new_tda_course_spec.rb index 097b3a1366..9a6b6c248f 100644 --- a/spec/features/publish/courses/new_tda_course_spec.rb +++ b/spec/features/publish/courses/new_tda_course_spec.rb @@ -468,11 +468,11 @@ def and_i_add_course_details click_on 'Update about this course' publish_provider_courses_show_page.how_school_placements_work.find_link( - text: 'Change details about how school placements work' + text: 'Change details about how placements work' ).click - fill_in 'How school placements work', with: 'School placements information' - click_on 'Update how school placements work' + fill_in 'How placements work', with: 'School placements information' + click_on 'Update how placements work' end def and_i_add_salary_information diff --git a/spec/features/publish/courses/publishing_a_course_spec.rb b/spec/features/publish/courses/publishing_a_course_spec.rb index 6b9ac6c805..fee82b4f9e 100644 --- a/spec/features/publish/courses/publishing_a_course_spec.rb +++ b/spec/features/publish/courses/publishing_a_course_spec.rb @@ -101,8 +101,8 @@ def when_i_make_some_new_changes course.recruitment_cycle_year, course.course_code ) - fill_in 'How school placements work', with: 'some new information about school placements' - click_on 'Update how school placements work' + fill_in 'How placements work', with: 'some new information about school placements' + click_on 'Update how placements work' end def then_i_should_see_the_unpublished_changes_message diff --git a/spec/features/publish/viewing_a_course_preview_spec.rb b/spec/features/publish/viewing_a_course_preview_spec.rb index b2b2eb7dfd..0c503b73ea 100644 --- a/spec/features/publish/viewing_a_course_preview_spec.rb +++ b/spec/features/publish/viewing_a_course_preview_spec.rb @@ -48,9 +48,9 @@ scenario 'blank school placements section' do given_i_am_authenticated(user: user_with_no_course_enrichments) when_i_visit_the_publish_course_preview_page - and_i_click_link_or_button('Enter details about how school placements work') + and_i_click_link_or_button('Enter details about how placements work') and_i_click_link_or_button('Back') - and_i_click_link_or_button('Enter details about how school placements work') + and_i_click_link_or_button('Enter details about how placements work') and_i_submit_a_valid_form and_i_see_the_correct_banner and_i_see_the_new_course_text @@ -84,9 +84,9 @@ scenario 'blank school placements' do given_i_am_authenticated(user: user_with_no_course_enrichments) when_i_visit_the_publish_course_preview_page - and_i_click_link_or_button('Enter details about how school placements work') + and_i_click_link_or_button('Enter details about how placements work') and_i_click_link_or_button('Back') - and_i_click_link_or_button('Enter details about how school placements work') + and_i_click_link_or_button('Enter details about how placements work') and_i_submit_a_valid_form and_i_see_the_correct_banner then_i_should_be_back_on_the_preview_page @@ -427,9 +427,9 @@ def and_i_submit_a_valid_about_your_organisation end def and_i_submit_a_valid_form - fill_in 'How school placements work', with: 'great placement' + fill_in 'How placements work', with: 'great placement' - click_link_or_button 'Update how school placements work' + click_link_or_button 'Update how placements work' end def and_i_submit_a_valid_course_fees diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 68daf8c9a8..36d03dcf35 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -35,7 +35,7 @@ it 'injects the provided content into the provided summary list row' do expect(subject).to have_css(%(.govuk-summary-list__row[data-qa="enrichment__about"])) expect(subject).to have_css('.govuk-summary-list__key', text: 'About course') - expect(subject).to have_css('.govuk-summary-list__value.app-summary-list__value--truncate', text: 'Something about the course') + expect(subject).to have_css('.govuk-summary-list__value', text: 'Something about the course') end end diff --git a/spec/models/course/publishable_spec.rb b/spec/models/course/publishable_spec.rb index 798f3c3dd4..55ce9372c5 100644 --- a/spec/models/course/publishable_spec.rb +++ b/spec/models/course/publishable_spec.rb @@ -17,7 +17,7 @@ { sites: ['^Select at least one school'], accrediting_provider: ['Select an accredited provider'], about_course: ['^Enter information about this course'], - how_school_placements_work: ['^Enter details about how school placements work'], + how_school_placements_work: ['^Enter details about how placements work'], course_length: ['^Enter a course length'], salary_details: ['^Enter details about the salary for this course'], base: ['Enter GCSE requirements'] }