diff --git a/app/controllers/content_items_controller.rb b/app/controllers/content_items_controller.rb index 42c6963e5..bacd7024d 100644 --- a/app/controllers/content_items_controller.rb +++ b/app/controllers/content_items_controller.rb @@ -137,7 +137,7 @@ def render_template end # use these and `@content_item.base_path` in the template - @notification_button_visible = @content_item.has_single_page_notifications? && !@content_item.brexit_child_taxon + @notification_button_visible = @content_item.has_single_page_notifications? @include_single_page_notification_button_js = account_session_header.present? request.variant = :print if params[:variant] == "print" diff --git a/app/lib/body_parser.rb b/app/lib/body_parser.rb deleted file mode 100644 index 7fcc56c5a..000000000 --- a/app/lib/body_parser.rb +++ /dev/null @@ -1,76 +0,0 @@ -class BodyParser - def initialize(body) - @body = body - end - - def title_and_link_sections - if raw_title_and_link_sections.any? - raw_title_and_link_sections.map do |section| - s = parse(section) - { - title: parsed_title(s), - links: parsed_links(s), - } - end - end - end - -private - - attr_reader :body - - def parse(html) - Nokogiri::HTML.parse(html) - rescue Nokogiri::XML::SyntaxError - "" - end - - def parsed_body - @parsed_body ||= parse(body) - end - - def raw_body_content - if parsed_body.present? - parsed_body.search("div.govspeak").children - end - end - - def raw_title_and_link_sections - if raw_body_content.any? - raw_body_content.to_s.split(/(?=

{ - nav_link: { - text: I18n.t("brexit.citizen_link.text"), - path: I18n.t("brexit.citizen_link.path"), - track_label: "Guidance nav link", - track_category: "brexit-business-page", - }, - sections: { - track_category: "Child taxon section links - business", - }, - }, - BREXIT_CITIZEN_PAGE_CONTENT_ID => { - nav_link: { - text: I18n.t("brexit.business_link.text"), - path: I18n.t("brexit.business_link.path"), - track_label: "Guidance nav link", - track_category: "brexit-citizen-page", - }, - sections: { - track_category: "Child taxon section links - citizen", - }, - }, - } - end - - def brexit_child_taxon - brexit_child_taxons[content_item["content_id"]] - end - end -end diff --git a/app/presenters/content_item_presenter.rb b/app/presenters/content_item_presenter.rb index c4e7e3396..741e9438c 100644 --- a/app/presenters/content_item_presenter.rb +++ b/app/presenters/content_item_presenter.rb @@ -1,6 +1,5 @@ class ContentItemPresenter include ContentItem::Withdrawable - include ContentItem::BrexitTaxons include ContentItem::SinglePageNotificationButton attr_reader :content_item, :requested_path, diff --git a/app/views/content_items/detailed_guide.html.erb b/app/views/content_items/detailed_guide.html.erb index dc52bde90..c5a0d5821 100644 --- a/app/views/content_items/detailed_guide.html.erb +++ b/app/views/content_items/detailed_guide.html.erb @@ -14,8 +14,6 @@ "/guidance/ecmt-international-road-haulage-permits", ] scroll_track_percent_paths = [ - "/guidance/brexit-guidance-for-businesses", - "/guidance/brexit-guidance-for-individuals-and-families", "/guidance/import-and-export-goods-using-preference-agreements", "/guidance/financial-evidence-for-sponsored-or-endorsed-work-routes", ] @@ -61,35 +59,15 @@
- <% brexit_child_taxon = @content_item.brexit_child_taxon %> - <% title_and_context = brexit_child_taxon ? { title: @content_item.title } : @content_item.title_and_context %> - <%= render 'govuk_publishing_components/components/title', title_and_context %> + <%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %>
<%= render 'shared/translations' %>
- <% if brexit_child_taxon %> -
-

- <%= I18n.t("brexit.heading_prefix") %> - <%= link_to( - brexit_child_taxon[:nav_link][:text], - brexit_child_taxon[:nav_link][:path], - class: "govuk-link", - data: { - track_action: brexit_child_taxon[:nav_link][:path], - track_category: brexit_child_taxon[:nav_link][:track_category], - track_label: brexit_child_taxon[:nav_link][:track_label], - module: 'gem-track-click', - }) %>. -

-
- <% else %> - <%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %> - <% end %> + <%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
-<%= render 'shared/publisher_metadata_with_logo' unless brexit_child_taxon %> +<%= render 'shared/publisher_metadata_with_logo' %> <%= render 'shared/history_notice', content_item: @content_item %> <%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %> @@ -115,18 +93,14 @@ section: 'Contents', }, }, - } unless brexit_child_taxon %> + } %> - <% if brexit_child_taxon %> - <%= render partial: 'content_items/detailed_guide/brexit_sections', locals: { brexit_child_taxon: brexit_child_taxon } %> - <% else %> - <%= render 'govuk_publishing_components/components/govspeak', {} do %> - <%= raw(@content_item.govspeak_body[:content]) %> - <% end %> + <%= render 'govuk_publishing_components/components/govspeak', {} do %> + <%= raw(@content_item.govspeak_body[:content]) %> <% end %>
- <%= render 'shared/published_dates_with_notification_button', { brexit_child_taxon: brexit_child_taxon } %> + <%= render 'shared/published_dates_with_notification_button' %>
<% end %> <%= render "govuk_publishing_components/components/print_link", { @@ -142,7 +116,7 @@ section: 'Footer', }, }, - } unless brexit_child_taxon %> + } %> <%= render 'shared/sidebar_navigation' %> diff --git a/app/views/content_items/detailed_guide/_brexit_sections.html.erb b/app/views/content_items/detailed_guide/_brexit_sections.html.erb deleted file mode 100644 index 576b25d33..000000000 --- a/app/views/content_items/detailed_guide/_brexit_sections.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<% @content_item.title_and_link_sections.each do |section| %> - <% if section[:title][:text].present? %> - <%= render "govuk_publishing_components/components/heading", { - text: section[:title][:text], - heading_level: 2, - font_size: "m", - margin_bottom: 6, - id: section[:title][:id], - } %> - <% end %> - <% if section[:links].present? %> - <% links = section[:links].map do |link| - link_to(link[:text], link[:path], class: "govuk-link", data: { - track_action: link[:path], - track_category: brexit_child_taxon[:sections][:track_category], - track_label: section[:title][:text] || "", - module: 'gem-track-click', - }) - end - %> - <%= render "govuk_publishing_components/components/list", { - items: links, - visible_counters: true, - } %> - <% end %> -<% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8365fdb16..95ed603b6 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -38,9 +38,6 @@ <% unless @do_not_show_breadcrumbs %> <% if @content_item.try(:back_link) %> <%= render 'govuk_publishing_components/components/back_link', href: @content_item.back_link %> - <% elsif @content_item.brexit_child_taxon %> - <%= render 'govuk_publishing_components/components/breadcrumbs', - breadcrumbs: [ { url: "/", title: "Home" } , { url: "/brexit", title: "Brexit" } ] %> <% else %> <%= render 'govuk_publishing_components/components/contextual_breadcrumbs', content_item: @content_item.parsed_content_item %> <% end %> diff --git a/app/views/shared/_published_dates_with_notification_button.html.erb b/app/views/shared/_published_dates_with_notification_button.html.erb index 44450ddcb..29572cf53 100644 --- a/app/views/shared/_published_dates_with_notification_button.html.erb +++ b/app/views/shared/_published_dates_with_notification_button.html.erb @@ -1,11 +1,9 @@ -<% brexit_child_taxon ||= nil %> - <%= render 'components/published-dates', { published: @content_item.published, last_updated: @content_item.updated, history: @content_item.history, margin_bottom: 3, - } unless brexit_child_taxon %> + } %> <%= render 'govuk_publishing_components/components/single_page_notification_button', { base_path: @content_item.base_path, js_enhancement: @include_single_page_notification_button_js, diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index b6957b97a..9a65bec26 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -6,3 +6,4 @@ ignore_unused: - 'content_item.schema_name.*.{one,other,zero,few,many,two}' - 'corporate_information_page.*' - 'travel_advice.alert_status.*' + - 'publication.documents.other' diff --git a/config/locales/ar.yml b/config/locales/ar.yml index c32165fc0..4c2adca9a 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1,13 +1,5 @@ --- ar: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: توجيهات للمشروعات بخصوص برِيكْسِت - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: توجيهات للأفراد والعائلات بخصوص برِيكْسِت - heading_prefix: هناك نسخة مختلفة من common: visit: 'تفضّل بزيارة:' components: diff --git a/config/locales/az.yml b/config/locales/az.yml index fffac1556..a5c2287d5 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -1,13 +1,5 @@ --- az: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Bizneslər üçün Brexit ilə bağlı göstərişlər - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Fərdlər və ailələr üçün Brexit ilə bağlı göstərişlər - heading_prefix: Fərqliliklər mövcuddur common: visit: 'Baş çəkin:' components: diff --git a/config/locales/be.yml b/config/locales/be.yml index ab2ded3ff..153ffcf28 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -1,13 +1,5 @@ --- be: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Кіраўніцтва па Брэкзiт для прадпрыемстваў - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Кіраўніцтва па Брэкзiт для асобных асоб і сем'яў - heading_prefix: Ёсць розныя common: visit: 'Наведайце:' components: diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 2453b8213..ad9392f6c 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1,13 +1,5 @@ --- bg: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Брекзит насока за предприятията - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Брекзит насока за лица и семейства - heading_prefix: Има различен common: visit: 'Посетете:' components: diff --git a/config/locales/bn.yml b/config/locales/bn.yml index 9737c990c..aff92d0d4 100644 --- a/config/locales/bn.yml +++ b/config/locales/bn.yml @@ -1,13 +1,5 @@ --- bn: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: ব্যবসার জন্য ব্রেক্সিটের নির্দেশনা - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: ব্যক্তি ও পরিবারবর্গের জন্য ব্রেক্সিটের নির্দেশনা - heading_prefix: পার্থক্য আছে common: visit: 'ভিজিট করুন:' components: diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 841bab67e..fe389725c 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1,13 +1,5 @@ --- cs: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Pokyny pro podniky k brexitu - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Pokyny k brexitu pro jednotlivce a rodiny - heading_prefix: Existují různé common: visit: 'Navštivte:' components: diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 7d6758cb4..7b4485590 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -1,13 +1,5 @@ --- cy: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Canllawiau Brexit i fusnesau - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Canllawiau Brexit i unigolion a theuluoedd - heading_prefix: Dyna wahaniaeth common: visit: 'Ymweld:' components: diff --git a/config/locales/da.yml b/config/locales/da.yml index 3ba7234b3..4dc2ce1f5 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1,13 +1,5 @@ --- da: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit-vejledning for virksomheder - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit-vejledning for enkeltpersoner og familier - heading_prefix: Der er forskellige common: visit: 'Besøge:' components: diff --git a/config/locales/de.yml b/config/locales/de.yml index b9a8ee209..33b271b9d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1,13 +1,5 @@ --- de: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit-Leitfaden für Unternehmen - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit-Leitfaden für Einzelpersonen und Familien - heading_prefix: Es gibt verschiedene common: visit: 'Besuchen Sie:' components: diff --git a/config/locales/dr.yml b/config/locales/dr.yml index 81a82eaac..c778dcc0a 100644 --- a/config/locales/dr.yml +++ b/config/locales/dr.yml @@ -1,13 +1,5 @@ --- dr: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: راهنمایی برکست برای کسب و کار - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: راهنمایی برکست برای افراد و فامیل ها - heading_prefix: تفاوت وجود دارد common: visit: 'بازدید:' components: diff --git a/config/locales/el.yml b/config/locales/el.yml index 8ac2d4ec6..de6edb93e 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1,13 +1,5 @@ --- el: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Οδηγίες Brexit για τις επιχειρήσεις - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Οδηγίες Brexit για άτομα και οικογένειες - heading_prefix: Υπάρχουν διαφορετικά common: visit: 'Επίσκεψη:' components: diff --git a/config/locales/en.yml b/config/locales/en.yml index 4cdc7afa6..730f4e7fd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,13 +1,5 @@ --- en: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit guidance for businesses - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit guidance for individuals and families - heading_prefix: There’s different common: visit: 'Visit:' components: diff --git a/config/locales/es-419.yml b/config/locales/es-419.yml index dd6eccc7b..ea146b2b5 100644 --- a/config/locales/es-419.yml +++ b/config/locales/es-419.yml @@ -1,13 +1,5 @@ --- es-419: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Orientación sobre el Brexit para las empresas - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Orientación sobre el Brexit para familias y particulares - heading_prefix: Hay distintos common: visit: 'Visite:' components: @@ -27,7 +19,7 @@ es-419: share_links: share_this_page: Compartir esta página consultation: - and: y + and: "y" another_website_html: Esta consulta %{closed} realizada en otro sitio web at: en closes: Se cierra a diff --git a/config/locales/es.yml b/config/locales/es.yml index e18c2ff25..2300f2f11 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1,13 +1,5 @@ --- es: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Orientación del Brexit para las empresas - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Guía del Brexit para personas y familias - heading_prefix: Algo diferente common: visit: 'Visite:' components: @@ -27,7 +19,7 @@ es: share_links: share_this_page: Compartir esta página consultation: - and: y + and: "y" another_website_html: Esta consulta %{closed} se realizó en otro sitio web at: en closes: Cierra a las diff --git a/config/locales/et.yml b/config/locales/et.yml index 4b91a142c..ec7ac5683 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1,13 +1,5 @@ --- et: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexiti juhised ettevõtetele - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexiti juhised üksikisikutele ja peredele - heading_prefix: On erinev common: visit: 'Külastus:' components: diff --git a/config/locales/fa.yml b/config/locales/fa.yml index d875cefe0..4bc497731 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1,13 +1,5 @@ --- fa: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: راهنمای برگزیت برای کسب‌و‌کارها - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: راهنمای برگزیت برای کسب‌و‌کارها و خانواده‌ها - heading_prefix: مختلف وجود دارد common: visit: 'بازدید کنید:' components: diff --git a/config/locales/fi.yml b/config/locales/fi.yml index e3ef7ee72..61858d0c3 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1,13 +1,5 @@ --- fi: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit -opas yrityksille - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit -opastus yksilöille ja perheille - heading_prefix: On erilaisia common: visit: 'Vierailla:' components: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 5bc08e639..64144c78b 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1,13 +1,5 @@ --- fr: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Orientations sur le Brexit pour les entreprises - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Orientations sur le Brexit pour les individus et les familles - heading_prefix: Il y a différent common: visit: 'Visiter:' components: diff --git a/config/locales/gd.yml b/config/locales/gd.yml index cc1924350..ac902ec28 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -1,13 +1,5 @@ --- gd: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Moltaí Brexit do ghnólachtaí - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Moltaí Brexit do dhaoine aonair agus do theaghlaigh - heading_prefix: Tá difríochtaí ann common: visit: 'Cuairt:' components: diff --git a/config/locales/gu.yml b/config/locales/gu.yml index cfd60a0b0..d400c2172 100644 --- a/config/locales/gu.yml +++ b/config/locales/gu.yml @@ -1,13 +1,5 @@ --- gu: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: વ્યવસાયો માટે બ્રેક્ઝિટ માર્ગદર્શન - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: વ્યક્તિઓ અને પરિવારો માટે બ્રેક્ઝિટ માર્ગદર્શન - heading_prefix: અલગ common: visit: 'મુલાકાત લો:' components: diff --git a/config/locales/he.yml b/config/locales/he.yml index 664f3c9e0..dba2e7d43 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1,13 +1,5 @@ --- he: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: הדרכה ברקזיט לעסקים - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: 'הדרכת ברקזיט לאנשים ומשפחות ' - heading_prefix: 'יש הבדל ' common: visit: 'בקר:' components: diff --git a/config/locales/hi.yml b/config/locales/hi.yml index e65edd502..eef2d1e01 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -1,13 +1,5 @@ --- hi: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: व्यवसायों के लिए ब्रेक्सिट मार्गदर्शन - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: लोगों और परिवारों के लिए ब्रेक्सिट मार्गदर्शन - heading_prefix: इसमें अंतर है common: visit: 'इस पर जाएं:' components: diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 6a11aa578..f7cf23110 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1,13 +1,5 @@ --- hr: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Upute za Brexit za tvrtke - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Upute za Brexit za pojedince i obitelji - heading_prefix: Ima različitih common: visit: 'Posjetite:' components: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index a7c51c111..c639f9d8d 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1,13 +1,5 @@ --- hu: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit-útmutató vállalkozások részére - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit-útmutató egyének és családok részére - heading_prefix: Van különbség common: visit: 'Látogassa meg:' components: diff --git a/config/locales/hy.yml b/config/locales/hy.yml index fb9892576..2244f2c5c 100644 --- a/config/locales/hy.yml +++ b/config/locales/hy.yml @@ -1,13 +1,5 @@ --- hy: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit-ի ուղեցույց բիզնեսների համար - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit-ի ուղեցույց անհատների և ընտանիքների համար - heading_prefix: Կա տարբեր common: visit: Այցելել՝ components: diff --git a/config/locales/id.yml b/config/locales/id.yml index c0536359d..fa7604030 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1,13 +1,5 @@ --- id: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Panduan Brexit untuk bisnis - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Panduan Brexit untuk individu dan keluarga - heading_prefix: Ada perbedaan common: visit: 'Kunjungan:' components: diff --git a/config/locales/is.yml b/config/locales/is.yml index ff788d01f..cabc5d6dd 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -1,13 +1,5 @@ --- is: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit leiðbeiningar fyrir fyrirtæki - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit leiðbeiningar fyrir einstaklinga og fjölskyldur - heading_prefix: Það eru mismunandi common: visit: 'Heimsæktu:' components: diff --git a/config/locales/it.yml b/config/locales/it.yml index 94778986c..63373a216 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1,13 +1,5 @@ --- it: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Guida alla brexit per le imprese - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Guida alla brexit per persone e famiglie - heading_prefix: C’è dell’altro common: visit: 'Visita:' components: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index d8821968f..37f68c6fa 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1,13 +1,5 @@ --- ja: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: 企業向けBrexitガイダンス - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: 個人および家族向けBrexitガイダンス - heading_prefix: 違いがあります common: visit: 訪問: components: diff --git a/config/locales/ka.yml b/config/locales/ka.yml index 4496933ad..7c0476a46 100644 --- a/config/locales/ka.yml +++ b/config/locales/ka.yml @@ -1,13 +1,5 @@ --- ka: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: ბრექსიტის სახელმძღვანელო ბიზნესებისთვის - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: ბრექსიტის სახელმძღვანელო ინდივიდუალებისთვის და ოჯახებისთვის - heading_prefix: არსებობს სხვადასხვა common: visit: 'ეწვიეთ:' components: diff --git a/config/locales/kk.yml b/config/locales/kk.yml index 2837113ea..a4160c782 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -1,13 +1,5 @@ --- kk: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Компанияларға арналған Brexit нұсқаулығы - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Жеке тұлғалар мен отбасыларға арналған Brexit нұсқаулығы - heading_prefix: Әртүрлісі бар common: visit: 'Мұнда өтіңіз:' components: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index a5442ae1b..630368817 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1,13 +1,5 @@ --- ko: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: 비즈니스에 대한 브렉시트 지침 - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: 개인 및 가족에 대한 브렉시트 지침 - heading_prefix: 차이가 있습니다 common: visit: '방문:' components: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index fb61b2e39..64255bfbb 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1,13 +1,5 @@ --- lt: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: 'Informacija verslui apie „Brexitą“ ' - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: 'Informacija fiziniams asmenims ir šeimoms apie „Brexitą“ ' - heading_prefix: Yra kitokių common: visit: 'Apsilankykite:' components: diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 543f85d58..686b4a81e 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1,13 +1,5 @@ --- lv: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit vadlīnijas uzņēmumiem - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit vadlīnijas privātpersonām un ģimenēm - heading_prefix: Pastāv atšķirības common: visit: 'Apmeklējiet:' components: diff --git a/config/locales/ms.yml b/config/locales/ms.yml index eba0e06c8..d43b3cd7c 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -1,13 +1,5 @@ --- ms: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Panduan Brexit untuk perniagaan - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Panduan Brexit untuk individu dan keluarga - heading_prefix: Ada perbezaan common: visit: 'Lawati:' components: diff --git a/config/locales/mt.yml b/config/locales/mt.yml index 4df46c2b0..3c1b46c2c 100644 --- a/config/locales/mt.yml +++ b/config/locales/mt.yml @@ -1,13 +1,5 @@ --- mt: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Gwida għan-negozji dwar Brexit - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Gwida għal individwi u familji dwar Brexit - heading_prefix: Hawn differenti common: visit: 'Żur:' components: diff --git a/config/locales/ne.yml b/config/locales/ne.yml index 655708b0d..049d3b4fc 100644 --- a/config/locales/ne.yml +++ b/config/locales/ne.yml @@ -1,13 +1,5 @@ --- ne: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: व्यवसायको लागी ब्रेक्सिट मार्गदर्शन - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: व्यक्ति र परिवारहरूका लागी ब्रेक्सिट मार्गदर्शन - heading_prefix: त्यहाँ फरक छ common: visit: 'भ्रमण:' components: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index c0e02a376..7b5c57f5e 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1,13 +1,5 @@ --- nl: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit-leidraad voor bedrijven - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit-leidraad voor particulieren en gezinnen - heading_prefix: Er zijn verschillende common: visit: 'Bezoek:' components: diff --git a/config/locales/no.yml b/config/locales/no.yml index dd5ac7e74..4c36b69a4 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1,13 +1,5 @@ --- 'no': - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexit-veiledning for bedrifter - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexit-veiledning for enkeltpersoner og familier - heading_prefix: Det er annerledes common: visit: 'Besøk:' components: diff --git a/config/locales/pa-pk.yml b/config/locales/pa-pk.yml index d981e7ac5..eed956049 100644 --- a/config/locales/pa-pk.yml +++ b/config/locales/pa-pk.yml @@ -1,13 +1,5 @@ --- pa-pk: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: کاروباراں لئی Brexitواسطے رہنمائی - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: بندیاں تے خانداں لئیBrexit واسطے رہنمائی - heading_prefix: ایہ فرق اے common: visit: 'ویکھو:' components: diff --git a/config/locales/pa.yml b/config/locales/pa.yml index d2548120e..04cd2a565 100644 --- a/config/locales/pa.yml +++ b/config/locales/pa.yml @@ -1,13 +1,5 @@ --- pa: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: ਕਾਰੋਬਾਰਾਂ ਲਈ ਬ੍ਰੈਕਸਿਟ ਮਾਰਗਦਰਸ਼ਨ - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: ਵਿਅਕਤੀਆਂ ਅਤੇ ਪਰਿਵਾਰਾਂ ਲਈ ਬ੍ਰੈਕਸਿਟ ਮਾਰਗਦਰਸ਼ਨ - heading_prefix: ਵੱਖਰਾ ਹੈ common: visit: 'ਮੁਲਾਕਾਤ:' components: diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 2ab2b9b24..7567ad8f6 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1,13 +1,5 @@ --- pl: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Wskazówki dotyczące Brexitu dla przedsiębiorstw - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Wskazówki dotyczące Brexitu dla osób indywidualnych i rodzin - heading_prefix: Są różne common: visit: 'Odwiedź:' components: diff --git a/config/locales/ps.yml b/config/locales/ps.yml index baaaeac95..9e7d50fd7 100644 --- a/config/locales/ps.yml +++ b/config/locales/ps.yml @@ -1,13 +1,5 @@ --- ps: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: د سوداګرۍ لپاره د بریکسیت لارښود - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: د افرادو او کورنیو لپاره د بریکسیت لارښود - heading_prefix: توپیر لري common: visit: 'لیدنه:' components: diff --git a/config/locales/pt.yml b/config/locales/pt.yml index dd5dce080..1012e5972 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1,13 +1,5 @@ --- pt: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Guia Brexit para as empresas - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Orientação Brexit para pessoas e famílias - heading_prefix: Há diferentes common: visit: 'Visite:' components: diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 475698608..1ddd26a7d 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1,13 +1,5 @@ --- ro: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Îndrumări pentru companii privind Brexit - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Îndrumări pentru persoane și familii privind Brexit - heading_prefix: Diferit common: visit: 'Accesați:' components: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index d6232d65f..8f0c771c0 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1,13 +1,5 @@ --- ru: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Руководство Брексит для бизнеса - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Руководство Брексит для физических лиц и семей - heading_prefix: Здесь не так common: visit: 'Посетите:' components: diff --git a/config/locales/si.yml b/config/locales/si.yml index c1a96a89e..94ab30202 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -1,13 +1,5 @@ --- si: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: ව්යාපාර සඳහා බ්රෙක්සිට් මඟ පෙන්වීම - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: පුද්ගලයින් සහ පවුල් සඳහා බ්රෙක්සිට් මඟ පෙන්වීම - heading_prefix: වෙනසක් තිබේ common: visit: 'පිවිසෙන්න:' components: diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 6140e453c..0ecb76f2b 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1,13 +1,5 @@ --- sk: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Usmernenia pre podniky týkajúce sa brexitu - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Usmernenie k brexitu pre jednotlivcov a rodiny - heading_prefix: Existujú rôzne common: visit: 'Navštívte:' components: diff --git a/config/locales/sl.yml b/config/locales/sl.yml index a6761e59e..a480ca7f6 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1,13 +1,5 @@ --- sl: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Vodnik po brexitu za podjetja - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Vodnik po brexitu za posameznike in družine - heading_prefix: Drugače je common: visit: 'Obiščite:' components: diff --git a/config/locales/so.yml b/config/locales/so.yml index 5e025da79..61842c271 100644 --- a/config/locales/so.yml +++ b/config/locales/so.yml @@ -1,13 +1,5 @@ --- so: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Tilmaamaha Brexit ee ganacsiyada - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Tilmaamaha Brexit ee qoysaska iyo shaqsiyaadka - heading_prefix: Waxa jira kala duwanaansho common: visit: 'Booqo:' components: diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 251d46104..54fd540f7 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1,13 +1,5 @@ --- sq: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Udhëzime për Brexit për bizneset - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Udhëzime për Brexit për individët dhe familjet - heading_prefix: Ka të ndryshme common: visit: 'Vizitoni:' components: diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 789abbe61..98ec8354a 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1,13 +1,5 @@ --- sr: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Uputstva za Bregzit za preduzeća - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Uputstva za Bregzit za fizička lica i porodice - heading_prefix: Postoje razlike common: visit: 'Posetite:' components: diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 648910e2a..a807a9aec 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1,13 +1,5 @@ --- sv: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Brexitvägledning för företag - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Brexitvägledning för privatpersoner och familjer - heading_prefix: Det finns olika common: visit: 'Besök:' components: diff --git a/config/locales/sw.yml b/config/locales/sw.yml index 15539d233..bc541798a 100644 --- a/config/locales/sw.yml +++ b/config/locales/sw.yml @@ -1,13 +1,5 @@ --- sw: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Mwongozo wa Brexit kuhusu biashara - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Mwongozo wa Brexit kuhusu watu na familia - heading_prefix: Kuna utofauti common: visit: 'Tembelea:' components: diff --git a/config/locales/ta.yml b/config/locales/ta.yml index 29fe6027d..41d0b9762 100644 --- a/config/locales/ta.yml +++ b/config/locales/ta.yml @@ -1,13 +1,5 @@ --- ta: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: வணிகங்களுக்கான பிரெக்சிட் வழிகாட்டுதல் - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: தனிநபர்கள் மற்றும் குடும்பங்களுக்கான பிரெக்சிட் வழிகாட்டுதல் - heading_prefix: இதில் வித்தியாசம் உள்ளது common: visit: 'வருகை:' components: diff --git a/config/locales/th.yml b/config/locales/th.yml index be043e487..4012ca064 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1,13 +1,5 @@ --- th: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: คำแนะนำ Brexit สำหรับธุรกิจ - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: คำแนะนำ Brexit สำหรับบุคคลและครอบครัว - heading_prefix: มีความแตกต่างกัน common: visit: 'เยี่ยมชม:' components: diff --git a/config/locales/tk.yml b/config/locales/tk.yml index ae9864fc6..f54bc7353 100644 --- a/config/locales/tk.yml +++ b/config/locales/tk.yml @@ -1,13 +1,5 @@ --- tk: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Telekeçilik üçin Brexit görkezmesi - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Raýatlara we maşgalalara Brexit görkezmesi - heading_prefix: Tapawut bar common: visit: 'Serediň:' components: diff --git a/config/locales/tr.yml b/config/locales/tr.yml index d526bf9ab..7cb9c0b75 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1,13 +1,5 @@ --- tr: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: İşletmeler için Brexit rehberi - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Kişiler ve aileler için Brexit rehberi - heading_prefix: Farklılık var common: visit: 'Ziyaret et:' components: diff --git a/config/locales/uk.yml b/config/locales/uk.yml index fc6a94d26..d31a22739 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1,13 +1,5 @@ --- uk: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Поради щодо Brexit для бізнесу - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Поради щодо Brexit для окремих осіб та сімей - heading_prefix: Є різні common: visit: 'Відвідайте:' components: diff --git a/config/locales/ur.yml b/config/locales/ur.yml index 04017af4f..a90c8b74b 100644 --- a/config/locales/ur.yml +++ b/config/locales/ur.yml @@ -1,13 +1,5 @@ --- ur: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: بزنسز کے لیے Brexit کی رہنمائی - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: افراد اور اہل خانہ کے لیے Brexit کی رہنمائی - heading_prefix: یہاں فرق ہے common: visit: 'ملاحظہ کریں:' components: diff --git a/config/locales/uz.yml b/config/locales/uz.yml index 3fd6bcb10..1d8f52b35 100644 --- a/config/locales/uz.yml +++ b/config/locales/uz.yml @@ -1,13 +1,5 @@ --- uz: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Брексит шароитларида бизнес-доираларнинг вакиллари учун қўлланма - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Брексит шароитларида жисмоний ва юридик шахслар учун қўлланма - heading_prefix: Фарқ мавжуд common: visit: 'Ташриф буюринг:' components: diff --git a/config/locales/vi.yml b/config/locales/vi.yml index bcd3f25ba..a0abd4df7 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1,13 +1,5 @@ --- vi: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: Hướng dẫn Brexit cho các doanh nghiệp - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: Hướng dẫn Brexit cho các cá nhân và gia đình - heading_prefix: Có sự khác nhau common: visit: 'Truy cập:' components: diff --git a/config/locales/yi.yml b/config/locales/yi.yml index 793f8a4e9..d969da099 100644 --- a/config/locales/yi.yml +++ b/config/locales/yi.yml @@ -1,13 +1,5 @@ --- yi: - brexit: - business_link: - path: - text: - citizen_link: - path: - text: - heading_prefix: common: visit: components: diff --git a/config/locales/zh-hk.yml b/config/locales/zh-hk.yml index da3749f45..0abe9d643 100644 --- a/config/locales/zh-hk.yml +++ b/config/locales/zh-hk.yml @@ -1,13 +1,5 @@ --- zh-hk: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: 英國脫歐商業指引 - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: 英國脫歐個人及家庭指引 - heading_prefix: 與別不同 common: visit: 訪問: components: diff --git a/config/locales/zh-tw.yml b/config/locales/zh-tw.yml index c903dedad..aa8c616f1 100644 --- a/config/locales/zh-tw.yml +++ b/config/locales/zh-tw.yml @@ -1,13 +1,5 @@ --- zh-tw: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: 針對生意往來的英國脫歐指南 - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: 針對個人和家庭的英國脫歐指南 - heading_prefix: 不同之處 common: visit: 探訪: components: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 2d194f0e5..33b361828 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1,13 +1,5 @@ --- zh: - brexit: - business_link: - path: "/guidance/brexit-guidance-for-businesses" - text: 企业的英国脱欧指南 - citizen_link: - path: "/guidance/brexit-guidance-for-individuals-and-families" - text: 企业和家庭的英国脱欧指南 - heading_prefix: 区别 common: visit: 访问: components: diff --git a/test/integration/detailed_guide_test.rb b/test/integration/detailed_guide_test.rb index d1050319b..9f7cd7a37 100644 --- a/test/integration/detailed_guide_test.rb +++ b/test/integration/detailed_guide_test.rb @@ -87,46 +87,6 @@ class DetailedGuideTest < ActionDispatch::IntegrationTest assert_not_equal faq_schema["mainEntity"], [] end - test "renders brexit child taxon pages in special ways" do - setup_and_visit_brexit_child_taxon("business") - - # hides the print links - assert_not page.has_css?(".gem-c-print-link") - assert_not page.has_content?("Print this page") - - # hides published by metadata - assert_not page.has_css?(".gem-c-metadata") - - # renders description field as a custom link - assert_not page.has_text?(@content_item["description"]) - link_text = "Brexit guidance for individuals and families" - assert page.has_link?(link_text, href: ContentItem::BrexitTaxons::BREXIT_CITIZEN_PAGE_PATH) - - setup_and_visit_brexit_child_taxon("citizen") - - assert_not page.has_text?(@content_item["description"]) - link_text = "Brexit guidance for businesses" - assert page.has_link?(link_text, href: ContentItem::BrexitTaxons::BREXIT_BUSINESS_PAGE_PATH) - - # adds GA tracking to the li links - track_action = find_link("Foreign travel advice")["data-track-action"] - track_category = find_link("Foreign travel advice")["data-track-category"] - track_label = find_link("Foreign travel advice")["data-track-label"] - - assert_equal "/foreign-travel-advice", track_action - assert_equal "Child taxon section links - citizen", track_category - assert_equal "Travel to the EU", track_label - - # adds GA tracking to the description field links - track_action = find_link("Brexit guidance for businesses")["data-track-action"] - track_category = find_link("Brexit guidance for businesses")["data-track-category"] - track_label = find_link("Brexit guidance for businesses")["data-track-label"] - - assert_equal ContentItem::BrexitTaxons::BREXIT_BUSINESS_PAGE_PATH, track_action - assert_equal "brexit-citizen-page", track_category - assert_equal "Guidance nav link", track_label - end - test "renders with the single page notification button" do setup_and_visit_content_item("detailed_guide") assert page.has_css?(".gem-c-single-page-notification-button") diff --git a/test/test_helper.rb b/test/test_helper.rb index ffa1c2f85..78939fd40 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -183,16 +183,6 @@ def setup_and_visit_content_item_with_taxons(name, taxons) end end - def setup_and_visit_brexit_child_taxon(type = nil) - @content_item = get_content_example("detailed_guide").tap do |item| - item["content_id"] = type == "business" ? brexit_business_id : brexit_citizen_id - item["details"]["body"] = brexit_body_content - - stub_content_store_has_item(item["base_path"], item.to_json) - visit_with_cachebust((item["base_path"]).to_s) - end - end - def setup_and_visit_notification_exempt_page(name) @content_item = get_content_example(name).tap do |item| item["content_id"] = ContentItem::SinglePageNotificationButton::EXEMPTION_LIST[0] @@ -210,33 +200,6 @@ def setup_and_visit_a_page_with_specific_base_path(name, base_path, content_id = end end - def brexit_citizen_id - ContentItem::BrexitTaxons::BREXIT_CITIZEN_PAGE_CONTENT_ID - end - - def brexit_business_id - ContentItem::BrexitTaxons::BREXIT_BUSINESS_PAGE_CONTENT_ID - end - - def brexit_body_content - '
'\ - '

Travel to the EU

\n \n'\ - '\n'\ - '

Travel to the UK

\n \n'\ - '\n'\ - "
" - end - def setup_and_visit_random_content_item(document_type: nil) content_item = GovukSchemas::RandomExample.for_schema(frontend_schema: schema_type) do |payload| payload.merge!("document_type" => document_type) unless document_type.nil? diff --git a/test/unit/body_parser_test.rb b/test/unit/body_parser_test.rb deleted file mode 100644 index 0d0bc1e33..000000000 --- a/test/unit/body_parser_test.rb +++ /dev/null @@ -1,113 +0,0 @@ -require "test_helper" - -class BodyParserTest < ActiveSupport::TestCase - def html - '
'\ - '

Travel to the EU

\n \n'\ - '\n'\ - '

Travel to the UK

\n \n'\ - '\n'\ - "
" - end - - def html_missing_section_headings - '
'\ - '\n'\ - '\n'\ - "
" - end - - def subject - @subject ||= BodyParser.new(html) - end - - test "#title_and_link_sections" do - expected = [ - { - title: { - text: "Travel to the EU", - id: "travel-to-the-eu", - }, - links: [ - { - path: "/foreign-travel-advice", - text: "Foreign travel advice", - }, - { - path: "/visit-eu", - text: "Travelling to the EU", - }, - ], - }, - { - title: { - text: "Travel to the UK", - id: "travel-to-the-uk", - }, - links: [ - { - path: "/local-travel-advice", - text: "Local travel advice", - }, - { - path: "/visit-uk", - text: "Travelling to the UK", - }, - ], - }, - ] - - assert_equal expected, subject.title_and_link_sections - end - - test "when parsing html missing the section headings" do - subject = BodyParser.new(html_missing_section_headings) - expected = [ - { - title: { - text: "", - id: "", - }, - links: [ - { - path: "/foreign-travel-advice", - text: "Foreign travel advice", - }, - { - path: "/visit-eu", - text: "Travelling to the EU", - }, - { - path: "/local-travel-advice", - text: "Local travel advice", - }, - { - path: "/visit-uk", - text: "Travelling to the UK", - }, - ], - }, - ] - assert_equal expected, subject.title_and_link_sections - end -end