Commit 1c73b764 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add feature spec for a new merge request with pipeline

parent 25c1f051
...@@ -84,4 +84,24 @@ feature 'Create New Merge Request', feature: true, js: true do ...@@ -84,4 +84,24 @@ feature 'Create New Merge Request', feature: true, js: true do
expect(page).not_to have_selector('#error_explanation') expect(page).not_to have_selector('#error_explanation')
expect(page).not_to have_content('The form contains the following error') expect(page).not_to have_content('The form contains the following error')
end end
context 'when a new merge request has a pipeline' do
let!(:pipeline) do
create(:ci_pipeline, sha: project.commit('fix').id,
ref: 'fix',
project: project)
end
it 'shows pipelines for a new merge request' do
visit new_namespace_project_merge_request_path(
project.namespace, project,
merge_request: { target_branch: 'master', source_branch: 'fix' })
page.within('.merge-request') do
click_link 'Pipelines'
expect(page).to have_content "##{pipeline.id}"
end
end
end
end 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