Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo temporary workaround in pull request #2330 #2337

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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