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

Add flash success banner to document collection pages #3417

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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
Loading