From 4a75251a5ca2a2ddf350c3cea8136dc9fd06f8c1 Mon Sep 17 00:00:00 2001 From: Rosa Fox Date: Mon, 11 Jan 2021 17:56:06 +0000 Subject: [PATCH] Update callout box This updates the copy for the individual country pages. It also adds different copy for the Irish page in line with advice from FCDO. --- app/presenters/travel_advice_presenter.rb | 4 +++ .../_ireland_covid_travel_guidance.html.erb | 11 ++++++++ .../content_items/travel_advice.html.erb | 28 +++++++++++-------- .../travel_advice_presenter_test.rb | 11 ++++++++ 4 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 app/views/content_items/_ireland_covid_travel_guidance.html.erb diff --git a/app/presenters/travel_advice_presenter.rb b/app/presenters/travel_advice_presenter.rb index 2661e226b..51ad85eb2 100644 --- a/app/presenters/travel_advice_presenter.rb +++ b/app/presenters/travel_advice_presenter.rb @@ -38,6 +38,10 @@ def country_name content_item["details"]["country"]["name"] end + def ireland? + country_name == "Ireland" + end + def is_summary? @part_slug.nil? end diff --git a/app/views/content_items/_ireland_covid_travel_guidance.html.erb b/app/views/content_items/_ireland_covid_travel_guidance.html.erb new file mode 100644 index 000000000..2079fdce4 --- /dev/null +++ b/app/views/content_items/_ireland_covid_travel_guidance.html.erb @@ -0,0 +1,11 @@ +

+ + Under current UK COVID-19 restrictions, you must stay at home. You must not leave home or travel, including internationally, unless you have a legally permitted reason to do so. Check the rules that apply to you in England, Scotland, Wales and Northern Ireland. + +

+

+ From 15 January, if you intend to travel to England or Scotland from outside the Common Travel Area, including UK nationals returning home from travel abroad, you must provide evidence of a negative COVID-19 test result taken up to 3 days before departure. This testing requirement does not apply to travel from Ireland. +

+

+ If you are legally permitted to travel, check our advice for the country you are visiting. Some other countries have closed borders, and may further restrict movement or bring in new rules including testing requirements with little warning. Before you return to the UK you must provide your journey and contact details. Also check if you need to self-isolate. +

diff --git a/app/views/content_items/travel_advice.html.erb b/app/views/content_items/travel_advice.html.erb index ca65b1fcd..751efc7b6 100644 --- a/app/views/content_items/travel_advice.html.erb +++ b/app/views/content_items/travel_advice.html.erb @@ -25,18 +25,22 @@ } %>
-

- - Under current UK COVID-19 restrictions, you must stay at home. You must not leave home or travel, including abroad, unless you have a legally permitted reason to do so. - - Check the rules that apply to you in England, Scotland, Wales and Northern Ireland. -

-

- If you are legally permitted to travel, check our advice for the country you are visiting. Other countries have closed borders, and may further restrict movement or bring in new rules including testing requirements with little warning. Before you return to the UK you must provide your journey and contact details. Also check if you need to self isolate. -

-

- If you are travelling abroad and wish to return to the UK, contact your airline or travel provider. -

+ <% if @content_item.ireland? %> + <%= render 'content_items/ireland_covid_travel_guidance' %> + <% else %> +

+ + Under current UK COVID-19 restrictions, you must stay at home. You must not leave home or travel, including internationally, unless you have a legally permitted reason to do so. + + Check the rules that apply to you in England, Scotland, Wales and Northern Ireland. +

+

+ From 15 January, if you intend to travel to England or Scotland, including UK nationals returning home from travel abroad, you must provide evidence of a negative COVID-19 test result taken up to 3 days before departure. If you do not comply (and you do not have a valid exemption) your airline or carrier may refuse you boarding and/or you may be fined on arrival. All other current entry requirements and restrictions continue to apply. +

+

+ If you are legally permitted to travel, check our advice for the country you are visiting. Some other countries have closed borders, and may further restrict movement or bring in new rules including testing requirements with little warning. Before you return to the UK you must provide your journey and contact details. Also check if you need to self-isolate. +

+ <% end %>
diff --git a/test/presenters/travel_advice_presenter_test.rb b/test/presenters/travel_advice_presenter_test.rb index acbb79d89..303562e09 100644 --- a/test/presenters/travel_advice_presenter_test.rb +++ b/test/presenters/travel_advice_presenter_test.rb @@ -148,6 +148,17 @@ def schema_name assert_equal "#{schema_item('full-country')['base_path']}/print", presented_item("full-country").print_link end + test "presents country name" do + assert_equal schema_item("full-country")["details"]["country"]["name"], presented_item("full-country").country_name + end + + test "#ireland?" do + example = schema_item("full-country") + example["details"]["country"]["name"] = "Ireland" + + assert_equal true, presented_item("full-country", nil, example).ireland? + end + test "presents only next navigation when on the summary" do example = schema_item("full-country") parts = example["details"]["parts"]