From 6226877f96c05a948bb0ef72b3714527b686fe85 Mon Sep 17 00:00:00 2001 From: domducsutcliffe Date: Wed, 25 Jan 2023 15:22:19 +0000 Subject: [PATCH 1/2] Added a feature where the user table only renders when a string is present in the search box --- .../manage_users/_users_table.html.erb | 65 +++++++++++++------ .../manage_users/index.html.erb | 1 + .../super_admin/edit_user.feature | 1 + .../resend_temporary_password.feature | 1 + .../validations/edit_user_validation.feature | 1 + .../view_user/assorted_details.feature | 2 + .../view_user/full_details.feature | 2 + .../super_admin/view_user/mixed_roles.feature | 3 + .../view_user/something_went_wrong.feature | 1 + .../manage_users/user_admin/edit_user.feature | 1 + .../user_admin/find_users.feature | 1 + .../find_users_javascript_enabled.feature | 1 + .../resend_temporary_password.feature | 1 + .../validations/edit_user_validation.feature | 1 + ...sers_javascript_enabled_validation.feature | 8 ++- .../validations/find_users_validation.feature | 5 +- .../view_user/assorted_details.feature | 1 + .../user_admin/view_user/full_details.feature | 1 + .../user_admin/view_user/mixed_roles.feature | 1 + .../view_user/something_went_wrong.feature | 1 + .../user_support/edit_user.feature | 1 + .../resend_temporary_password.feature | 1 + .../validations/edit_user_validation.feature | 1 + .../view_user/assorted_details.feature | 1 + .../view_user/full_details.feature | 1 + .../view_user/mixed_roles.feature | 1 + .../view_user/something_went_wrong.feature | 1 + .../crown_marketplace/manage_users_steps.rb | 4 ++ 28 files changed, 86 insertions(+), 24 deletions(-) diff --git a/app/views/crown_marketplace/manage_users/_users_table.html.erb b/app/views/crown_marketplace/manage_users/_users_table.html.erb index d36a0db07a..41152139ae 100644 --- a/app/views/crown_marketplace/manage_users/_users_table.html.erb +++ b/app/views/crown_marketplace/manage_users/_users_table.html.erb @@ -1,27 +1,50 @@ - - - - - - - - - - <% if users.empty? %> +<% if !(@search[:error] || params[:email].blank?) %> +
<%= t('.email') %><%= t('.status') %>
+ - + + + - <% else %> - <% users.each do |user| %> + + + <% if users.empty? %> - - - + + <% else %> + <% users.each do |user| %> + + + + + + <% end %> <% end %> - <% end %> - -
<%= t('.no_users_found') %><%= t('.email') %><%= t('.status') %>
<%= user[:email] %><%= govuk_tag_with_text(*enabled_disabled_status_tag(user[:account_status])) %> - <%= link_to(t('.view_user'), crown_marketplace_manage_user_path(cognito_uuid: user[:cognito_uuid]), class: 'govuk-link govuk-link--no-visited-state', aria: { label: t('.view_user_email', email: user[:email]) }) %> - <%= t('.no_users_found') %>
<%= user[:email] %><%= govuk_tag_with_text(*enabled_disabled_status_tag(user[:account_status])) %> + <%= link_to(t('.view_user'), crown_marketplace_manage_user_path(cognito_uuid: user[:cognito_uuid]), class: 'govuk-link govuk-link--no-visited-state', aria: { label: t('.view_user_email', email: user[:email]) }) %> +
+ + +<%else%> + + + + + + + + + + <% users.each do %> + + + + + + <% end %> + +
<%= t('.email') %><%= t('.status') %>
<%= user[:email] %><%= govuk_tag_with_text(*enabled_disabled_status_tag(user[:account_status])) %> + <%= link_to(t('.view_user'), crown_marketplace_manage_user_path(cognito_uuid: user[:cognito_uuid]), class: 'govuk-link govuk-link--no-visited-state', aria: { label: t('.view_user_email', email: user[:email]) }) %> +
+<%end%> diff --git a/app/views/crown_marketplace/manage_users/index.html.erb b/app/views/crown_marketplace/manage_users/index.html.erb index 4deacc885f..30a3c8821e 100644 --- a/app/views/crown_marketplace/manage_users/index.html.erb +++ b/app/views/crown_marketplace/manage_users/index.html.erb @@ -47,6 +47,7 @@ +
<%= render(partial: 'users_table', locals: { users: @search[:users] }) %> diff --git a/features/crown_marketplace/manage_users/super_admin/edit_user.feature b/features/crown_marketplace/manage_users/super_admin/edit_user.feature index a65b2edafb..03d4cd2607 100644 --- a/features/crown_marketplace/manage_users/super_admin/edit_user.feature +++ b/features/crown_marketplace/manage_users/super_admin/edit_user.feature @@ -5,6 +5,7 @@ Feature: Manage users - Super admin - Edit user Given I sign in as an 'super admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'buyer@test.com' and there is a user with the following details: | Email verified | true | diff --git a/features/crown_marketplace/manage_users/super_admin/resend_temporary_password.feature b/features/crown_marketplace/manage_users/super_admin/resend_temporary_password.feature index 178cb0b259..fbf50dcd7c 100644 --- a/features/crown_marketplace/manage_users/super_admin/resend_temporary_password.feature +++ b/features/crown_marketplace/manage_users/super_admin/resend_temporary_password.feature @@ -4,6 +4,7 @@ Feature: Manage users - Super admin - Resend temporary password Given I sign in as an 'super admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario Outline: There is only a button for FORCE_CHANGE_PASSWORD diff --git a/features/crown_marketplace/manage_users/super_admin/validations/edit_user_validation.feature b/features/crown_marketplace/manage_users/super_admin/validations/edit_user_validation.feature index f3054f2bfc..5766fae251 100644 --- a/features/crown_marketplace/manage_users/super_admin/validations/edit_user_validation.feature +++ b/features/crown_marketplace/manage_users/super_admin/validations/edit_user_validation.feature @@ -6,6 +6,7 @@ Feature: Manage users - Super admin - Edit user - Validations When I click on 'Manage users' Then I am on the 'Manage users' page Given I am going to do a search to find users + Then I should not see users table And I search for 'service_admin@test.com' and there is a user with the following details: | Email verified | true | | Account enabled | true | diff --git a/features/crown_marketplace/manage_users/super_admin/view_user/assorted_details.feature b/features/crown_marketplace/manage_users/super_admin/view_user/assorted_details.feature index e4941178ba..4e2e12518a 100644 --- a/features/crown_marketplace/manage_users/super_admin/view_user/assorted_details.feature +++ b/features/crown_marketplace/manage_users/super_admin/view_user/assorted_details.feature @@ -4,7 +4,9 @@ Feature: Manage users - Super admin - View user - Assorted Details Given I sign in as an 'super admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users + Scenario Outline: View Buyer - Different confirmation status And I search for 'buyer@test.com' and there is a user with the following details: diff --git a/features/crown_marketplace/manage_users/super_admin/view_user/full_details.feature b/features/crown_marketplace/manage_users/super_admin/view_user/full_details.feature index 7135a97e12..76016e84cd 100644 --- a/features/crown_marketplace/manage_users/super_admin/view_user/full_details.feature +++ b/features/crown_marketplace/manage_users/super_admin/view_user/full_details.feature @@ -4,7 +4,9 @@ Feature: Manage users - Super admin - View user - Full Details Given I sign in as an 'super admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users + Scenario: View Buyer - Full details And I search for 'buyer@test.com' and there is a user with the following details: diff --git a/features/crown_marketplace/manage_users/super_admin/view_user/mixed_roles.feature b/features/crown_marketplace/manage_users/super_admin/view_user/mixed_roles.feature index e9a212601a..5b649dc7e4 100644 --- a/features/crown_marketplace/manage_users/super_admin/view_user/mixed_roles.feature +++ b/features/crown_marketplace/manage_users/super_admin/view_user/mixed_roles.feature @@ -4,7 +4,10 @@ Feature: Manage users - Super admin - View user - Mixed Roles Given I sign in as an 'super admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users + + Scenario: View Buyer and service admin And I search for 'buyer@test.com' and there is a user with the following details: diff --git a/features/crown_marketplace/manage_users/super_admin/view_user/something_went_wrong.feature b/features/crown_marketplace/manage_users/super_admin/view_user/something_went_wrong.feature index 28a7313d41..edbf7ab43a 100644 --- a/features/crown_marketplace/manage_users/super_admin/view_user/something_went_wrong.feature +++ b/features/crown_marketplace/manage_users/super_admin/view_user/something_went_wrong.feature @@ -4,6 +4,7 @@ Feature: Manage users - Super admin - View user - Something went wron Given I sign in as an 'super admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'buyer@test.com' there are the following users: | buyer@test.com | enabled | diff --git a/features/crown_marketplace/manage_users/user_admin/edit_user.feature b/features/crown_marketplace/manage_users/user_admin/edit_user.feature index fa9ec3e12a..e3eab0c72d 100644 --- a/features/crown_marketplace/manage_users/user_admin/edit_user.feature +++ b/features/crown_marketplace/manage_users/user_admin/edit_user.feature @@ -4,6 +4,7 @@ Feature: Manage users - User admin - Edit user Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'buyer@test.com' and there is a user with the following details: | Email verified | true | diff --git a/features/crown_marketplace/manage_users/user_admin/find_users.feature b/features/crown_marketplace/manage_users/user_admin/find_users.feature index f0501f170c..0f2b44c88d 100644 --- a/features/crown_marketplace/manage_users/user_admin/find_users.feature +++ b/features/crown_marketplace/manage_users/user_admin/find_users.feature @@ -5,6 +5,7 @@ Feature: Manage users - User admin - Find users - JavaScript disabled Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Scenario: Try and find a user Given I am going to do a search to find users diff --git a/features/crown_marketplace/manage_users/user_admin/find_users_javascript_enabled.feature b/features/crown_marketplace/manage_users/user_admin/find_users_javascript_enabled.feature index 7eff732a7d..5ce13941a1 100644 --- a/features/crown_marketplace/manage_users/user_admin/find_users_javascript_enabled.feature +++ b/features/crown_marketplace/manage_users/user_admin/find_users_javascript_enabled.feature @@ -5,6 +5,7 @@ Feature: Manage users - User admin - Find users - JavaScript enabled Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'test@' and there are no users And I enter 'test@' into the search diff --git a/features/crown_marketplace/manage_users/user_admin/resend_temporary_password.feature b/features/crown_marketplace/manage_users/user_admin/resend_temporary_password.feature index 274e22dd9d..6fb88f3594 100644 --- a/features/crown_marketplace/manage_users/user_admin/resend_temporary_password.feature +++ b/features/crown_marketplace/manage_users/user_admin/resend_temporary_password.feature @@ -5,6 +5,7 @@ Feature: Manage users - User admin - Resend temporary password Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario Outline: There is only a button for FORCE_CHANGE_PASSWORD diff --git a/features/crown_marketplace/manage_users/user_admin/validations/edit_user_validation.feature b/features/crown_marketplace/manage_users/user_admin/validations/edit_user_validation.feature index e4a962ebca..a8c41ed1ad 100644 --- a/features/crown_marketplace/manage_users/user_admin/validations/edit_user_validation.feature +++ b/features/crown_marketplace/manage_users/user_admin/validations/edit_user_validation.feature @@ -4,6 +4,7 @@ Feature: Manage users - User admin - Edit user - Validations Given I sign in as an 'super admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'service_admin@test.com' and there is a user with the following details: | Email verified | true | diff --git a/features/crown_marketplace/manage_users/user_admin/validations/find_users_javascript_enabled_validation.feature b/features/crown_marketplace/manage_users/user_admin/validations/find_users_javascript_enabled_validation.feature index ba99649111..66f0c0ee4a 100644 --- a/features/crown_marketplace/manage_users/user_admin/validations/find_users_javascript_enabled_validation.feature +++ b/features/crown_marketplace/manage_users/user_admin/validations/find_users_javascript_enabled_validation.feature @@ -5,15 +5,19 @@ Feature: Manage users - User admin - Find users - JavaScript enabled - Validatio Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page - + Then I should not see users table + Scenario: I enter no email - JavaScript disabled And I click on 'Search' Then I should see the following error for finding a user: | You must enter an email address | + Then I should not see users table Scenario: There is a service error And I cannot find any user accounts because of the 'service' error And I enter 'test' into the search And I click on 'Search' Then I should see the following error for finding a user: - | An error occured: service | \ No newline at end of file + | An error occured: service | + Then I should not see users table + diff --git a/features/crown_marketplace/manage_users/user_admin/validations/find_users_validation.feature b/features/crown_marketplace/manage_users/user_admin/validations/find_users_validation.feature index 224be86d1e..336d03ff48 100644 --- a/features/crown_marketplace/manage_users/user_admin/validations/find_users_validation.feature +++ b/features/crown_marketplace/manage_users/user_admin/validations/find_users_validation.feature @@ -5,15 +5,18 @@ Feature: Manage users - User admin - Find a users - JavaScript disabled - Valida Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Scenario: I enter no email - JavaScript disabled And I click on 'Search' Then I should see the following error for finding a user: | You must enter an email address | + Then I should not see users table Scenario: There is a service error And I cannot find any user accounts because of the 'service' error And I enter 'test' into the search And I click on 'Search' Then I should see the following error for finding a user: - | An error occured: service | \ No newline at end of file + | An error occured: service | + Then I should not see users table \ No newline at end of file diff --git a/features/crown_marketplace/manage_users/user_admin/view_user/assorted_details.feature b/features/crown_marketplace/manage_users/user_admin/view_user/assorted_details.feature index fedd51b6c8..8f6b06e2dd 100644 --- a/features/crown_marketplace/manage_users/user_admin/view_user/assorted_details.feature +++ b/features/crown_marketplace/manage_users/user_admin/view_user/assorted_details.feature @@ -4,6 +4,7 @@ Feature: Manage users - User admin - View user - Assorted Details Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario Outline: View Buyer - Different confirmation status diff --git a/features/crown_marketplace/manage_users/user_admin/view_user/full_details.feature b/features/crown_marketplace/manage_users/user_admin/view_user/full_details.feature index 43e2774b43..048614b9e2 100644 --- a/features/crown_marketplace/manage_users/user_admin/view_user/full_details.feature +++ b/features/crown_marketplace/manage_users/user_admin/view_user/full_details.feature @@ -4,6 +4,7 @@ Feature: Manage users - User admin - View user - Full Details Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario: View Buyer - Full details diff --git a/features/crown_marketplace/manage_users/user_admin/view_user/mixed_roles.feature b/features/crown_marketplace/manage_users/user_admin/view_user/mixed_roles.feature index 4bcc2ee3dc..54eeb306e1 100644 --- a/features/crown_marketplace/manage_users/user_admin/view_user/mixed_roles.feature +++ b/features/crown_marketplace/manage_users/user_admin/view_user/mixed_roles.feature @@ -4,6 +4,7 @@ Feature: Manage users - User admin - View user - Mixed Roles Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario: View Buyer and service admin diff --git a/features/crown_marketplace/manage_users/user_admin/view_user/something_went_wrong.feature b/features/crown_marketplace/manage_users/user_admin/view_user/something_went_wrong.feature index 8429a756da..b9ddd762d4 100644 --- a/features/crown_marketplace/manage_users/user_admin/view_user/something_went_wrong.feature +++ b/features/crown_marketplace/manage_users/user_admin/view_user/something_went_wrong.feature @@ -4,6 +4,7 @@ Feature: Manage users - User admin - View user - Something went wron Given I sign in as an 'user admin' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'buyer@test.com' there are the following users: | buyer@test.com | enabled | diff --git a/features/crown_marketplace/manage_users/user_support/edit_user.feature b/features/crown_marketplace/manage_users/user_support/edit_user.feature index 1d1d449b9a..d06240090d 100644 --- a/features/crown_marketplace/manage_users/user_support/edit_user.feature +++ b/features/crown_marketplace/manage_users/user_support/edit_user.feature @@ -5,6 +5,7 @@ Feature: Manage users - User support - Edit user When I click on 'Manage users' Then I am on the 'Manage users' page Given I am going to do a search to find users + Then I should not see users table And I search for 'buyer@test.com' and there is a user with the following details: | Email verified | true | | Account enabled | true | diff --git a/features/crown_marketplace/manage_users/user_support/resend_temporary_password.feature b/features/crown_marketplace/manage_users/user_support/resend_temporary_password.feature index e37faf5d85..e5f6360eb7 100644 --- a/features/crown_marketplace/manage_users/user_support/resend_temporary_password.feature +++ b/features/crown_marketplace/manage_users/user_support/resend_temporary_password.feature @@ -4,6 +4,7 @@ Feature: Manage users - User support - Resend temporary password Given I sign in as an 'user support' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario Outline: There is only a button for FORCE_CHANGE_PASSWORD diff --git a/features/crown_marketplace/manage_users/user_support/validations/edit_user_validation.feature b/features/crown_marketplace/manage_users/user_support/validations/edit_user_validation.feature index d389fc3693..cbc48e8dba 100644 --- a/features/crown_marketplace/manage_users/user_support/validations/edit_user_validation.feature +++ b/features/crown_marketplace/manage_users/user_support/validations/edit_user_validation.feature @@ -4,6 +4,7 @@ Feature: Manage users - User support - Edit user - Validations Given I sign in as an 'user support' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'buyer@test.com' and there is a user with the following details: | Email verified | true | diff --git a/features/crown_marketplace/manage_users/user_support/view_user/assorted_details.feature b/features/crown_marketplace/manage_users/user_support/view_user/assorted_details.feature index 5d2f3f73d7..3ef20775f5 100644 --- a/features/crown_marketplace/manage_users/user_support/view_user/assorted_details.feature +++ b/features/crown_marketplace/manage_users/user_support/view_user/assorted_details.feature @@ -4,6 +4,7 @@ Feature: Manage users - User support - View user - Assorted Details Given I sign in as an 'user support' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario Outline: View Buyer - Different confirmation status diff --git a/features/crown_marketplace/manage_users/user_support/view_user/full_details.feature b/features/crown_marketplace/manage_users/user_support/view_user/full_details.feature index 4d876769e3..4cf9296d4d 100644 --- a/features/crown_marketplace/manage_users/user_support/view_user/full_details.feature +++ b/features/crown_marketplace/manage_users/user_support/view_user/full_details.feature @@ -4,6 +4,7 @@ Feature: Manage users - User support - View user - Full Details Given I sign in as an 'user support' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario: View Buyer - Full details diff --git a/features/crown_marketplace/manage_users/user_support/view_user/mixed_roles.feature b/features/crown_marketplace/manage_users/user_support/view_user/mixed_roles.feature index fa0371f672..f470264f0c 100644 --- a/features/crown_marketplace/manage_users/user_support/view_user/mixed_roles.feature +++ b/features/crown_marketplace/manage_users/user_support/view_user/mixed_roles.feature @@ -4,6 +4,7 @@ Feature: Manage users - User support - View user - Mixed Roles Given I sign in as an 'user support' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users Scenario: View Buyer and service admin diff --git a/features/crown_marketplace/manage_users/user_support/view_user/something_went_wrong.feature b/features/crown_marketplace/manage_users/user_support/view_user/something_went_wrong.feature index 6bde72ef49..9b6d43e784 100644 --- a/features/crown_marketplace/manage_users/user_support/view_user/something_went_wrong.feature +++ b/features/crown_marketplace/manage_users/user_support/view_user/something_went_wrong.feature @@ -4,6 +4,7 @@ Feature: Manage users - User support - View user - Something went wron Given I sign in as an 'user support' user go to the crown marketplace dashboard When I click on 'Manage users' Then I am on the 'Manage users' page + Then I should not see users table Given I am going to do a search to find users And I search for 'buyer@test.com' there are the following users: | buyer@test.com | enabled | diff --git a/features/step_definitions/crown_marketplace/manage_users_steps.rb b/features/step_definitions/crown_marketplace/manage_users_steps.rb index 62befd00c4..25433bee22 100644 --- a/features/step_definitions/crown_marketplace/manage_users_steps.rb +++ b/features/step_definitions/crown_marketplace/manage_users_steps.rb @@ -34,6 +34,10 @@ expect(manage_users_page.find_a_user_table.no_users).to have_content('No users were found with that email address') end +Given('I should not see users table') do + expect(manage_users_page).not_to have_content('No users were found with that email address') +end + Then('I should see the following users in the results:') do |found_users_table| found_users = found_users_table.raw found_users_rows = manage_users_page.find_a_user_table.rows From 6485416f8c49a4a95ff141d7d81887c517e5a0b5 Mon Sep 17 00:00:00 2001 From: domducsutcliffe Date: Fri, 27 Jan 2023 16:12:40 +0000 Subject: [PATCH 2/2] Removed some sillyness from the users table partial and reworked feature test to be more precise by targeting the css in the rendered partial --- .../manage_users/_users_table.html.erb | 23 +------------------ .../crown_marketplace/manage_users_steps.rb | 2 +- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/app/views/crown_marketplace/manage_users/_users_table.html.erb b/app/views/crown_marketplace/manage_users/_users_table.html.erb index 41152139ae..49156fc5be 100644 --- a/app/views/crown_marketplace/manage_users/_users_table.html.erb +++ b/app/views/crown_marketplace/manage_users/_users_table.html.erb @@ -25,26 +25,5 @@ <% end %> -<%else%> - - - - - - - - - - <% users.each do %> - - - - - - <% end %> - -
<%= t('.email') %><%= t('.status') %>
<%= user[:email] %><%= govuk_tag_with_text(*enabled_disabled_status_tag(user[:account_status])) %> - <%= link_to(t('.view_user'), crown_marketplace_manage_user_path(cognito_uuid: user[:cognito_uuid]), class: 'govuk-link govuk-link--no-visited-state', aria: { label: t('.view_user_email', email: user[:email]) }) %> -
<%end%> - + \ No newline at end of file diff --git a/features/step_definitions/crown_marketplace/manage_users_steps.rb b/features/step_definitions/crown_marketplace/manage_users_steps.rb index 25433bee22..6517ef719f 100644 --- a/features/step_definitions/crown_marketplace/manage_users_steps.rb +++ b/features/step_definitions/crown_marketplace/manage_users_steps.rb @@ -35,7 +35,7 @@ end Given('I should not see users table') do - expect(manage_users_page).not_to have_content('No users were found with that email address') + expect(manage_users_page).to have_css('table.govuk-table', count: 0) end Then('I should see the following users in the results:') do |found_users_table|