summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-12-05 18:00:52 +0900
committerShinya Maeda <shinya@gitlab.com>2017-12-05 18:00:52 +0900
commited0f6b3ab15f0e3a69bb102035c3272a5d10d1ba (patch)
treee081bffd55ead22e865287c7bb76050bcc2bc8ed /spec/features
parent216173d18fd19e13503f145da3ef74f1a7da7b8b (diff)
parent61392168a0265e6c54cbccc6b7529822b123ff5b (diff)
downloadgitlab-ce-ed0f6b3ab15f0e3a69bb102035c3272a5d10d1ba.tar.gz
Merge branch 'master' into 35616-move-k8-to-cluster-page
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index b8fa1a54c24..888e290292b 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -185,6 +185,36 @@ describe 'Pipeline', :js do
end
end
+ context 'when user does not have access to read jobs' do
+ before do
+ project.update(public_builds: false)
+ end
+
+ describe 'GET /:project/pipelines/:id' do
+ include_context 'pipeline builds'
+
+ let(:project) { create(:project, :repository) }
+ let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id, user: user) }
+
+ before do
+ visit project_pipeline_path(project, pipeline)
+ end
+
+ it 'shows the pipeline graph' do
+ expect(page).to have_selector('.pipeline-visualization')
+ expect(page).to have_content('Build')
+ expect(page).to have_content('Test')
+ expect(page).to have_content('Deploy')
+ expect(page).to have_content('Retry')
+ expect(page).to have_content('Cancel running')
+ end
+
+ it 'should not link to job' do
+ expect(page).not_to have_selector('.js-pipeline-graph-job-link')
+ end
+ end
+ end
+
describe 'GET /:project/pipelines/:id/builds' do
include_context 'pipeline builds'