expect(page).tohave_content('Sorry, we cannot revert this commit automatically.')
expect(page).tohave_content('Sorry, we cannot revert this commit automatically.')
end
end
end
end
context'with creating a new merge request'do
context'with creating a new merge request'do
beforedo
click_revert
end
it'reverts a commit'do
it'reverts a commit'do
page.within('#modal-revert-commit')do
revert_commit(create_merge_request: true)
click_button('Revert')
end
expect(page).tohave_content('The commit has been successfully reverted. You can now submit a merge request to get this change into the original branch.')
expect(page).tohave_content('The commit has been successfully reverted. You can now submit a merge request to get this change into the original branch.')
expect(page).tohave_content("From revert-#{Commit.truncate_sha(sample_commit.id)} into master")
expect(page).tohave_content("From revert-#{Commit.truncate_sha(sample_commit.id)} into master")