Skip to content

Commit

Permalink
Add flash success banner to document collection pages
Browse files Browse the repository at this point in the history
This was missing from #2535
  • Loading branch information
hannako committed Nov 12, 2024
1 parent b68ab42 commit a2b5c0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/views/content_items/document_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
schema: :article
) %>
<% end %>

<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %>

<%= render 'shared/intervention_banner' %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/content_items_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class ContentItemsControllerTest < ActionController::TestCase
assert response.headers["Vary"].include?("GOVUK-Account-Session-Flash")
end

%w[publication consultation detailed_guide call_for_evidence].each do |schema_name|
%w[publication consultation detailed_guide call_for_evidence document_collection].each do |schema_name|
test "#{schema_name} displays the subscription success banner when the 'email-subscription-success' flash is present" do
example_name = %w[consultation call_for_evidence].include?(schema_name) ? "open_#{schema_name}" : schema_name
content_item = content_store_has_schema_example(schema_name, example_name)
Expand Down

0 comments on commit a2b5c0c

Please sign in to comment.