From f9811c9c7f40e805f7ba00419722d18d25527caf Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 6 Jun 2022 14:25:34 +0100 Subject: [PATCH] fixed new title for no support tabs --- app/views/case_logs/index.html.erb | 4 ++-- app/views/users/index.html.erb | 2 +- spec/requests/case_logs_controller_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/case_logs/index.html.erb b/app/views/case_logs/index.html.erb index 387bdd45a..0580e18a9 100644 --- a/app/views/case_logs/index.html.erb +++ b/app/views/case_logs/index.html.erb @@ -2,13 +2,13 @@ <% if @searched.present? %> <% title = "#{current_user.support? ? 'Logs' : current_user.organisation.name} (#{@pagy.count} #{item_label} matching ‘#{@searched}’)" %> <% else %> - <% title = "#{current_user.support? ? 'Logs' : current_user.organisation.name}" %> + <% title = current_user.support? ? "Logs" : "#{current_user.organisation.name} (Logs)" %> <% end %> <% content_for :title, title %>

- <% if !current_user.support? %> + <% unless current_user.support? %> <%= current_user.organisation.name %> <% end %> Logs diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 0a3f642c2..7bd9b9be5 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -2,7 +2,7 @@ <% if @searched.present? %> <% title = "#{current_user.support? ? 'Users' : current_user.organisation.name} (#{@pagy.count} #{item_label} matching ‘#{@searched}’" %> <% else %> - <% title = "#{current_user.support? ? 'Users' : current_user.organisation.name}" %> + <% title = current_user.support? ? "Users" : "#{current_user.organisation.name} (Users)" %> <% end %> <% content_for :title, title %> diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index eb7b8ebae..625e324b1 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -466,7 +466,7 @@ RSpec.describe CaseLogsController, type: :request do end it "does not have pagination in the title" do - expect(page).to have_title("#{user.organisation.name} - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("#{user.organisation.name} (Logs) - Submit social housing lettings and sales data (CORE) - GOV.UK") end it "shows the download csv link" do