Commit 4e531d03 authored by Jiaan Louw's avatar Jiaan Louw Committed by Jiaan Louw

Move user group count feature spec

This change moves the user group count feature spec into the main
GET block now that the vue_admin_users feature flag has been
removed.
parent ecc42725
...@@ -308,6 +308,21 @@ RSpec.describe 'Admin::Users' do ...@@ -308,6 +308,21 @@ RSpec.describe 'Admin::Users' do
end end
end end
end end
context 'user group count', :js do
before do
group = create(:group)
group.add_developer(current_user)
project = create(:project, group: create(:group))
project.add_reporter(current_user)
end
it 'displays count of the users authorized groups' do
wait_for_requests
expect(page.find("[data-testid='user-group-count-#{current_user.id}']").text).to eq("2")
end
end
end end
describe 'GET /admin/users/new' do describe 'GET /admin/users/new' do
...@@ -557,32 +572,6 @@ RSpec.describe 'Admin::Users' do ...@@ -557,32 +572,6 @@ RSpec.describe 'Admin::Users' do
end end
end end
# TODO: Move to main GET /admin/users block once feature flag is removed. Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/290737
context 'with vue_admin_users feature flag enabled', :js do
before do
stub_feature_flags(vue_admin_users: true)
end
describe 'GET /admin/users' do
context 'user group count', :js do
before do
group = create(:group)
group.add_developer(current_user)
project = create(:project, group: create(:group))
project.add_reporter(current_user)
end
it 'displays count of the users authorized groups' do
visit admin_users_path
wait_for_requests
expect(page.find("[data-testid='user-group-count-#{current_user.id}']").text).to eq("2")
end
end
end
end
def click_user_dropdown_toggle(user_id) def click_user_dropdown_toggle(user_id)
page.within("[data-testid='user-actions-#{user_id}']") do page.within("[data-testid='user-actions-#{user_id}']") do
find("[data-testid='dropdown-toggle']").click find("[data-testid='dropdown-toggle']").click
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment