page.shouldhave_content('Sorry, we cannot revert this merge request automatically.')
end
step'I revert the changes in a new merge request'do
page.within('#modal-revert-commit')do
click_button'Revert'
end
end
step'I should see the new merge request notice'do
page.shouldhave_content('The merge request has been successfully reverted. You can now submit a merge request to get this change into the original branch.')
expect(page).tohave_content('The merge request has been successfully reverted.')
wait_for_requests
end
it'does not revert a merge request that was previously reverted'do
find("a[href='#modal-revert-commit']").click
page.within('#modal-revert-commit')do
uncheck('create_merge_request')
click_button('Revert')
end
find("a[href='#modal-revert-commit']").click
page.within('#modal-revert-commit')do
uncheck('create_merge_request')
click_button('Revert')
end
expect(page).tohave_content('Sorry, we cannot revert this merge request automatically.')
end
it'reverts a merge request in a new merge request'do
find("a[href='#modal-revert-commit']").click
page.within('#modal-revert-commit')do
click_button('Revert')
end
expect(page).tohave_content('The merge request has been successfully reverted. You can now submit a merge request to get this change into the original branch.')