Add feature spec for a new merge request with pipeline
This commit is contained in:
parent
25c1f05103
commit
1c73b764b8
1 changed files with 20 additions and 0 deletions
|
@ -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_content('The form contains the following error')
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue