diff options
Diffstat (limited to 'spec/features/admin/users')
-rw-r--r-- | spec/features/admin/users/user_spec.rb | 10 | ||||
-rw-r--r-- | spec/features/admin/users/users_spec.rb | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/spec/features/admin/users/user_spec.rb b/spec/features/admin/users/user_spec.rb index a95fd133133..7dc329e6909 100644 --- a/spec/features/admin/users/user_spec.rb +++ b/spec/features/admin/users/user_spec.rb @@ -6,8 +6,8 @@ RSpec.describe 'Admin::Users::User', feature_category: :user_management do include Features::AdminUsersHelpers include Spec::Support::Helpers::ModalHelpers - let_it_be(:user) { create(:omniauth_user, provider: 'twitter', extern_uid: '123456') } - let_it_be(:current_user) { create(:admin) } + let_it_be(:user) { create(:omniauth_user, :no_super_sidebar, provider: 'twitter', extern_uid: '123456') } + let_it_be(:current_user) { create(:admin, :no_super_sidebar) } before do sign_in(current_user) @@ -145,7 +145,7 @@ RSpec.describe 'Admin::Users::User', feature_category: :user_management do end describe 'Impersonation' do - let_it_be(:another_user) { create(:user) } + let_it_be(:another_user) { create(:user, :no_super_sidebar) } context 'before impersonating' do subject { visit admin_user_path(user_to_visit) } @@ -156,7 +156,7 @@ RSpec.describe 'Admin::Users::User', feature_category: :user_management do it 'disables impersonate button' do subject - impersonate_btn = find('[data-testid="impersonate_user_link"]') + impersonate_btn = find('[data-testid="impersonate-user-link"]') expect(impersonate_btn).not_to be_nil expect(impersonate_btn['disabled']).not_to be_nil @@ -174,7 +174,7 @@ RSpec.describe 'Admin::Users::User', feature_category: :user_management do subject expect(page).to have_content('Impersonate') - impersonate_btn = find('[data-testid="impersonate_user_link"]') + impersonate_btn = find('[data-testid="impersonate-user-link"]') expect(impersonate_btn['disabled']).to be_nil end end diff --git a/spec/features/admin/users/users_spec.rb b/spec/features/admin/users/users_spec.rb index 8e80ce5edd9..8ee30c50a7d 100644 --- a/spec/features/admin/users/users_spec.rb +++ b/spec/features/admin/users/users_spec.rb @@ -350,7 +350,8 @@ RSpec.describe 'Admin::Users', feature_category: :user_management do let_it_be(:ghost_user) { create(:user, :ghost) } it 'does not render actions dropdown' do - expect(page).not_to have_css("[data-testid='user-actions-#{ghost_user.id}'] [data-testid='dropdown-toggle']") + expect(page).not_to have_css( + "[data-testid='user-actions-#{ghost_user.id}'] [data-testid='user-actions-dropdown-toggle']") end end @@ -358,7 +359,8 @@ RSpec.describe 'Admin::Users', feature_category: :user_management do let_it_be(:bot_user) { create(:user, user_type: :alert_bot) } it 'does not render actions dropdown' do - expect(page).not_to have_css("[data-testid='user-actions-#{bot_user.id}'] [data-testid='dropdown-toggle']") + expect(page).not_to have_css( + "[data-testid='user-actions-#{bot_user.id}'] [data-testid='user-actions-dropdown-toggle']") end end end |