Skip to content

Commit 6e46f36

Browse files
committed
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: alphagov/govuk_publishing_components#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.
1 parent f4fa178 commit 6e46f36

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/views/components/_published-dates.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom]
1111
%>
1212
<% if published || last_updated %>
13-
<div id="full-publication-update-history"><div class="<%= classes.join(' ') %>" <% if history.any? %>id="history" data-module="gem-toggle"<% end %> lang="en">
13+
<div class="<%= classes.join(' ') %>" <% if history.any? %>id="full-publication-update-history" data-module="gem-toggle"<% end %> lang="en">
1414
<% if published %>
1515
<%= t('components.published_dates.published', date: published) %>
1616
<% end %>
@@ -36,5 +36,5 @@
3636
</div>
3737
<% end %>
3838
<% end %>
39-
</div></div>
39+
</div>
4040
<% end %>

test/components/published_dates_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ def component_name
4848

4949
test "only adds history id when passed page history" do
5050
render_component(published: "1st November 2000")
51-
assert_select "#history", false, "should only render history id if passed history item"
51+
assert_select "#full-publication-update-history", false, "should only render history id if passed history item"
5252

5353
render_component(
5454
published: "1st November 2000",
5555
last_updated: "15th July 2015",
5656
history: [display_time: "23 August 2013", note: "Updated with new data"],
5757
)
58-
assert_select "#history"
58+
assert_select "#full-publication-update-history"
5959
end
6060

6161
test "full page history is hidden on page load" do

0 commit comments

Comments
 (0)