diff --git a/config/settings.yml b/config/settings.yml index f80bf7d591..779c780e7e 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -42,7 +42,7 @@ cookies: name: _consented_to_analytics_cookies expire_after_days: 182 -current_recruitment_cycle_year: 2024 +current_recruitment_cycle_year: 2025 next_cycle_open_date: 2024-10-1 govuk_notify: diff --git a/spec/controllers/publish/courses/outcome_controller_spec.rb b/spec/controllers/publish/courses/outcome_controller_spec.rb index bdb9b28df9..2b810e81f4 100644 --- a/spec/controllers/publish/courses/outcome_controller_spec.rb +++ b/spec/controllers/publish/courses/outcome_controller_spec.rb @@ -3,8 +3,7 @@ require 'rails_helper' RSpec.describe Publish::Courses::OutcomeController do - let(:recruitment_cycle) { create(:recruitment_cycle, year: 2025) } - let(:user) { create(:user, providers: [build(:provider, recruitment_cycle:)]) } + let(:user) { create(:user, providers: [build(:provider)]) } let(:provider) { user.providers.first } before do diff --git a/spec/features/publish/courses/editing_a_levels_tda_course_spec.rb b/spec/features/publish/courses/editing_a_levels_tda_course_spec.rb index f1aa99d87f..8d13b43ec9 100644 --- a/spec/features/publish/courses/editing_a_levels_tda_course_spec.rb +++ b/spec/features/publish/courses/editing_a_levels_tda_course_spec.rb @@ -136,11 +136,10 @@ end def given_i_am_authenticated_as_a_provider_user - recruitment_cycle = create(:recruitment_cycle, year: 2025) - @user = create(:user, providers: [build(:provider, recruitment_cycle:, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) + @user = create(:user, providers: [build(:provider, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) @provider = @user.providers.first create(:provider, :accredited_provider, provider_code: '1BJ') - @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BJ', recruitment_cycle:) + @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BK') @provider.accrediting_provider_enrichments = [] @provider.accrediting_provider_enrichments << AccreditingProviderEnrichment.new( { @@ -161,7 +160,7 @@ def and_i_have_a_teacher_degree_apprenticeship_course end def when_i_visit_the_course_description_tab - publish_provider_courses_show_page.load(provider_code: @provider.provider_code, recruitment_cycle_year: 2025, course_code: @course.course_code) + publish_provider_courses_show_page.load(provider_code: @provider.provider_code, recruitment_cycle_year: @provider.recruitment_cycle_year, course_code: @course.course_code) end def then_i_see_a_levels_row diff --git a/spec/features/publish/courses/editing_course_outcome_spec.rb b/spec/features/publish/courses/editing_course_outcome_spec.rb index 7693921310..a571ed04d3 100644 --- a/spec/features/publish/courses/editing_course_outcome_spec.rb +++ b/spec/features/publish/courses/editing_course_outcome_spec.rb @@ -34,7 +34,7 @@ context 'TDA course' do scenario 'changing the outcome from non TDA to TDA' do - given_i_am_authenticated_as_a_provider_user_in_the_next_cycle + given_i_am_authenticated_as_a_provider_user and_the_tda_feature_flag_is_active and_there_is_a_qts_course_i_want_to_edit when_i_visit_the_course_outcome_page_in_the_next_cycle @@ -45,7 +45,7 @@ context 'fee course' do scenario 'changing the outcome from TDA to non TDA' do - given_i_am_authenticated_as_a_provider_user_in_the_next_cycle + given_i_am_authenticated_as_a_provider_user and_the_tda_feature_flag_is_active and_there_is_a_tda_course_i_want_to_edit when_i_visit_the_course_outcome_page_in_the_next_cycle @@ -72,7 +72,7 @@ context 'salaried course' do scenario 'changing the outcome from TDA to non TDA' do - given_i_am_authenticated_as_a_provider_user_in_the_next_cycle + given_i_am_authenticated_as_a_provider_user and_the_tda_feature_flag_is_active and_there_is_a_tda_course_i_want_to_edit when_i_visit_the_course_outcome_page_in_the_next_cycle @@ -88,15 +88,6 @@ end end - def given_i_am_authenticated_as_a_provider_user_in_the_next_cycle - next_cycle_providers = [build(:provider, :next_recruitment_cycle, :accredited_provider, - courses: [create(:course, :with_accrediting_provider)], - sites: [build(:site), build(:site)], - study_sites: [build(:site, :study_site)])] - @next_cycle_user = create(:user, providers: next_cycle_providers) - given_i_am_authenticated(user: @next_cycle_user) - end - def given_i_am_authenticated_as_a_provider_user given_i_am_authenticated(user: create(:user, :with_provider)) end @@ -148,7 +139,7 @@ def and_the_course_outcome_is_updated end def then_i_am_shown_the_correct_qts_options - expect(publish_courses_outcome_edit_page.qualification_names).to contain_exactly('QTS', 'QTS with PGCE', 'PGDE with QTS') + expect(publish_courses_outcome_edit_page.qualification_names).to contain_exactly('QTS', 'QTS with PGCE', 'PGDE with QTS', 'Teacher degree apprenticeship (TDA) with QTS') end def then_i_am_shown_the_correct_non_qts_options diff --git a/spec/features/publish/courses/new_tda_course_spec.rb b/spec/features/publish/courses/new_tda_course_spec.rb index aa7723e152..1c1fcebc15 100644 --- a/spec/features/publish/courses/new_tda_course_spec.rb +++ b/spec/features/publish/courses/new_tda_course_spec.rb @@ -219,11 +219,10 @@ end def given_i_am_authenticated_as_a_school_direct_provider_user - recruitment_cycle = create(:recruitment_cycle, year: 2025) - @user = create(:user, providers: [build(:provider, recruitment_cycle:, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) + @user = create(:user, providers: [build(:provider, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) @provider = @user.providers.first create(:provider, :accredited_provider, provider_code: '1BJ') - @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BJ', recruitment_cycle:) + @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BK') @provider.accrediting_provider_enrichments = [] @provider.accrediting_provider_enrichments << AccreditingProviderEnrichment.new( { @@ -240,7 +239,7 @@ def given_i_am_authenticated_as_a_scitt_provider_user @user = create( :user, providers: [ - create(:provider, :scitt, recruitment_cycle: build(:recruitment_cycle, year: 2025), sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)]) + create(:provider, :scitt, sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)]) ] ) given_i_am_authenticated( diff --git a/spec/features/publish/courses/publishing_a_teacher_degree_apprenticeship_course_with_validation_errors_spec.rb b/spec/features/publish/courses/publishing_a_teacher_degree_apprenticeship_course_with_validation_errors_spec.rb index 9bcf7245f3..1051495af7 100644 --- a/spec/features/publish/courses/publishing_a_teacher_degree_apprenticeship_course_with_validation_errors_spec.rb +++ b/spec/features/publish/courses/publishing_a_teacher_degree_apprenticeship_course_with_validation_errors_spec.rb @@ -65,11 +65,10 @@ end def given_i_am_authenticated_as_a_provider_user - recruitment_cycle = create(:recruitment_cycle, year: 2025) - @user = create(:user, providers: [build(:provider, recruitment_cycle:, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) + @user = create(:user, providers: [build(:provider, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) @provider = @user.providers.first create(:provider, :accredited_provider, provider_code: '1BJ') - @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BJ', recruitment_cycle:) + @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BK') @provider.accrediting_provider_enrichments = [] @provider.accrediting_provider_enrichments << AccreditingProviderEnrichment.new( { diff --git a/spec/features/publish/preview_teacher_degree_apprenticeship_course_spec.rb b/spec/features/publish/preview_teacher_degree_apprenticeship_course_spec.rb index f4bc512a24..fa5d666f2a 100644 --- a/spec/features/publish/preview_teacher_degree_apprenticeship_course_spec.rb +++ b/spec/features/publish/preview_teacher_degree_apprenticeship_course_spec.rb @@ -17,11 +17,10 @@ end def given_i_am_authenticated_as_a_provider_user - recruitment_cycle = create(:recruitment_cycle, year: 2025) - @user = create(:user, providers: [build(:provider, recruitment_cycle:, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) + @user = create(:user, providers: [build(:provider, provider_type: 'lead_school', sites: [build(:site), build(:site)], study_sites: [build(:site, :study_site), build(:site, :study_site)])]) @provider = @user.providers.first create(:provider, :accredited_provider, provider_code: '1BJ') - @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BJ', recruitment_cycle:) + @accredited_provider = create(:provider, :accredited_provider, provider_code: '1BK') @provider.accrediting_provider_enrichments = [] @provider.accrediting_provider_enrichments << AccreditingProviderEnrichment.new( { diff --git a/spec/features/publish/viewing_a_course_preview_spec.rb b/spec/features/publish/viewing_a_course_preview_spec.rb index f6adae9a4d..703a2fd45e 100644 --- a/spec/features/publish/viewing_a_course_preview_spec.rb +++ b/spec/features/publish/viewing_a_course_preview_spec.rb @@ -306,7 +306,7 @@ def user_with_fee_based_course :open, :secondary, :fee_type_based, - applications_open_from: Time.zone.tomorrow, + applications_open_from: RecruitmentCycle.current.application_start_date, accrediting_provider:, site_statuses:, enrichments: [course_enrichment], study_sites: [study_site],