From 999af9b49ae212ae62135ea28987766b9fe6c1f1 Mon Sep 17 00:00:00 2001
From: Iain McNulty
Date: Thu, 30 Jan 2025 10:07:44 +0000
Subject: [PATCH 1/3] Replace Support and Advice in Find for TDA courses
TDA courses are not the responsibility of GiT. We do not want to
invite candidates to seek advice from GiT for these courses
---
app/assets/stylesheets/components/_advice.scss | 3 ++-
app/views/find/courses/_tda_advice.html.erb | 9 +++++++++
app/views/find/courses/show.html.erb | 6 +++++-
config/locales/find.yml | 4 ++++
4 files changed, 20 insertions(+), 2 deletions(-)
create mode 100644 app/views/find/courses/_tda_advice.html.erb
diff --git a/app/assets/stylesheets/components/_advice.scss b/app/assets/stylesheets/components/_advice.scss
index 4bd3d3fa28..4fb5e12b12 100644
--- a/app/assets/stylesheets/components/_advice.scss
+++ b/app/assets/stylesheets/components/_advice.scss
@@ -16,7 +16,8 @@
margin-bottom: 0;
}
-#section-advice-and-support {
+#section-advice-and-support,
+#section-tda-advice {
border: 5px solid govuk-colour("pink");
margin-bottom: 30px;
padding: 20px;
diff --git a/app/views/find/courses/_tda_advice.html.erb b/app/views/find/courses/_tda_advice.html.erb
new file mode 100644
index 0000000000..abdb8fc99a
--- /dev/null
+++ b/app/views/find/courses/_tda_advice.html.erb
@@ -0,0 +1,9 @@
+
+
<%= t(".heading") %>
+
+ <%= t(".content") %>
+
+
+ <%= govuk_link_to(t(".link_text"), t("find.get_into_teaching.url_tda")) %>
+
+
diff --git a/app/views/find/courses/show.html.erb b/app/views/find/courses/show.html.erb
index c6b6a834ce..f545fe8dfe 100644
--- a/app/views/find/courses/show.html.erb
+++ b/app/views/find/courses/show.html.erb
@@ -67,7 +67,11 @@
<% end %>
- <%= render partial: "find/courses/advice", locals: { course: @course } %>
+ <% if @course.teacher_degree_apprenticeship? %>
+ <%= render partial: "find/courses/tda_advice" %>
+ <% else %>
+ <%= render partial: "find/courses/advice", locals: { course: @course } %>
+ <% end %>
<% if @course.application_status_closed? %>
<%= render partial: "find/courses/course_closed" %>
diff --git a/config/locales/find.yml b/config/locales/find.yml
index 1686fbc990..0d052facdc 100644
--- a/config/locales/find.yml
+++ b/config/locales/find.yml
@@ -209,6 +209,10 @@ en:
uk_citizens: UK citizens
non_uk_citizens: Non-UK citizens
course_fees: The course fees for UK citizens in %{cycle_range} are %{fee}.
+ tda_advice:
+ heading: Teacher degree apprenticeships (TDAs)
+ content: On a teacher degree apprenticeship you’ll work in a school and earn a salary while getting a bachelor’s degree and qualified teacher status (QTS).
+ link_text: Find out more about teacher degree apprenticeships.
advice:
heading: Support and advice
postgraduate:
From 5d54b828b895b4017654a36b15ebd4c37d572811 Mon Sep 17 00:00:00 2001
From: Iain McNulty
Date: Thu, 30 Jan 2025 11:46:54 +0000
Subject: [PATCH 2/3] Move course page specs out of search directory
---
.../{search => course}/undergraduate/viewing_a_course_spec.rb | 0
spec/features/find/{search => course}/viewing_a_course_spec.rb | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename spec/features/find/{search => course}/undergraduate/viewing_a_course_spec.rb (100%)
rename spec/features/find/{search => course}/viewing_a_course_spec.rb (100%)
diff --git a/spec/features/find/search/undergraduate/viewing_a_course_spec.rb b/spec/features/find/course/undergraduate/viewing_a_course_spec.rb
similarity index 100%
rename from spec/features/find/search/undergraduate/viewing_a_course_spec.rb
rename to spec/features/find/course/undergraduate/viewing_a_course_spec.rb
diff --git a/spec/features/find/search/viewing_a_course_spec.rb b/spec/features/find/course/viewing_a_course_spec.rb
similarity index 100%
rename from spec/features/find/search/viewing_a_course_spec.rb
rename to spec/features/find/course/viewing_a_course_spec.rb
From fd49fbcc7161e44463017e58cc35d38ea863b684 Mon Sep 17 00:00:00 2001
From: Iain McNulty
Date: Thu, 30 Jan 2025 15:35:23 +0000
Subject: [PATCH 3/3] Update specs for TDA advice on course page
---
.../undergraduate/viewing_a_course_spec.rb | 29 ++++++++++---------
spec/support/page_objects/find/course_show.rb | 2 ++
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/spec/features/find/course/undergraduate/viewing_a_course_spec.rb b/spec/features/find/course/undergraduate/viewing_a_course_spec.rb
index e435efcde4..4bce8528c3 100644
--- a/spec/features/find/course/undergraduate/viewing_a_course_spec.rb
+++ b/spec/features/find/course/undergraduate/viewing_a_course_spec.rb
@@ -16,7 +16,9 @@
scenario 'user visits get into teaching advice page' do
given_there_is_a_findable_undergraduate_course
when_i_visit_the_course_page
- and_i_click_to_contact_get_into_teaching
+ then_i_see_the_tda_advice_callout
+ and_i_do_not_see_the_support_and_advice_callout
+ when_i_click_to_contact_get_into_teaching
then_i_am_redirected_to_the_git_help_and_support_page
end
@@ -24,14 +26,6 @@ def given_there_is_a_findable_undergraduate_course
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: '1BK')
- accredited_provider = create(:provider, :accredited_provider, provider_code: '1BJ')
- provider.accrediting_provider_enrichments = []
- provider.accrediting_provider_enrichments << AccreditingProviderEnrichment.new(
- {
- UcasProviderCode: accredited_provider.provider_code,
- Description: 'description'
- }
- )
@course = create(:course, :published_teacher_degree_apprenticeship, :secondary, provider:, name: 'Biology', subjects: [find_or_create(:secondary_subject, :biology)])
end
@@ -42,15 +36,22 @@ def when_i_visit_the_course_page
)
end
- def and_i_click_to_contact_get_into_teaching
- expect(page).to have_content('Support and advice')
- expect(page).to have_content('You can contact Get Into Teaching for free support')
- click_link_or_button('contact Get Into Teaching')
+ def then_i_see_the_tda_advice_callout
+ expect(find_course_show_page.course_tda_advice).to have_css(:h2, text: 'Teacher degree apprenticeship')
+ expect(find_course_show_page.course_tda_advice).to have_content('On a teacher degree apprenticeship you’ll work in a school and earn a salary while getting a bachelor’s degree and qualified teacher status (QTS).')
+ end
+
+ def and_i_do_not_see_the_support_and_advice_callout
+ expect(page).to have_no_css(:h2, text: 'Support and advice')
+ end
+
+ def when_i_click_to_contact_get_into_teaching
+ click_link_or_button('Find out more about teacher degree apprenticeships.')
end
def then_i_am_redirected_to_the_git_help_and_support_page
expect(page.current_url).to eq(
- 'https://getintoteaching.education.gov.uk/help-and-support'
+ 'https://getintoteaching.education.gov.uk/train-to-be-a-teacher/teacher-degree-apprenticeships'
)
end
end
diff --git a/spec/support/page_objects/find/course_show.rb b/spec/support/page_objects/find/course_show.rb
index fdc9ff42e1..e43c283a5e 100644
--- a/spec/support/page_objects/find/course_show.rb
+++ b/spec/support/page_objects/find/course_show.rb
@@ -27,6 +27,8 @@ class CourseShow < PageObjects::Base
element :about_accrediting_provider, '[data-qa=course__about_accrediting_provider]'
element :train_with_disability, '[data-qa=course__train_with_disabilities]'
element :course_advice, '#section-advice'
+ element :course_tda_advice, '#section-tda-advice'
+ element :course_support_and_advice, '#section-support-and-advice'
element :course_apply, '#section-apply'
element :apply_link, 'a[data-qa=course__apply_link]'
element :back_link, '[data-qa=page-back]'