Skip to content

Commit

Permalink
Assume reshuffle message is already HTML
Browse files Browse the repository at this point in the history
Previously, collections was trying to render the govspeak from the
reshuffle message.

I have updated whitehall to convert govspeak to HTML before storing the
reshuffle message in the content item, and updated the example in
publishing-api.
  • Loading branch information
CristinaRO committed May 24, 2023
1 parent 97eec87 commit fa8e342
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/ministers/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<% if @presented_ministers.is_during_reshuffle? %>
<%= render "govuk_publishing_components/components/notice", {
description_govspeak: sanitize(@presented_ministers.reshuffle_messaging),
description: sanitize(@presented_ministers.reshuffle_messaging),
} %>
<% else %>

Expand Down
3 changes: 2 additions & 1 deletion spec/features/ministers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@

scenario "renders the reshuffle messaging instead of the usual contents" do
within(".gem-c-notice") do
expect(page).to have_text("Reshuffle in progress")
expect(page).to have_text("Check latest appointments")
expect(page).to have_link("latest appointments", href: "/government/news/ministerial-appointments-february-2023", class: "govuk-link")
end
expect(page).not_to have_selector(".gem-c-lead-paragraph")
expect(page).not_to have_selector(".gem-c-heading", text: I18n.t("ministers.cabinet"))
Expand Down

0 comments on commit fa8e342

Please sign in to comment.