* correct headings
* fixed titles
* fixed missing bracket and test
* removed test since we dont have hidden headers for non support users
* removed test since we dont have hidden headers for non support users
* correct title when no logs for support usert
* correct title for non support
* correct title for non support viewing logs
* correct title for non support viewing logs
* correct title for non support viewing logs - 3
* correct title for logs
* correct title for logs - 2
* fixed new title for no support tabs
* fixed new title for no support tabs - 2
* fixed rebasing
expect(page).tohave_title("Your organisation (1 log matching ‘#{log_to_search.id}’ of #{log_total_count} total logs) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{log_to_search.owning_organisation.name} (1 log matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it"shows case logs matching the id"do
@ -381,12 +381,12 @@ RSpec.describe CaseLogsController, type: :request do
it"has title with pagination details for page 1"do
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{log_to_search.owning_organisation.name} (#{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
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{log_to_search.owning_organisation.name} (#{logs.count} logs matching ‘#{postcode}’) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@ -466,7 +466,7 @@ RSpec.describe CaseLogsController, type: :request do
end
it"does not have pagination in the title"do
expect(page).tohave_title("Your organisation (Logs) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{user.organisation.name} (Logs) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it"shows the download csv link"do
@ -542,7 +542,7 @@ RSpec.describe CaseLogsController, type: :request do
end
it"has pagination in the title"do
expect(page).tohave_title("Your organisation (Logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{user.organisation.name} (Logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@ -567,7 +567,7 @@ RSpec.describe CaseLogsController, type: :request do
end
it"has pagination in the title"do
expect(page).tohave_title("Your organisation (Logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{user.organisation.name} (Logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (1 log matching ‘#{log_to_search.id}’ of #{log_total_count} total logs) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{organisation.name} (1 log matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it"shows case logs matching the id"do
@ -546,12 +536,12 @@ RSpec.describe OrganisationsController, type: :request do
it"has title with pagination details for page 1"do
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{organisation.name} (#{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
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("#{organisation.name} (#{logs.count} logs matching ‘#{postcode}’) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@ -808,11 +798,11 @@ RSpec.describe OrganisationsController, type: :request do
end
it"updates the table caption"do
expect(page).tohave_content("1 organisation found matching ‘#{search_param}’ of 29 total organisations.")
expect(page).tohave_content("1 organisation found matching ‘#{search_param}’")
end
it"has search in the title"do
expect(page).tohave_title("Organisations (1 organisation matching ‘#{search_param}’ of 29 total organisations) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Organisations (1 organisation matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
context"when the search term matches more than 1 result"do
@ -824,11 +814,11 @@ RSpec.describe OrganisationsController, type: :request do
end
it"updates the table caption"do
expect(page).tohave_content("2 organisations found matching ‘#{search_param}’ of 29 total organisations.")
expect(page).tohave_content("2 organisations found matching ‘#{search_param}’")
end
it"has search in the title"do
expect(page).tohave_title("Organisations (2 organisations matching ‘#{search_param}’ of 29 total organisations) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Organisations (2 organisations matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@ -836,7 +826,7 @@ RSpec.describe OrganisationsController, type: :request do
let(:search_param){"DLUHC"}
it"has search and pagination in the title"do
expect(page).tohave_title("Organisations (27 organisations matching ‘#{search_param}’ of 29 total organisations) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Organisations (27 organisations matching ‘#{search_param}’) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")