diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 15:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 15:07:51 +0000 |
commit | 4e9acbfba3682c552b3de707c535e6257ef41054 (patch) | |
tree | 8b1fd5f89ad3f1be68d8944815b13bb7d498e4a6 /spec/features | |
parent | 506d6dcd7c787ba71a8a53102f3d4fdb6adcfa5e (diff) | |
download | gitlab-ce-4e9acbfba3682c552b3de707c535e6257ef41054.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/settings/repository_settings_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/features/projects/settings/repository_settings_spec.rb b/spec/features/projects/settings/repository_settings_spec.rb index 9b956dee089..28a238a5423 100644 --- a/spec/features/projects/settings/repository_settings_spec.rb +++ b/spec/features/projects/settings/repository_settings_spec.rb @@ -72,6 +72,21 @@ describe 'Projects > Settings > Repository settings' do expect(project.remote_mirrors.first.only_protected_branches).to eq(true) end + it 'creates a push mirror that keeps divergent refs', :js do + select_direction + + fill_in 'url', with: 'ssh://user@localhost/project.git' + fill_in 'Password', with: 'password' + check 'Keep divergent refs' + + Sidekiq::Testing.fake! do + click_button 'Mirror repository' + end + + expect(page).to have_content('Mirroring settings were successfully updated') + expect(project.reload.remote_mirrors.first.keep_divergent_refs).to eq(true) + end + it 'generates an SSH public key on submission', :js do fill_in 'url', with: 'ssh://user@localhost/project.git' select 'SSH public key', from: 'Authentication method' @@ -110,6 +125,20 @@ describe 'Projects > Settings > Repository settings' do end end + # Removal: https://gitlab.com/gitlab-org/gitlab/-/issues/208828 + context 'with the `keep_divergent_refs` feature flag disabled' do + before do + stub_feature_flags(keep_divergent_refs: { enabled: false, thing: project }) + end + + it 'hides the "Keep divergent refs" option' do + visit project_settings_repository_path(project) + + expect(page).not_to have_selector('#keep_divergent_refs') + expect(page).not_to have_text('Keep divergent refs') + end + end + context 'repository cleanup settings' do let(:object_map_file) { Rails.root.join('spec', 'fixtures', 'bfg_object_map.txt') } |