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 9103c931ae..f172dc54df 100644 --- a/app/views/crown_marketplace/manage_users/_users_table.html.erb +++ b/app/views/crown_marketplace/manage_users/_users_table.html.erb @@ -25,5 +25,26 @@ <% 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%> 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 d1f5536c36..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 @@ -11,6 +11,7 @@ Feature: Manage users - User admin - Find users - JavaScript enabled - Validatio 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 @@ -18,3 +19,5 @@ Feature: Manage users - User admin - Find users - JavaScript enabled - Validatio And I click on 'Search' Then I should see the following error for finding a user: | 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 |