Skip to content

Commit

Permalink
add page title to Content Block Manager home page
Browse files Browse the repository at this point in the history
This sets the beginning of the page title - the
second half, the ` - GOV.UK Content Block Manager`
is set by the shared layout publishing component
[1] so it can't be changed.

Although the page title is Content Block Manager
I've gone with Search as the title, because that
is the main action taken on this page, and it
would be strange to have Content Block Manager
repeated twice.

[1]https://github.com/alphagov/govuk_publishing_components/blob/main/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb
  • Loading branch information
Harriethw committed Jan 9, 2025
1 parent 65d4b0d commit 322d9f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

<% content_for :title_margin_bottom, 6 %>

<% content_for :page_title, "Search" %>

<% if @error_summary_errors %>
<%= render "govuk_publishing_components/components/error_summary", {
title: "There is a problem",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Feature: Content block manager
Scenario: Correct layout is used
Given I am a GDS admin
When I visit the Content Block Manager home page
Then I should see the object store's home page title
Then I should see the object store's title in the header
And I should see the object store's navigation
And I should see the object store's phase banner
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@ def click_save_and_continue
expect(page).to have_selector(".govuk-header__product-name", text: "Content Block Manager")
end

Then(/^I should see the object store's home page title$/) do
expect(page).to have_title "Search - GOV.UK Content Block Manager"
end

And(/^I should see the object store's navigation$/) do
expect(page).to have_selector("a.govuk-header__link[href='#{content_block_manager.content_block_manager_root_path}']", text: "Dashboard")
end
Expand Down

0 comments on commit 322d9f0

Please sign in to comment.