Skip to content

Commit

Permalink
Merge pull request #6788 from alphagov/ETA-nvn/EEA-warning-callout-ne…
Browse files Browse the repository at this point in the history
…w-pr-for-new-preview-deploy

Eta September 2024 nvn/eea warning callout
  • Loading branch information
mtaylorgds committed May 24, 2024
2 parents 13be0ab + 62e578f commit 3405ce9
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<% if calculator.passport_country_in_non_visa_national_list? %>
^You currently do not need an electronic travel authorisation (ETA) to travel to the UK. Check what you’ll need again before you travel.
<% elsif calculator.passport_country_in_eea? %>
^You currently do not need an electronic travel authorisation (ETA) to travel to the UK. Check what you’ll need again before you travel.
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

##If you want to convert a civil partnership into a marriage

<%= render partial: "electronic_travel_authorisation_advice", locals: {calculator: calculator} %>
<% if calculator.passport_country_requires_electronic_travel_authorisation? %>
You'll need to apply for either:

Expand Down
3 changes: 3 additions & 0 deletions app/flows/check_uk_visa_flow/outcomes/outcome_medical_n.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<% end %>
<% govspeak_for :body do %>
<%= render partial: "electronic_travel_authorisation_advice", locals: {calculator: calculator} %>

You can stay in the UK for up to 6 months without a visa, but you must meet the [Standard Visitor eligibility requirements](/standard-visitor).

[Check what documents you need to bring](/standard-visitor/visit-for-medical-reasons) to show officers at the UK border.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

However, you should bring evidence of your onward journey to show to officers at the UK border.

<%= render partial: "electronic_travel_authorisation_advice", locals: {calculator: calculator} %>
<% if calculator.travelling_to_ireland? %>
%You may want to [apply for a visa](/browse/visas-immigration/tourist-short-stay-visas) if you have a criminal record or you’ve previously been refused entry into the UK.%
<% end %>
Expand Down
2 changes: 2 additions & 0 deletions app/flows/check_uk_visa_flow/outcomes/outcome_school_n.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<% end %>
<% govspeak_for :body do %>
<%= render partial: "electronic_travel_authorisation_advice", locals: {calculator: calculator} %>

You can stay in the UK for up to 6 months without a visa, but you must meet the [Standard Visitor eligibility requirements](/standard-visitor).

[Check what documents you need to bring](/government/publications/visitor-visa-guide-to-supporting-documents) to show officers at the UK border.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<% end %>
<% govspeak_for :body do %>
<%= render partial: "electronic_travel_authorisation_advice", locals: {calculator: calculator} %>

You can stay in the UK as a student for up to 6 months without a visa, but you must meet the Standard Visitor eligibility requirements.

%You may want to [apply for a Standard Visitor visa](/standard-visitor/apply-standard-visitor-visa) if you have a criminal record or you’ve previously been refused entry into the UK.%
Expand Down
2 changes: 2 additions & 0 deletions app/flows/check_uk_visa_flow/outcomes/outcome_tourism_n.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<% end %>
<% govspeak_for :body do %>
<%= render partial: "electronic_travel_authorisation_advice", locals: {calculator: calculator} %>

You can stay in the UK as a tourist for up to 6 months without a visa, but you must meet the Standard Visitor eligibility requirements.

%You may want to [apply for a Standard Visitor visa](/standard-visitor/apply-standard-visitor-visa) if you have a criminal record or you’ve previously been refused entry into the UK.%
Expand Down
3 changes: 2 additions & 1 deletion app/flows/check_uk_visa_flow/outcomes/outcome_work_n.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<% end %>
<% govspeak_for :body do %>

<%= render partial: "electronic_travel_authorisation_advice", locals: {calculator: calculator} %>

##What you can and cannot do without a visa

You can come to the UK as a Standard Visitor for up to 6 months without a visa if you’re doing certain activities, such as:
Expand Down
171 changes: 168 additions & 3 deletions test/flows/check_uk_visa_flow_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class CheckUkVisaFlowTest < ActiveSupport::TestCase
@b1_b2_country = "syria"
@youth_mobility_scheme_country = "canada"

@eta_text = "If you’re travelling on or after 22 February 2024, you’ll need to apply for an electronic travel authorisation (ETA)"
@non_visa_national_eta_text = "You currently do not need an electronic travel authorisation (ETA)"
@eea_eta_text = "You currently do not need an electronic travel authorisation (ETA)"

# stub only the countries used in this test for less of a performance impact
stub_worldwide_api_has_locations(["china",
Expand Down Expand Up @@ -605,14 +606,12 @@ class CheckUkVisaFlowTest < ActiveSupport::TestCase
should "render specific guidance to British nationals overseas" do
add_responses what_passport_do_you_have?: "british-national-overseas"
assert_rendered_outcome text: "you can apply for a British National Overseas (BNO) visa."
assert_no_rendered_outcome text: "electronic travel authorisation (ETA)"
assert_rendered_outcome text: "You will not need a visa but"
end

should "render different guidance to non-British nationals overseas" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: "you must apply for a family visa"
assert_no_rendered_outcome text: "electronic travel authorisation (ETA)"
assert_rendered_outcome text: "You will not need a visa but"
end

Expand Down Expand Up @@ -940,4 +939,170 @@ class CheckUkVisaFlowTest < ActiveSupport::TestCase
assert_no_rendered_outcome text: "Whether you need a visa depends"
end
end

context "ETA callout box on" do
context "outcome: outcome_tourism_n" do
setup do
testing_node :outcome_tourism_n
add_responses purpose_of_visit?: "tourism"
end

should "not render callout box for countries that do not require it" do
add_responses what_passport_do_you_have?: @british_overseas_territory_country
assert_no_rendered_outcome text: @non_visa_national_eta_text
assert_no_rendered_outcome text: @eea_eta_text
end

should "render callout box for non_visa_national_country passport holders" do
add_responses what_passport_do_you_have?: @non_visa_national_country
assert_rendered_outcome text: @non_visa_national_eta_text
end

should "render callout box for eea_country passport holders" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: @eea_eta_text
end
end

context "outcome: outcome_work_n" do
setup do
testing_node :outcome_work_n
add_responses purpose_of_visit?: "work",
staying_for_how_long?: "six_months_or_less"
end

should "not render ETA callout box for countries that do not require it" do
add_responses what_passport_do_you_have?: @british_overseas_territory_country
assert_no_rendered_outcome text: @non_visa_national_eta_text
assert_no_rendered_outcome text: @eea_eta_text
end

should "render callout box for non_visa_national_country passport holders" do
add_responses what_passport_do_you_have?: @non_visa_national_country
assert_rendered_outcome text: @non_visa_national_eta_text
end

should "render callout box for eea_country passport holders" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: @eea_eta_text
end
end

context "outcome: outcome_study_no_visa_needed" do
setup do
testing_node :outcome_study_no_visa_needed
add_responses purpose_of_visit?: "study",
staying_for_how_long?: "six_months_or_less"
end

should "not render ETA callout box for countries that do not require it" do
add_responses what_passport_do_you_have?: @british_overseas_territory_country
assert_no_rendered_outcome text: @non_visa_national_eta_text
assert_no_rendered_outcome text: @eea_eta_text
end

should "render callout box for non_visa_national_country passport holders" do
add_responses what_passport_do_you_have?: @non_visa_national_country
assert_rendered_outcome text: @non_visa_national_eta_text
end

should "render callout box for eea_country passport holders" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: @eea_eta_text
end
end

context "outcome: outcome_marriage_nvn" do
setup do
testing_node :outcome_marriage_nvn
add_responses purpose_of_visit?: "marriage"
end

should "not render ETA callout box for countries that do not require it" do
add_responses what_passport_do_you_have?: @british_overseas_territory_country
assert_no_rendered_outcome text: @non_visa_national_eta_text
assert_no_rendered_outcome text: @eea_eta_text
end

should "render callout box for non_visa_national_country passport holders" do
add_responses what_passport_do_you_have?: @non_visa_national_country
assert_rendered_outcome text: @non_visa_national_eta_text
end

should "render callout box for eea_country passport holders" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: @eea_eta_text
end
end

context "outcome: outcome_school_n" do
setup do
testing_node :outcome_school_n
add_responses purpose_of_visit?: "school"
end

should "not render ETA callout box for countries that do not require it" do
add_responses what_passport_do_you_have?: @british_overseas_territory_country
assert_no_rendered_outcome text: @non_visa_national_eta_text
assert_no_rendered_outcome text: @eea_eta_text
end

should "render callout box for non_visa_national_country passport holders" do
add_responses what_passport_do_you_have?: @non_visa_national_country
assert_rendered_outcome text: @non_visa_national_eta_text
end

should "render callout box for eea_country passport holders" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: @eea_eta_text
end
end

context "outcome: outcome_medical_n" do
setup do
testing_node :outcome_medical_n
add_responses purpose_of_visit?: "medical"
end

should "not render ETA callout box for countries that do not require it" do
add_responses what_passport_do_you_have?: @british_overseas_territory_country
assert_no_rendered_outcome text: @non_visa_national_eta_text
assert_no_rendered_outcome text: @eea_eta_text
end

should "render callout box for non_visa_national_country passport holders" do
add_responses what_passport_do_you_have?: @non_visa_national_country
assert_rendered_outcome text: @non_visa_national_eta_text
end

should "render callout box for eea_country passport holders" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: @eea_eta_text
end
end

context "outcome: outcome_no_visa_needed" do
setup do
testing_node :outcome_no_visa_needed
add_responses purpose_of_visit?: "transit",
travelling_to_cta?: "somewhere_else"
end

should "not render ETA callout box for countries that do not require it" do
add_responses what_passport_do_you_have?: @british_overseas_territory_country
assert_no_rendered_outcome text: @non_visa_national_eta_text
assert_no_rendered_outcome text: @eea_eta_text
end

should "render callout box for non_visa_national_country passport holders" do
add_responses what_passport_do_you_have?: @non_visa_national_country
assert_rendered_outcome text: @non_visa_national_eta_text
end

should "render callout box for eea_country passport holders" do
add_responses what_passport_do_you_have?: @eea_country
assert_rendered_outcome text: @eea_eta_text
end
end
end
end

0 comments on commit 3405ce9

Please sign in to comment.