diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-05-04 17:50:09 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-05-05 15:41:36 +0100 |
commit | acd9cd0906046f3d11d95aa9dc9d1af0498ef2ef (patch) | |
tree | 72b9ec12960971bf9412a780539956b5d1ead8d9 /spec/features/projects/pipelines | |
parent | 4c0adb9ee9ee6631b7cda6562d0e20b7daab8a9e (diff) | |
download | gitlab-ce-acd9cd0906046f3d11d95aa9dc9d1af0498ef2ef.tar.gz |
Hides pipeline ‘Failed Jobs’ tab when no jobs have failed
Diffstat (limited to 'spec/features/projects/pipelines')
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index ab7c002704d..cfac54ef259 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -269,6 +269,7 @@ describe 'Pipeline', :feature, :js do end it 'shows jobs tab pane as active' do + expect(page).to have_content('Failed Jobs') expect(page).to have_css('#js-tab-failures.active') end @@ -291,5 +292,19 @@ describe 'Pipeline', :feature, :js do expect(page).to have_content('No job trace') end end + + context 'without failures' do + before do + failed_build.update!(status: :success) + + visit pipeline_failures_page + end + + it 'displays the pipeline graph' do + expect(current_path).to eq(pipeline_path(pipeline)) + expect(page).not_to have_content('Failed Jobs') + expect(page).to have_selector('.pipeline-visualization') + end + end end end |