- <%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, "Locations")) %>
+ <%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id)) %>
<%= govuk_inset_text(text: edit_scheme_text(@scheme, current_user)) %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 82fd950bc..3414cdd35 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,5 +1,16 @@
<% content_for :title, current_user == @user ? "Your account" : "#{@user.name.presence || @user.email}’s account" %>
+<% if current_user.support? %>
+ <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
+ "Users (#{@user.organisation.name})" => users_organisation_path(@user.organisation),
+ content_for(:title) => "",
+ }) %>
+<% else %>
+ <% content_for :before_content do %>
+ <%= govuk_back_link(href: users_path) %>
+ <% end %>
+<% end %>
+
diff --git a/spec/features/lettings_log_spec.rb b/spec/features/lettings_log_spec.rb
index 5790ed1f6..7dabd3efa 100644
--- a/spec/features/lettings_log_spec.rb
+++ b/spec/features/lettings_log_spec.rb
@@ -157,8 +157,8 @@ RSpec.describe "Lettings Log Features" do
it "has the correct breadcrumbs with the correct links" do
visit lettings_log_setup_check_answers_path(lettings_log)
breadcrumbs = page.find_all(".govuk-breadcrumbs__link")
- expect(breadcrumbs.first.text).to eq "Logs"
- expect(breadcrumbs.first[:href]).to eq lettings_logs_path
+ expect(breadcrumbs.first.text).to eq "Lettings logs (DLUHC)"
+ expect(breadcrumbs.first[:href]).to eq lettings_logs_organisation_path(lettings_log.owning_organisation)
expect(breadcrumbs[1].text).to eq "Log #{lettings_log.id}"
expect(breadcrumbs[1][:href]).to eq lettings_log_path(lettings_log)
end
@@ -170,8 +170,8 @@ RSpec.describe "Lettings Log Features" do
it "has the correct breadcrumbs with the correct links" do
visit review_lettings_log_path(lettings_log)
breadcrumbs = page.find_all(".govuk-breadcrumbs__link")
- expect(breadcrumbs.first.text).to eq "Logs"
- expect(breadcrumbs.first[:href]).to eq lettings_logs_path
+ expect(breadcrumbs.first.text).to eq "Lettings logs (DLUHC)"
+ expect(breadcrumbs.first[:href]).to eq lettings_logs_organisation_path(lettings_log.owning_organisation)
expect(breadcrumbs[1].text).to eq "Log #{lettings_log.id}"
expect(breadcrumbs[1][:href]).to eq lettings_log_path(lettings_log)
end
@@ -439,7 +439,7 @@ RSpec.describe "Lettings Log Features" do
before do
visit("/lettings-logs")
click_button("Create a new lettings log")
- click_link("Logs")
+ find("a.govuk-breadcrumbs__link", text: "Lettings logs").click
end
it "navigates you to the lettings logs page" do
diff --git a/spec/features/sales_log_spec.rb b/spec/features/sales_log_spec.rb
index 9e12082a7..bac9da761 100644
--- a/spec/features/sales_log_spec.rb
+++ b/spec/features/sales_log_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe "Sales Log Features" do
context "when returning to the list of logs via breadcrumbs link" do
before do
click_button("Create a new sales log")
- click_link("Logs")
+ find("a.govuk-breadcrumbs__link", text: "Sales logs").click
end
it "navigates you to the sales logs page" do
@@ -164,8 +164,8 @@ RSpec.describe "Sales Log Features" do
it "has the correct breadcrumbs with the correct links" do
visit sales_log_setup_check_answers_path(sales_log.id)
breadcrumbs = page.find_all(".govuk-breadcrumbs__link")
- expect(breadcrumbs.first.text).to eq "Logs"
- expect(breadcrumbs.first[:href]).to eq sales_logs_path
+ expect(breadcrumbs.first.text).to eq "Sales logs (DLUHC)"
+ expect(breadcrumbs.first[:href]).to eq sales_logs_organisation_path(sales_log.owning_organisation)
expect(breadcrumbs[1].text).to eq "Log #{sales_log.id}"
expect(breadcrumbs[1][:href]).to eq sales_log_path(sales_log.id)
end
@@ -175,8 +175,8 @@ RSpec.describe "Sales Log Features" do
it "has the correct breadcrumbs with the correct links" do
visit review_sales_log_path(sales_log.id, sales_log: true)
breadcrumbs = page.find_all(".govuk-breadcrumbs__link")
- expect(breadcrumbs.first.text).to eq "Logs"
- expect(breadcrumbs.first[:href]).to eq sales_logs_path
+ expect(breadcrumbs.first.text).to eq "Sales logs (DLUHC)"
+ expect(breadcrumbs.first[:href]).to eq sales_logs_organisation_path(sales_log.owning_organisation)
expect(breadcrumbs[1].text).to eq "Log #{sales_log.id}"
expect(breadcrumbs[1][:href]).to eq sales_log_path(sales_log.id)
end
diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb
index 6790f5cda..88c3099a0 100644
--- a/spec/features/schemes_spec.rb
+++ b/spec/features/schemes_spec.rb
@@ -173,6 +173,7 @@ RSpec.describe "Schemes scheme Features" do
context "when viewing individual scheme" do
let!(:schemes) { FactoryBot.create_list(:scheme, 5) }
+ let!(:same_organisation_schemes) { FactoryBot.create_list(:scheme, 5, owning_organisation: user.organisation) }
context "when I visit schemes page" do
before do
@@ -180,22 +181,22 @@ RSpec.describe "Schemes scheme Features" do
end
context "when I click to see individual scheme" do
- let(:scheme) { schemes.first }
+ let(:scheme) { same_organisation_schemes.first }
before do
click_link(scheme.service_name)
end
it "shows me details about the selected scheme" do
- expect(page).to have_content(schemes.first.id_to_display)
- expect(page).to have_content(schemes.first.service_name)
- expect(page).to have_content(schemes.first.sensitive)
- expect(page).to have_content(schemes.first.scheme_type)
- expect(page).to have_content(schemes.first.registered_under_care_act)
- expect(page).to have_content(schemes.first.primary_client_group)
- expect(page).to have_content(schemes.first.secondary_client_group)
- expect(page).to have_content(schemes.first.support_type)
- expect(page).to have_content(schemes.first.intended_stay)
+ expect(page).to have_content(scheme.id_to_display)
+ expect(page).to have_content(scheme.service_name)
+ expect(page).to have_content(scheme.sensitive)
+ expect(page).to have_content(scheme.scheme_type)
+ expect(page).to have_content(scheme.registered_under_care_act)
+ expect(page).to have_content(scheme.primary_client_group)
+ expect(page).to have_content(scheme.secondary_client_group)
+ expect(page).to have_content(scheme.support_type)
+ expect(page).to have_content(scheme.intended_stay)
end
context "when I click to go back" do
@@ -204,9 +205,9 @@ RSpec.describe "Schemes scheme Features" do
click_link(scheme.service_name)
end
- it "shows list of links to schemes" do
- click_on("Back")
- schemes.each do |scheme|
+ it "shows list of links to the organisation's schemes" do
+ click_on("Schemes (DLUHC)")
+ same_organisation_schemes.each do |scheme|
expect(page).to have_link(scheme.service_name)
expect(page).to have_content(scheme.id_to_display)
expect(page).to have_content(scheme.locations&.count)
diff --git a/spec/helpers/navigation_items_helper_spec.rb b/spec/helpers/navigation_items_helper_spec.rb
index 0c6ced3ba..fcfbefc5b 100644
--- a/spec/helpers/navigation_items_helper_spec.rb
+++ b/spec/helpers/navigation_items_helper_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Lettings logs", "/lettings-logs", true),
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -38,7 +38,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -57,7 +57,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -75,7 +75,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", true),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -93,7 +93,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", true),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -111,7 +111,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", true),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", true),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -129,7 +129,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -147,7 +147,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", true),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -165,7 +165,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", true),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -194,7 +194,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Lettings logs", "/lettings-logs", true),
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -217,7 +217,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -349,7 +349,7 @@ RSpec.describe NavigationItemsHelper do
it "returns navigation items with Schemes item set as current" do
expect(primary_items("/schemes/1", current_user)).to eq(expected_navigation_items)
- expect(scheme_items("/schemes/1", 1, "Locations")).to eq(expected_scheme_items)
+ expect(scheme_items("/schemes/1", 1)).to eq(expected_scheme_items)
end
end
@@ -373,7 +373,7 @@ RSpec.describe NavigationItemsHelper do
it "returns navigation items with Schemes item set as current" do
expect(primary_items("/schemes/1/locations", current_user)).to eq(expected_navigation_items)
- expect(scheme_items("/schemes/1/locations", 1, "Locations")).to eq(expected_scheme_items)
+ expect(scheme_items("/schemes/1/locations", 1)).to eq(expected_scheme_items)
end
end
@@ -396,7 +396,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/organisations/#{current_user.organisation.id}/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -426,7 +426,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/organisations/#{current_user.organisation.id}/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", true),
- NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -456,7 +456,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/organisations/#{current_user.organisation.id}/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", true),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", false),
+ NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}/details", false),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
@@ -486,7 +486,7 @@ RSpec.describe NavigationItemsHelper do
NavigationItemsHelper::NavigationItem.new("Sales logs", "/organisations/#{current_user.organisation.id}/sales-logs", false),
NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", false),
NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false),
- NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", true),
+ NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}/details", true),
NavigationItemsHelper::NavigationItem.new("Stock owners", "/organisations/#{current_user.organisation.id}/stock-owners", false),
NavigationItemsHelper::NavigationItem.new("Managing agents", "/organisations/#{current_user.organisation.id}/managing-agents", false),
]
diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb
index 354e1a5da..646855f2e 100644
--- a/spec/requests/lettings_logs_controller_spec.rb
+++ b/spec/requests/lettings_logs_controller_spec.rb
@@ -345,7 +345,7 @@ RSpec.describe LettingsLogsController, type: :request do
it "page has correct title" do
get "/lettings-logs", headers:, params: {}
- expect(page).to have_title("Logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Lettings logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@@ -652,7 +652,7 @@ RSpec.describe LettingsLogsController, type: :request do
it "has search results in the title" do
get "/lettings-logs?search=#{log_to_search.id}", headers:, params: {}
- expect(page).to have_title("Logs (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Lettings logs (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it "shows lettings logs matching the id" do
@@ -716,12 +716,12 @@ RSpec.describe LettingsLogsController, type: :request do
it "has title with pagination details for page 1" do
get "/lettings-logs?search=#{logs[0].postcode_full}", headers:, params: {}
- expect(page).to have_title("Logs (#{logs.count} logs matching ‘#{postcode}’) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Lettings logs (#{logs.count} logs matching ‘#{postcode}’) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it "has title with pagination details for page 2" do
get "/lettings-logs?search=#{logs[0].postcode_full}&page=2", headers:, params: {}
- expect(page).to have_title("Logs (#{logs.count} logs matching ‘#{postcode}’) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Lettings logs (#{logs.count} logs matching ‘#{postcode}’) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@@ -801,7 +801,7 @@ RSpec.describe LettingsLogsController, type: :request do
end
it "does not have pagination in the title" do
- expect(page).to have_title("Logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Lettings logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it "shows the CSV download link" do
@@ -872,7 +872,7 @@ RSpec.describe LettingsLogsController, type: :request do
end
it "has pagination in the title" do
- expect(page).to have_title("Logs (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Lettings logs (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@@ -897,7 +897,7 @@ RSpec.describe LettingsLogsController, type: :request do
end
it "has pagination in the title" do
- expect(page).to have_title("Logs (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Lettings logs (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
end
diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb
index b7e63661f..41496fac6 100644
--- a/spec/requests/sales_logs_controller_spec.rb
+++ b/spec/requests/sales_logs_controller_spec.rb
@@ -254,7 +254,7 @@ RSpec.describe SalesLogsController, type: :request do
it "page has correct title" do
get "/sales-logs", headers: headers, params: {}
- expect(page).to have_title("Logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Sales logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it "does not show CSV download links" do
@@ -611,7 +611,7 @@ RSpec.describe SalesLogsController, type: :request do
it "has search results in the title" do
get "/sales-logs?search=#{log_to_search.id}", headers: headers, params: {}
- expect(page).to have_title("Logs (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Sales logs (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it "shows sales logs matching the id" do
@@ -706,7 +706,7 @@ RSpec.describe SalesLogsController, type: :request do
end
it "does not have pagination in the title" do
- expect(page).to have_title("Logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Sales logs - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it "does not show the organisation filter" do
@@ -736,7 +736,7 @@ RSpec.describe SalesLogsController, type: :request do
end
it "has pagination in the title" do
- expect(page).to have_title("Logs (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Sales logs (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@@ -761,7 +761,7 @@ RSpec.describe SalesLogsController, type: :request do
end
it "has pagination in the title" do
- expect(page).to have_title("Logs (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
+ expect(page).to have_title("Sales logs (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
end