diff options
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r-- | spec/features/protected_branches_spec.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb index a4084818284..1ce341e4d8b 100644 --- a/spec/features/protected_branches_spec.rb +++ b/spec/features/protected_branches_spec.rb @@ -48,11 +48,8 @@ feature 'Protected Branches', :js do expect(page).to have_content('fix') expect(find('.all-branches')).to have_selector('li', count: 1) - page.find('[data-target="#modal-delete-branch"]').click - - expect(page).to have_css('.js-delete-branch[disabled]') - fill_in 'delete_branch_input', with: 'fix' - click_link 'Delete protected branch' + delete_protected_branch + wait_for_requests fill_in 'branch-search', with: 'fix' find('#branch-search').native.send_keys(:enter) @@ -175,4 +172,14 @@ feature 'Protected Branches', :js do find(".dropdown-input-field").set(branch_name) click_on("Create wildcard #{branch_name}") end + + def delete_protected_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 + fill_in 'delete-branch-modal-input', with: 'fix' + click_on 'Delete protected branch' + end + end end |