diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 12:18:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-20 12:18:59 +0300 |
commit | c7eec01f1b68b2e047cdd709751cb695ab329933 (patch) | |
tree | 47609cd0e5f00afdd1532cf951f9c0055a125641 /spec/features/groups_spec.rb | |
parent | 9b863f753f0320a95af1ff774cd0c1d4ec7d2754 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/groups_spec.rb')
-rw-r--r-- | spec/features/groups_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index e91e6673498..088b5b11a9a 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -510,6 +510,33 @@ RSpec.describe 'Group', feature_category: :subgroups do end end end + + context 'when in a private group' do + before do + group.update!( + visibility_level: Gitlab::VisibilityLevel::PRIVATE, + project_creation_level: Gitlab::Access::MAINTAINER_PROJECT_ACCESS + ) + end + + context 'when visibility levels have been restricted to private only by an administrator' do + before do + stub_application_setting( + restricted_visibility_levels: [ + Gitlab::VisibilityLevel::PRIVATE + ] + ) + end + + it 'does not display the "New project" button' do + visit group_path(group) + + page.within '[data-testid="group-buttons"]' do + expect(page).not_to have_link('New project') + end + end + end + end end describe 'group README', :js do |