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 | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/features/groups')
-rw-r--r-- | spec/features/groups/container_registry_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/groups/empty_states_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/groups/issues_spec.rb | 12 | ||||
-rw-r--r-- | spec/features/groups/members/manage_groups_spec.rb | 3 | ||||
-rw-r--r-- | spec/features/groups/members/manage_members_spec.rb | 57 | ||||
-rw-r--r-- | spec/features/groups/navbar_spec.rb | 1 |
6 files changed, 12 insertions, 65 deletions
diff --git a/spec/features/groups/container_registry_spec.rb b/spec/features/groups/container_registry_spec.rb index 098559dc3f8..f5af9ba8b7b 100644 --- a/spec/features/groups/container_registry_spec.rb +++ b/spec/features/groups/container_registry_spec.rb @@ -82,7 +82,7 @@ RSpec.describe 'Container Registry', :js do end it 'shows the image tags' do - expect(page).to have_content 'Image tags' + expect(page).to have_content '1 tag' first_tag = first('[data-testid="name"]') expect(first_tag).to have_content 'latest' end diff --git a/spec/features/groups/empty_states_spec.rb b/spec/features/groups/empty_states_spec.rb index 4488f53a03f..0317f9162cc 100644 --- a/spec/features/groups/empty_states_spec.rb +++ b/spec/features/groups/empty_states_spec.rb @@ -101,7 +101,7 @@ RSpec.describe 'Group empty states' do it "the new #{issuable_name} button opens a project dropdown" do within '.empty-state' do - find('.new-project-item-select-button').click + click_button 'Toggle project select' end expect(page).to have_selector('.ajax-project-dropdown') diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb index 4e59ab40d04..1bac1bcdf5a 100644 --- a/spec/features/groups/issues_spec.rb +++ b/spec/features/groups/issues_spec.rb @@ -119,8 +119,9 @@ RSpec.describe 'Group issues page' do end it 'shows projects only with issues feature enabled', :js do - find('.empty-state .js-lazy-loaded') - find('.empty-state .new-project-item-link').click + within '.empty-state' do + click_button 'Toggle project select' + end page.within('.select2-results') do expect(page).to have_content(project.full_name) @@ -158,9 +159,7 @@ RSpec.describe 'Group issues page' do it 'each issue item has a user-can-drag css applied' do visit issues_group_path(group, sort: 'relative_position') - page.within('.manual-ordering') do - expect(page).to have_selector('.issue.user-can-drag', count: 3) - end + expect(page).to have_selector('.issue.user-can-drag', count: 3) end it 'issues should be draggable and persist order' do @@ -224,7 +223,8 @@ RSpec.describe 'Group issues page' do end it 'shows the pagination' do - expect(page).to have_selector('.gl-pagination') + expect(page).to have_link 'Prev' + expect(page).to have_link 'Next' end it 'first pagination item is active' do 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) diff --git a/spec/features/groups/navbar_spec.rb b/spec/features/groups/navbar_spec.rb index 22409e9e7f6..da8032dc4dd 100644 --- a/spec/features/groups/navbar_spec.rb +++ b/spec/features/groups/navbar_spec.rb @@ -14,7 +14,6 @@ RSpec.describe 'Group navbar' do before do insert_package_nav(_('Kubernetes')) - stub_feature_flags(group_iterations: false) stub_feature_flags(customer_relations: false) stub_config(dependency_proxy: { enabled: false }) stub_config(registry: { enabled: false }) |