diff options
Diffstat (limited to 'spec/features/projects/branches_spec.rb')
-rw-r--r-- | spec/features/projects/branches_spec.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb index 2fddd274078..375da8d4b3c 100644 --- a/spec/features/projects/branches_spec.rb +++ b/spec/features/projects/branches_spec.rb @@ -67,10 +67,11 @@ describe 'Branches' do expect(page).to have_content('fix') expect(find('.all-branches')).to have_selector('li', count: 1) - accept_confirm { find('.js-branch-fix .btn-remove').click } - expect(page).not_to have_content('fix') - expect(find('.all-branches')).to have_selector('li', count: 0) + delete_branch + wait_for_requests + + expect(all('li .ref-name', text: 'fix').count).to eq 0 end end end @@ -110,4 +111,13 @@ describe 'Branches' do Regexp.new(sorted_branches.join('.*')) end + + def delete_branch + find('#delete-branch-modal.modal', visible: false) # wait for Vue component to be loaded + find(".js-delete-branch").click + + page.within '#delete-branch-modal' do + click_on 'Delete branch' + end + end end |