From ee21c85abae1cb55c1491f6450f3c9cb85909611 Mon Sep 17 00:00:00 2001 From: Ted-U Date: Mon, 12 Sep 2022 12:22:09 +0100 Subject: [PATCH] Remove "user" tag --- app/helpers/tab_nav_helper.rb | 2 +- app/views/organisations/users.html.erb | 2 +- app/views/users/_user_list.html.erb | 2 +- spec/helpers/tab_nav_helper_spec.rb | 2 +- spec/requests/organisations_controller_spec.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/helpers/tab_nav_helper.rb b/app/helpers/tab_nav_helper.rb index 6e482b7ff..8ab09765f 100644 --- a/app/helpers/tab_nav_helper.rb +++ b/app/helpers/tab_nav_helper.rb @@ -3,7 +3,7 @@ module TabNavHelper def user_cell(user) link_text = user.name.presence || user.email - [govuk_link_to(link_text, user), "User #{user.email}"].join("\n") + [govuk_link_to(link_text, user), " #{user.email}"].join("\n") end def location_cell(location, link) diff --git a/app/views/organisations/users.html.erb b/app/views/organisations/users.html.erb index c604a1c9f..ea507016f 100644 --- a/app/views/organisations/users.html.erb +++ b/app/views/organisations/users.html.erb @@ -9,7 +9,7 @@ <%= render SubNavigationComponent.new( items: secondary_items(request.path, @organisation.id), ) %> -

Users

+

<% end %> <% if current_user.data_coordinator? || current_user.support? %> diff --git a/app/views/users/_user_list.html.erb b/app/views/users/_user_list.html.erb index 786e3c571..aaace0f45 100644 --- a/app/views/users/_user_list.html.erb +++ b/app/views/users/_user_list.html.erb @@ -52,7 +52,7 @@ <% row.cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %> <% row.cell(text: user.active? ? user.last_sign_in_at&.to_formatted_s(:govuk_date) : "Deactivated") %> <%= govuk_link_to users_path(user) do %> - User <%= user.id %> + <%= user.id %> <% end %> <% end %> <% end %> diff --git a/spec/helpers/tab_nav_helper_spec.rb b/spec/helpers/tab_nav_helper_spec.rb index aa93b839d..f22bec163 100644 --- a/spec/helpers/tab_nav_helper_spec.rb +++ b/spec/helpers/tab_nav_helper_spec.rb @@ -8,7 +8,7 @@ RSpec.describe TabNavHelper do describe "#user_cell" do it "returns user link and email separated by a newline character" do - expected_html = "#{user.name}\nUser #{user.email}" + expected_html = "#{user.name}\n #{user.email}" expect(user_cell(user)).to match(expected_html) end end diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 20197f468..3c342b56b 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -255,7 +255,7 @@ RSpec.describe OrganisationsController, type: :request do end it "shows hidden accesibility fields only for active users in the current user's organisation" do - expected_case_row_log = "User #{user.email}" + expected_case_row_log = " #{user.email}" unauthorized_case_row_log = "User #{other_org_user.email}" expect(CGI.unescape_html(response.body)).to include(expected_case_row_log) expect(CGI.unescape_html(response.body)).not_to include(unauthorized_case_row_log)