summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-23 14:17:26 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-25 10:41:32 +0100
commit287c6ed149991fcb74ee2088c1dcb7beadefc7bf (patch)
treed6365e54124838eb27cc699cf8f69f618932224c
parent2e67da65f11db467feeee9154829e788d58247eb (diff)
downloadgitlab-ce-287c6ed149991fcb74ee2088c1dcb7beadefc7bf.tar.gz
Add basic feature specs for cross-project bridges
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index 3192c9ffad4..72ef460d315 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -286,6 +286,49 @@ describe 'Pipeline', :js do
end
end
+ context 'when a bridge job exists' do
+ include_context 'pipeline builds'
+
+ let(:project) { create(:project, :repository) }
+ let(:downstream) { create(:project, :repository) }
+
+ let(:pipeline) do
+ create(:ci_pipeline, project: project,
+ ref: 'master',
+ sha: project.commit.id,
+ user: user)
+ end
+
+ let!(:bridge) do
+ create(:ci_bridge, pipeline: pipeline,
+ name: 'cross-build',
+ user: user,
+ downstream: downstream)
+ end
+
+ describe 'GET /:project/pipelines/:id' do
+ before do
+ visit project_pipeline_path(project, pipeline)
+ end
+
+ it 'shows the pipeline with a bridge job' do
+ expect(page).to have_selector('.pipeline-visualization')
+ expect(page).to have_content('cross-build')
+ end
+ end
+
+ describe 'GET /:project/pipelines/:id/builds' do
+ before do
+ visit builds_project_pipeline_path(project, pipeline)
+ end
+
+ it 'shows a bridge job on a list' do
+ expect(page).to have_content('cross-build')
+ expect(page).to have_content(bridge.id)
+ end
+ end
+ end
+
describe 'GET /:project/pipelines/:id/builds' do
include_context 'pipeline builds'