diff --git a/Gemfile b/Gemfile
index a45ae9588..4c6f8fb72 100644
--- a/Gemfile
+++ b/Gemfile
@@ -17,8 +17,8 @@ gem 'gds-api-adapters', '~> 52.2'
gem 'govuk_ab_testing', '~> 2.4'
gem 'govuk_app_config', '~> 1.3'
gem 'govuk_frontend_toolkit', '~> 7.4'
-gem 'govuk_navigation_helpers', '~> 9.2'
-gem 'govuk_publishing_components', '~> 5.5'
+gem 'govuk_navigation_helpers', '~> 9.2.1'
+gem 'govuk_publishing_components', '~> 5.7.0'
gem 'plek', '~> 2.1'
gem 'slimmer', '~> 12.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 29f996300..24188cbda 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -365,8 +365,8 @@ DEPENDENCIES
govuk_ab_testing (~> 2.4)
govuk_app_config (~> 1.3)
govuk_frontend_toolkit (~> 7.4)
- govuk_navigation_helpers (~> 9.2)
- govuk_publishing_components (~> 5.5)
+ govuk_navigation_helpers (~> 9.2.1)
+ govuk_publishing_components (~> 5.7.0)
govuk_schemas (~> 3.1)
htmlentities (~> 4.3)
jasmine-rails
diff --git a/app/assets/stylesheets/components/_publication-header.scss b/app/assets/stylesheets/components/_publication-header.scss
deleted file mode 100644
index e7c9c53ec..000000000
--- a/app/assets/stylesheets/components/_publication-header.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-.app-c-publication-header {
- @include core-19;
- color: $white;
- background: $govuk-blue;
- padding: ($gutter / 2) $gutter $gutter;
- margin-bottom: $gutter * 2;
-}
-
-.app-c-publication-header__last-changed {
- margin-top: $gutter / 2;
-}
diff --git a/app/assets/stylesheets/views/_html-publication.scss b/app/assets/stylesheets/views/_html-publication.scss
index 9f6fda104..9eeec0659 100644
--- a/app/assets/stylesheets/views/_html-publication.scss
+++ b/app/assets/stylesheets/views/_html-publication.scss
@@ -28,6 +28,11 @@
}
}
+ .publication-header__last-changed {
+ @include core-19;
+ margin-top: $gutter-half;
+ }
+
.column-quarter-desktop-only {
@include grid-column( 1 / 4, $full-width: desktop );
diff --git a/app/views/components/_publication-header.html.erb b/app/views/components/_publication-header.html.erb
deleted file mode 100644
index 05d8bb148..000000000
--- a/app/views/components/_publication-header.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
- <%= last_changed %>
<%= @content_item.last_changed %>
+<% end %> <%= render 'components/notice', @content_item.withdrawal_notice_component %> diff --git a/test/components/publication_header_test.rb b/test/components/publication_header_test.rb deleted file mode 100644 index bf665e4cb..000000000 --- a/test/components/publication_header_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'component_test_helper' - -class PublicationHeaderTest < ComponentTestCase - def component_name - "publication-header" - end - - test "fails to render a publication-header when no properties are supplied" do - assert_raise do - render_component({}) - end - end -end - -# This component renders some content using the static title component, which cannot currently be tested using the approach above. -# To cover this gap, below is an integration test that loads the publication header page in the component guide in order to test -# that the remaining aspects of the component are being rendered correctly. - -class PublicationHeaderTitleTest < ActionDispatch::IntegrationTest - test "renders a publication header" do - visit '/component-guide/publication-header/default' - - within '.component-guide-preview' do - assert page.has_selector?(".app-c-publication-header") - end - end - - test "renders a publication header with a title" do - visit '/component-guide/publication-header/default' - - within '.component-guide-preview' do - assert_has_component_title("Budget 2016") - end - end - - test "renders a publication header with last changed date" do - visit '/component-guide/publication-header/default' - - within '.component-guide-preview' do - assert page.has_selector?(".app-c-publication-header__last-changed", text: "Updated 16 March 2016") - end - end -end diff --git a/test/integration/html_publication_test.rb b/test/integration/html_publication_test.rb index 5800eb9d3..072a600d8 100644 --- a/test/integration/html_publication_test.rb +++ b/test/integration/html_publication_test.rb @@ -8,7 +8,7 @@ class HtmlPublicationTest < ActionDispatch::IntegrationTest test "html publications" do setup_and_visit_content_item('published') - within ".app-c-publication-header" do + within ".gem-c-inverse-header" do assert page.has_text?(@content_item["details"]["format_sub_type"]) assert page.has_text?(@content_item["title"]) @@ -67,7 +67,7 @@ class HtmlPublicationTest < ActionDispatch::IntegrationTest test "no contents are shown when headings are an empty list" do setup_and_visit_content_item("prime_ministers_office") - within ".app-c-publication-header" do + within ".gem-c-inverse-header" do refute page.has_text?("Contents") end end