diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
commit | 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch) | |
tree | 865198c01d1824a9b098127baa3ab980c9cd2c06 /spec/features/projects/user_creates_project_spec.rb | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'spec/features/projects/user_creates_project_spec.rb')
-rw-r--r-- | spec/features/projects/user_creates_project_spec.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/features/projects/user_creates_project_spec.rb b/spec/features/projects/user_creates_project_spec.rb index 484808dcfd1..a590d637801 100644 --- a/spec/features/projects/user_creates_project_spec.rb +++ b/spec/features/projects/user_creates_project_spec.rb @@ -55,6 +55,45 @@ RSpec.describe 'User creates a project', :js, feature_category: :groups_and_proj expect(page).to have_content('README.md Initial commit') end + context 'when creating a project with SHA256 repository' do + let(:sha256_field) { 'Use SHA-256 as the repository hashing algorithm' } + + it 'creates a new project' do + visit(new_project_path) + + click_link 'Create blank project' + fill_in(:project_name, with: 'With initial commits') + + expect(page).to have_checked_field 'Initialize repository with a README' + expect(page).to have_unchecked_field sha256_field + + check sha256_field + + page.within('#content-body') do + click_button('Create project') + end + + project = Project.last + + expect(page).to have_current_path(project_path(project), ignore_query: true) + expect(page).to have_content('With initial commits') + end + + context 'when "support_sha256_repositories" feature flag is disabled' do + before do + stub_feature_flags(support_sha256_repositories: false) + end + + it 'does not display a SHA256 option' do + visit(new_project_path) + + click_link 'Create blank project' + + expect(page).not_to have_content(sha256_field) + end + end + end + context 'in a subgroup they do not own' do let(:parent) { create(:group) } let!(:subgroup) { create(:group, parent: parent) } |