diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /spec/features/groups/members | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/features/groups/members')
-rw-r--r-- | spec/features/groups/members/manage_groups_spec.rb | 3 | ||||
-rw-r--r-- | spec/features/groups/members/manage_members_spec.rb | 57 |
2 files changed, 4 insertions, 56 deletions
diff --git a/spec/features/groups/members/manage_groups_spec.rb b/spec/features/groups/members/manage_groups_spec.rb index d822a5ea871..2beecda23b5 100644 --- a/spec/features/groups/members/manage_groups_spec.rb +++ b/spec/features/groups/members/manage_groups_spec.rb @@ -6,6 +6,7 @@ RSpec.describe 'Groups > Members > Manage groups', :js do include Select2Helper include Spec::Support::Helpers::Features::MembersHelpers include Spec::Support::Helpers::Features::InviteMembersModalHelper + include Spec::Support::Helpers::ModalHelpers let_it_be(:user) { create(:user) } @@ -92,7 +93,7 @@ RSpec.describe 'Groups > Members > Manage groups', :js do click_button 'Remove group' end - page.within('[role="dialog"]') do + within_modal do click_button('Remove group') end diff --git a/spec/features/groups/members/manage_members_spec.rb b/spec/features/groups/members/manage_members_spec.rb index 38e829bafcc..0ce50107e54 100644 --- a/spec/features/groups/members/manage_members_spec.rb +++ b/spec/features/groups/members/manage_members_spec.rb @@ -5,6 +5,7 @@ require 'spec_helper' RSpec.describe 'Groups > Members > Manage members' do include Spec::Support::Helpers::Features::MembersHelpers include Spec::Support::Helpers::Features::InviteMembersModalHelper + include Spec::Support::Helpers::ModalHelpers let_it_be(:user1) { create(:user, name: 'John Doe') } let_it_be(:user2) { create(:user, name: 'Mary Jane') } @@ -84,33 +85,6 @@ RSpec.describe 'Groups > Members > Manage members' do property: 'existing_user', user: user1 ) - expect_no_snowplow_event( - category: 'Members::CreateService', - action: 'area_of_focus' - ) - end - - it 'adds a user to group with area_of_focus', :js, :snowplow, :aggregate_failures do - stub_experiments(member_areas_of_focus: :candidate) - group.add_owner(user1) - - visit group_group_members_path(group) - - invite_member(user2.name, role: 'Reporter', area_of_focus: true) - wait_for_requests - - expect_snowplow_event( - category: 'Members::CreateService', - action: 'area_of_focus', - label: 'Contribute to the codebase', - property: group.members.last.id.to_s - ) - expect_snowplow_event( - category: 'Members::CreateService', - action: 'area_of_focus', - label: 'Collaborate on open issues and merge requests', - property: group.members.last.id.to_s - ) end it 'do not disclose email addresses', :js do @@ -170,7 +144,7 @@ RSpec.describe 'Groups > Members > Manage members' do click_button 'Remove member' end - page.within('[role="dialog"]') do + within_modal do expect(page).to have_unchecked_field 'Also unassign this user from related issues and merge requests' click_button('Remove member') end @@ -220,36 +194,9 @@ RSpec.describe 'Groups > Members > Manage members' do property: 'net_new_user', user: user1 ) - expect_no_snowplow_event( - category: 'Members::CreateService', - action: 'area_of_focus' - ) end end - it 'invite user to group with area_of_focus', :js, :snowplow, :aggregate_failures do - stub_experiments(member_areas_of_focus: :candidate) - group.add_owner(user1) - - visit group_group_members_path(group) - - invite_member('test@example.com', role: 'Reporter', area_of_focus: true) - wait_for_requests - - expect_snowplow_event( - category: 'Members::InviteService', - action: 'area_of_focus', - label: 'Contribute to the codebase', - property: group.members.last.id.to_s - ) - expect_snowplow_event( - category: 'Members::InviteService', - action: 'area_of_focus', - label: 'Collaborate on open issues and merge requests', - property: group.members.last.id.to_s - ) - end - context 'when user is a guest' do before do group.add_guest(user1) |