Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Update content for International Candidates section #1138

Merged
merged 94 commits into from Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
d99b357
Add new sub-section about international candidates
frankieroberto Jan 6, 2022
d2d3602
Update table of contents
frankieroberto Jan 6, 2022
fef28df
Update content where Student visas can be sponsored
frankieroberto Jan 6, 2022
96c5d4c
Update content where skilled worker visas can be sponsored
frankieroberto Jan 6, 2022
c31b2a7
Fix link to Get Into Teaching
frankieroberto Jan 6, 2022
2cfea7a
Update content where visas cannot be sponsored
frankieroberto Jan 6, 2022
ca50e9d
Fix the content
frankieroberto Jan 6, 2022
16e723c
Update content
frankieroberto Jan 6, 2022
d388501
Update content
frankieroberto Jan 7, 2022
ecec677
Fix
frankieroberto Jan 7, 2022
3034ac6
Update
frankieroberto Jan 7, 2022
0d670a0
Remove unneeded line
frankieroberto Jan 7, 2022
7256f5c
Remove "other"
frankieroberto Jan 7, 2022
ad1ad39
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
3097966
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
ba1557e
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
bf749de
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
68ca73c
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
0116a4f
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
da59a98
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
cb7b032
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
dbbdada
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
6e5ab5a
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
bd9afa8
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
30286ff
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
033de18
Update app/components/courses/international_students_component.html.erb
EmmaFrith Jan 7, 2022
5f9494a
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
922a6c3
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
ef84258
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
dda4a16
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
bb8af4b
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
6756cb2
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
2f29d7f
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
c964320
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
8ab6eb1
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
63f8887
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
c56a322
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 7, 2022
94d7055
Mark strings as HTML safe
frankieroberto Jan 10, 2022
fdbdfe5
Merge branch 'master' into international-candidates-section
frankieroberto Jan 10, 2022
1f3d095
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
7ae5bd2
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
0f9818d
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
3f38bbb
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
3197357
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
e908506
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
71b127f
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
d5d0f19
Syntax fix
frankieroberto Jan 10, 2022
5e86434
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
2182b53
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
405b59d
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
f7e0301
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
cdb0328
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
d880da2
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
7c97b68
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
18dc28a
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
744086a
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
0d0de71
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
bdcfe23
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
6c36f59
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
1765c25
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 10, 2022
2beee13
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 11, 2022
325687c
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 11, 2022
17d1194
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 11, 2022
3213f86
Update app/components/courses/international_students_component.rb
EmmaFrith Jan 11, 2022
2267d54
Update show_spec.rb
EmmaFrith Jan 11, 2022
2212a6c
Undo changes by EF
MylesJarvis Jan 11, 2022
2561731
Testing replacing ' with `
MylesJarvis Jan 11, 2022
ae86de7
Revert previous change by MJ
MylesJarvis Jan 11, 2022
49100f9
Fix ruby
frankieroberto Jan 12, 2022
e7e755e
Fix tests
frankieroberto Jan 12, 2022
e4d4db7
Fix test
frankieroberto Jan 12, 2022
0fd8421
Add missing link
frankieroberto Jan 17, 2022
127079a
Merge branch 'main' into international-candidates-section
frankieroberto Feb 10, 2022
632ce59
Update content
frankieroberto Feb 10, 2022
b6fdc27
Update app/components/courses/international_students_component.html.erb
EmmaFrith Feb 10, 2022
04eb992
Update app/components/courses/international_students_component.html.erb
EmmaFrith Feb 10, 2022
5cf86da
Update tests
frankieroberto Feb 10, 2022
2768715
Refactor by removing duplicate text
frankieroberto Feb 10, 2022
f5c7d1e
Update app/components/courses/international_students_component.html.erb
EmmaFrith Feb 11, 2022
8ddbb1e
Update app/components/courses/international_students_component.html.erb
EmmaFrith Feb 11, 2022
ef7a356
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
73e5a9d
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
28fdec7
Update app/components/courses/international_students_component.html.erb
EmmaFrith Feb 11, 2022
ca1128c
Update app/components/courses/international_students_component.html.erb
EmmaFrith Feb 11, 2022
0e13bfd
Move type: :component to the describe statement
frankieroberto Feb 11, 2022
68f0816
Switch to using rendered_component instead of instance variable
frankieroberto Feb 11, 2022
c580c4d
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
90d611d
move association build inline
frankieroberto Feb 11, 2022
db4b084
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
b1fe79b
Merge branch 'international-candidates-section' of https://github.com…
frankieroberto Feb 11, 2022
63f7369
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
34265b4
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
97fa24e
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
dead613
Update app/components/courses/international_students_component.rb
EmmaFrith Feb 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/courses/contents_component.html.erb
Expand Up @@ -17,7 +17,7 @@
<% if interview_process.present? %>
<li><%= govuk_link_to 'Interview process', '#section-interviews' %></li>
<% end %>
<li><%= govuk_link_to 'International students', '#section-international-students' %></li>
<li><%= govuk_link_to 'International candidates', '#section-international-students' %></li>
<% if provider.train_with_disability.present? %>
<li><%= govuk_link_to 'Training with disabilities and other needs', '#section-train-with-disabilities' %></li>
<% end %>
Expand Down
27 changes: 24 additions & 3 deletions app/components/courses/international_students_component.html.erb
@@ -1,8 +1,29 @@
<div class="govuk-!-margin-bottom-8">
<h2 class="govuk-heading-l" id="section-international-students">International students</h2>
<h2 class="govuk-heading-l" id="section-international-students">International candidates</h2>
<div data-qa="course__international_students">

<p class="govuk-body">You’ll need the <%= right_required %> in the UK. You already have this if, for example, you:</p>

<ul class="govuk-list govuk-list--bullet">
<li>are an Irish citizen</li>
<li>have settled or pre-settled status under the <%= govuk_link_to('EU Settlement Scheme', 'https://www.gov.uk/settled-status-eu-citizens-families') %> (you may still be able to apply)</li>
EmmaFrith marked this conversation as resolved.
Show resolved Hide resolved
</ul>

<p class="govuk-body"><%= visa_sponsorship_status %></p>
<p class="govuk-body">You do not need a visa if you already have settled or pre-settled status under the EU Settlement Scheme, or if you’re an Irish citizen.</p>
<p class="govuk-body">Candidates with qualifications from non-UK institutions may need to provide evidence of comparability by applying for a <%= govuk_link_to("UK ENIC statement", "https://www.enic.org.uk") %>.</p>

<p class="govuk-body">Alternatively, check if you’re eligible for a different type of visa, such as a Graduate or Family visa, that allows you to train to be a teacher without being sponsored.</p>

<p class="govuk-body">Find out more about <%= govuk_link_to('training to teach in England', 'https://www.gov.uk/government/publications/train-to-teach-in-england-non-uk-applicants/train-to-teach-in-england-if-youre-a-non-uk-citizen') %>.</p>

<h3 class="govuk-heading-m">International qualifications</h3>
<p class="govuk-body">If your qualifications come from a non-UK institution, we may want to see a ‘statement of comparability’ from UK ENIC. This will show us how they compare to UK qualifications.</p>

<p class="govuk-body">You can call <a href="https://getintoteaching.education.gov.uk" class="govuk-link">Get Into Teaching</a> on 0800 389 2500 for:</p>

<ul class="govuk-list govuk-list--bullet">
<li>guidance on the UK equivalents of your qualifications</li>
<li>a free statement of comparability once you’ve submitted your application (if we ask you for this)</li>
</ul>

</div>
</div>
38 changes: 33 additions & 5 deletions app/components/courses/international_students_component.rb
Expand Up @@ -2,8 +2,6 @@ module Courses
class InternationalStudentsComponent < ViewComponent::Base
include ViewHelper

TRAIN_TO_TEACH_URL = 'https://www.gov.uk/government/publications/train-to-teach-in-england-non-uk-applicants/train-to-teach-in-england-non-uk-applicants#visas-and-immigration'.freeze

def initialize(course:)
@course = course
end
Expand All @@ -12,13 +10,43 @@ def provider
@provider ||= @course.provider
end

def right_required
if @course.salaried?
'right to work'
else
'right to study'
end
end

def visa_sponsorship_status
if !@course.salaried? && provider.can_sponsor_student_visa
"We can sponsor #{govuk_link_to('Student visas', TRAIN_TO_TEACH_URL)}, but this is not guaranteed.".html_safe
"<p class=\"govuk-body\">If you do not already have the right to study in the UK for the duration of this course, you may need to apply for a Student visa.</p>
YoniF1 marked this conversation as resolved.
Show resolved Hide resolved

<p class=\"govuk-body\">To do this, you’ll need to be sponsored by your training provider.</p>

<p class=\"govuk-body\">Before you apply for this course, contact us to check Student visa sponsorship is available. If it is, and you get a place on this course, we’ll help you apply for your visa.</p>".html_safe
elsif @course.salaried? && provider.can_sponsor_skilled_worker_visa
"We can sponsor #{govuk_link_to('Skilled Worker visas', TRAIN_TO_TEACH_URL)}, but this is not guaranteed.".html_safe
"<p class=\"govuk-body\">If you do not already have the right to work in the UK for the duration of this course, you may need to apply for a Skilled Worker visa.</p>

<p class=\"govuk-body\">To do this, you’ll need to be sponsored by your employer.</p>

<p class=\"govuk-body\">Before you apply for this course, contact us to check Skilled Worker visa sponsorship is available. If it is, and you get a place on this course, we’ll help you apply for your visa.</p>".html_safe
elsif @course.salaried?
"<p class=\"govuk-body\">The main visa for salaried courses is the Skilled Worker visa.</p>
EmmaFrith marked this conversation as resolved.
Show resolved Hide resolved

<p class=\"govuk-body\">To apply for a Skilled Worker visa you need to be sponsored by your employer.</p>

<p class=\"govuk-body\">Sponsorship is not available for this course.</p>

<p class=\"govuk-body\">If you need a visa, filter your course search to find courses with visa sponsorship.</p>".html_safe
else
"We cannot sponsor visas. You’ll need to #{govuk_link_to('get the right visa or status to study in the UK', TRAIN_TO_TEACH_URL)}.".html_safe
"<p class=\"govuk-body\">If you do not already have the right to study in the UK for the duration of this course, you may need to apply for a visa. The main visa for ‘fee-paying’ courses (courses that you have to pay for) is the Student visa.</p>
EmmaFrith marked this conversation as resolved.
Show resolved Hide resolved

<p class=\"govuk-body\">To apply for a Student visa you need to be sponsored by your training provider.</p>
EmmaFrith marked this conversation as resolved.
Show resolved Hide resolved

<p class=\"govuk-body\">Sponsorship is not available for this course.</p>

<p class=\"govuk-body\">If you need a visa, filter your course search to find courses with visa sponsorship.</p>".html_safe
end
end
end
Expand Down
69 changes: 54 additions & 15 deletions spec/components/courses/international_students_component_spec.rb
@@ -1,8 +1,8 @@
require 'rails_helper'

describe Courses::InternationalStudentsComponent do
context 'when the provider does not sponsor visa', type: :component do
it 'renders correct message' do
context 'when the course is fee-paying and the provider does not sponsor Student visas', type: :component do
frankieroberto marked this conversation as resolved.
Show resolved Hide resolved
before do
provider = build(
:provider,
can_sponsor_student_visa: false,
Expand All @@ -13,15 +13,20 @@
funding_type: 'fee',
provider: provider,
)
result = render_inline(described_class.new(course: CourseDecorator.new(course)))
@result = render_inline(described_class.new(course: CourseDecorator.new(course)))
frankieroberto marked this conversation as resolved.
Show resolved Hide resolved
end

it 'tells candidates they’ll need the right to study' do
expect(@result.text).to include('You’ll need the right to study in the UK')
frankieroberto marked this conversation as resolved.
Show resolved Hide resolved
end

expect(result.text).to include('We cannot sponsor visas. You’ll need to get the right visa or status to study in the UK')
expect(result).to have_selector("a[href='#{described_class::TRAIN_TO_TEACH_URL}']")
it 'tells candidates sponsorship is not available' do
expect(@result.text).to include('Sponsorship is not available for this course')
end
end

context 'when the provider sponsors student visa the course is not salaried', type: :component do
it 'renders correct message' do
context 'when the course is fee-paying and the provider does sponsor Student visas', type: :component do
before do
provider = build(
:provider,
can_sponsor_student_visa: true,
Expand All @@ -32,15 +37,20 @@
funding_type: 'fee',
provider: provider,
frankieroberto marked this conversation as resolved.
Show resolved Hide resolved
)
result = render_inline(described_class.new(course: CourseDecorator.new(course)))
@result = render_inline(described_class.new(course: CourseDecorator.new(course)))
end

expect(result.text).to include('We can sponsor Student visas, but this is not guaranteed.')
expect(result).to have_selector("a[href='#{described_class::TRAIN_TO_TEACH_URL}']")
it 'tells candidates they’ll need the right to study' do
expect(@result.text).to include('You’ll need the right to study in the UK')
end

it 'tells candidates visa sponsorship may be available, but they should check' do
expect(@result.text).to include('Before you apply for this course, contact us to check Student visa sponsorship is available. If it is, and you get a place on this course, we’ll help you apply for your visa.')
end
end

context 'when the provider sponsors both kinds of visa and the course is salaried', type: :component do
it 'renders correct message' do
context 'when the course is salaried and the provider can sponsor Skilled Worker visas', type: :component do
before do
provider = build(
:provider,
can_sponsor_student_visa: true,
Expand All @@ -51,10 +61,39 @@
funding_type: 'salary',
provider: provider,
)
result = render_inline(described_class.new(course: CourseDecorator.new(course)))
@result = render_inline(described_class.new(course: CourseDecorator.new(course)))
end

it 'tells candidates they’ll need the right to work' do
expect(@result.text).to include('You’ll need the right to work in the UK')
end

it 'tells candidates visa sponsorship may be available, but they should check' do
expect(@result.text).to include('Before you apply for this course, contact us to check Skilled Worker visa sponsorship is available. If it is, and you get a place on this course, we’ll help you apply for your visa.')
end
end

context 'when the course is salaried but the provider cannot sponsor Skilled Worker visas', type: :component do
before do
provider = build(
:provider,
can_sponsor_student_visa: false,
can_sponsor_skilled_worker_visa: false,
)
course = build(
:course,
funding_type: 'salary',
provider: provider,
)
@result = render_inline(described_class.new(course: CourseDecorator.new(course)))
end

it 'tells candidates they’ll need the right to work' do
expect(@result.text).to include('You’ll need the right to work in the UK')
end

expect(result.text).to include('We can sponsor Skilled Worker visas, but this is not guaranteed.')
expect(result).to have_selector("a[href='#{described_class::TRAIN_TO_TEACH_URL}']")
it 'tells candidates visa sponsorship is not available' do
expect(@result.text).to include('Sponsorship is not available for this course')
end
end
end
2 changes: 1 addition & 1 deletion spec/features/courses/show_spec.rb
Expand Up @@ -191,7 +191,7 @@

expect(course_page).to have_international_students
expect(course_page.international_students).to have_content(
'We can sponsor Student visas, but this is not guaranteed.',
'Before you apply for this course, contact us to check Student visa sponsorship is available. If it is, and you get a place on this course, we’ll help you apply for your visa.',
)

expect(course_page.required_qualifications).to have_content(
Expand Down