diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/features/groups/members/filter_members_spec.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/features/groups/members/filter_members_spec.rb')
-rw-r--r-- | spec/features/groups/members/filter_members_spec.rb | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/spec/features/groups/members/filter_members_spec.rb b/spec/features/groups/members/filter_members_spec.rb index b6d33b3f4aa..917b35659a6 100644 --- a/spec/features/groups/members/filter_members_spec.rb +++ b/spec/features/groups/members/filter_members_spec.rb @@ -11,8 +11,7 @@ RSpec.describe 'Groups > Members > Filter members', :js do let(:group) { create(:group) } let(:nested_group) { create(:group, parent: group) } - two_factor_auth_dropdown_toggle_selector = '[data-testid="member-filter-2fa-dropdown"] [data-testid="dropdown-toggle"]' - active_inherited_members_filter_selector = '[data-testid="filter-members-with-inherited-permissions"] a.is-active' + filtered_search_bar_selector = '[data-testid="members-filtered-search-bar"]' before do group.add_owner(user) @@ -27,7 +26,6 @@ RSpec.describe 'Groups > Members > Filter members', :js do expect(member(0)).to include(user.name) expect(member(1)).to include(user_with_2fa.name) - expect(page).to have_css(two_factor_auth_dropdown_toggle_selector, text: 'Everyone') end it 'shows only 2FA members' do @@ -35,7 +33,10 @@ RSpec.describe 'Groups > Members > Filter members', :js do expect(member(0)).to include(user_with_2fa.name) expect(all_rows.size).to eq(1) - expect(page).to have_css(two_factor_auth_dropdown_toggle_selector, text: 'Enabled') + + within filtered_search_bar_selector do + expect(page).to have_content '2FA = Enabled' + end end it 'shows only non 2FA members' do @@ -43,7 +44,10 @@ RSpec.describe 'Groups > Members > Filter members', :js do expect(member(0)).to include(user.name) expect(all_rows.size).to eq(1) - expect(page).to have_css(two_factor_auth_dropdown_toggle_selector, text: 'Disabled') + + within filtered_search_bar_selector do + expect(page).to have_content '2FA = Disabled' + end end it 'shows inherited members by default' do @@ -53,15 +57,16 @@ RSpec.describe 'Groups > Members > Filter members', :js do expect(member(1)).to include(user_with_2fa.name) expect(member(2)).to include(nested_group_user.name) expect(all_rows.size).to eq(3) - - expect(page).to have_css(active_inherited_members_filter_selector, text: 'Show all members', visible: false) end it 'shows only group members' do visit_members_list(nested_group, with_inherited_permissions: 'exclude') expect(member(0)).to include(nested_group_user.name) expect(all_rows.size).to eq(1) - expect(page).to have_css(active_inherited_members_filter_selector, text: 'Show only direct members', visible: false) + + within filtered_search_bar_selector do + expect(page).to have_content 'Membership = Direct' + end end it 'shows only inherited members' do @@ -69,7 +74,10 @@ RSpec.describe 'Groups > Members > Filter members', :js do expect(member(0)).to include(user.name) expect(member(1)).to include(user_with_2fa.name) expect(all_rows.size).to eq(2) - expect(page).to have_css(active_inherited_members_filter_selector, text: 'Show only inherited members', visible: false) + + within filtered_search_bar_selector do + expect(page).to have_content 'Membership = Inherited' + end end def visit_members_list(group, options = {}) |