From 6e46f36a48f6795991faddf3849bdfdccdd8e0bb Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Mon, 17 Jan 2022 15:49:29 +0000 Subject: [PATCH] Undo temporary workaround in pull request #2330 PR #2330 added an additional div around published-dates to prevent this change in govuk_publishing_components being a breaking one: https://github.com/alphagov/govuk_publishing_components/pull/2558 This additional div is now safe to remove and the id of the wrapper for published-dates can be updated to the new one. --- app/views/components/_published-dates.html.erb | 4 ++-- test/components/published_dates_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/components/_published-dates.html.erb b/app/views/components/_published-dates.html.erb index a38f3f400..1940af78b 100644 --- a/app/views/components/_published-dates.html.erb +++ b/app/views/components/_published-dates.html.erb @@ -10,7 +10,7 @@ classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom] %> <% if published || last_updated %> -
id="history" data-module="gem-toggle"<% end %> lang="en"> +
id="full-publication-update-history" data-module="gem-toggle"<% end %> lang="en"> <% if published %> <%= t('components.published_dates.published', date: published) %> <% end %> @@ -36,5 +36,5 @@
<% end %> <% end %> -
+ <% end %> diff --git a/test/components/published_dates_test.rb b/test/components/published_dates_test.rb index 5727d0129..bd90f08a8 100644 --- a/test/components/published_dates_test.rb +++ b/test/components/published_dates_test.rb @@ -48,14 +48,14 @@ def component_name test "only adds history id when passed page history" do render_component(published: "1st November 2000") - assert_select "#history", false, "should only render history id if passed history item" + assert_select "#full-publication-update-history", false, "should only render history id if passed history item" render_component( published: "1st November 2000", last_updated: "15th July 2015", history: [display_time: "23 August 2013", note: "Updated with new data"], ) - assert_select "#history" + assert_select "#full-publication-update-history" end test "full page history is hidden on page load" do