diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/features/projects/environments/environment_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/features/projects/environments/environment_spec.rb')
-rw-r--r-- | spec/features/projects/environments/environment_spec.rb | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/spec/features/projects/environments/environment_spec.rb b/spec/features/projects/environments/environment_spec.rb index 1d7be7fa7a3..fea054de64e 100644 --- a/spec/features/projects/environments/environment_spec.rb +++ b/spec/features/projects/environments/environment_spec.rb @@ -329,11 +329,11 @@ RSpec.describe 'Environment' do expect(page).to have_button('Stop') end - it 'user deletes the branch with running environment' do + it 'user deletes the branch with running environment', :js do visit project_branches_filtered_path(project, state: 'all', search: 'feature') remove_branch_with_hooks(project, user, 'feature') do - page.within('.js-branch-feature') { find('a.btn-danger').click } + page.within('.js-branch-feature') { find('.js-delete-branch-button').click } end visit_environment(environment) @@ -341,6 +341,24 @@ RSpec.describe 'Environment' do expect(page).not_to have_button('Stop') end + context 'when the feature flag :delete_branch_confirmation_modals is disabled' do + before do + stub_feature_flags(delete_branch_confirmation_modals: false) + end + + it 'user deletes the branch with running environment' do + visit project_branches_filtered_path(project, state: 'all', search: 'feature') + + remove_branch_with_hooks(project, user, 'feature') do + within('.js-branch-feature') { click_link(title: 'Delete branch') } + end + + visit_environment(environment) + + expect(page).not_to have_button('Stop') + end + end + ## # This is a workaround for problem described in #24543 # |