Commit 925c9d7e authored by Mike Greiling's avatar Mike Greiling

add accept_confirm around actions which require it

parent 5f2cb53d
......@@ -77,7 +77,7 @@ describe 'Project settings > [EE] Merge Requests', :js do
expect(find('.js-current-approvers')).to have_content(group.name)
within('.js-current-approvers') do
click_on "Remove"
accept_confirm { click_on "Remove" }
end
expect(find('.js-current-approvers')).not_to have_content(group.name)
......
......@@ -98,7 +98,7 @@ feature 'Merge request approvals', :js do
visit project_new_merge_request_path(project, merge_request: { target_branch: 'master', source_branch: 'feature' })
within('.approver-list li.approver-group') do
click_on "Remove"
accept_confirm { click_on "Remove" }
end
expect(page).to have_css('.approver-list li', count: 1)
......@@ -153,7 +153,7 @@ feature 'Merge request approvals', :js do
visit edit_project_merge_request_path(project, merge_request)
within('.approver-list li.approver-group') do
click_on "Remove"
accept_confirm { click_on "Remove" }
end
expect(page).to have_css('.approver-list li', count: 1)
......
......@@ -143,7 +143,7 @@ feature 'Project mirror', :js do
expect(page).to have_content(first_key)
# Check regenerating the public key works
click_without_sidekiq 'Regenerate key'
accept_confirm { click_without_sidekiq 'Regenerate key' }
wait_for_requests
expect(page).not_to have_content(first_key)
......
......@@ -73,7 +73,7 @@ feature 'Path Locks', :js do
within '.locks' do
expect(page).to have_content('encoding')
find('.btn-remove').click
accept_confirm { find('.btn-remove').click }
expect(page).not_to have_content('encoding')
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment