Skip to content

Commit

Permalink
Merge pull request #2337 from alphagov/undo-temp-workaround-for-metad…
Browse files Browse the repository at this point in the history
…ata-link

Undo temporary workaround in pull request #2330
  • Loading branch information
danacotoran authored Feb 1, 2022
2 parents 581f785 + 6e46f36 commit 8c43507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/views/components/_published-dates.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom]
%>
<% if published || last_updated %>
<div id="full-publication-update-history"><div class="<%= classes.join(' ') %>" <% if history.any? %>id="history" data-module="gem-toggle"<% end %> lang="en">
<div class="<%= classes.join(' ') %>" <% if history.any? %>id="full-publication-update-history" data-module="gem-toggle"<% end %> lang="en">
<% if published %>
<%= t('components.published_dates.published', date: published) %>
<% end %>
Expand All @@ -36,5 +36,5 @@
</div>
<% end %>
<% end %>
</div></div>
</div>
<% end %>
4 changes: 2 additions & 2 deletions test/components/published_dates_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c43507

Please sign in to comment.