Skip to content

Commit 2e0e4cd

Browse files
committed
Add new feedback link component to footer
Renders the feedback link component that we're testing on all pages.
1 parent 9c61883 commit 2e0e4cd

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

app/views/layouts/application.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<% content_for :footer do %>
2424
<% meta_items = {t("footer.accessibility_statement") => accessibility_statement_url, t("footer.cookies") => cookies_url, t("footer.privacy") => privacy_url, t("footer.terms_of_use") => terms_of_use_url, t("footer.sitemap") => sitemap_url} %>
2525

26+
<%= render FeedbackLinkComponent::View.new(feedback_url: t("feedback_link.feedback_survey_url")) %>
27+
2628
<%= govuk_footer meta_items_title: t("footer.helpful_links"), meta_items: do |footer| %>
2729
<%= footer.with_meta_html do %>
2830
<div class="govuk-footer__meta-custom">

spec/requests/web_controller_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@
228228
get root_path
229229
end
230230

231+
it "contains the feedback link component" do
232+
expect(response.body).to include("Help us improve this service")
233+
expect(response.body).to include("<a href=\"#{I18n.t('feedback_link.feedback_survey_url')}\" class=\"govuk-link\">giving us your feedback</a>")
234+
end
235+
231236
it "contains links related to the service" do
232237
expect(response.body).to include('<a class="govuk-footer__link" href="https://www.forms.service.gov.uk/accessibility">Accessibility statement</a>')
233238
expect(response.body).to include('<a class="govuk-footer__link" href="https://www.forms.service.gov.uk/cookies">Cookies</a>')

0 commit comments

Comments
 (0)