summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-16 02:33:01 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-05-05 15:01:50 +0100
commit4c0adb9ee9ee6631b7cda6562d0e20b7daab8a9e (patch)
treebc5ca0c37afcbe140cfb4bad2752e32ba35043dc /spec/features
parent992aafbc03e315b6f8fa6355ab1856934f95d758 (diff)
downloadgitlab-ce-4c0adb9ee9ee6631b7cda6562d0e20b7daab8a9e.tar.gz
Build failures summary page for pipelines
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index 5a53e48f5f8..ab7c002704d 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -254,4 +254,42 @@ describe 'Pipeline', :feature, :js do
it { expect(build_manual.reload).to be_pending }
end
end
+
+ describe 'GET /:project/pipelines/:id/failures' do
+ let(:project) { create(:project) }
+ let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) }
+ let(:pipeline_failures_page) { failures_namespace_project_pipeline_path(project.namespace, project, pipeline) }
+ let!(:failed_build) { create(:ci_build, :failed, pipeline: pipeline) }
+
+ context 'with failed build' do
+ before do
+ failed_build.trace.set('4 examples, 1 failure')
+
+ visit pipeline_failures_page
+ end
+
+ it 'shows jobs tab pane as active' do
+ expect(page).to have_css('#js-tab-failures.active')
+ end
+
+ it 'lists failed builds' do
+ expect(page).to have_content(failed_build.name)
+ expect(page).to have_content(failed_build.stage)
+ end
+
+ it 'shows build failure logs' do
+ expect(page).to have_content('4 examples, 1 failure')
+ end
+ end
+
+ context 'when missing build logs' do
+ before do
+ visit pipeline_failures_page
+ end
+
+ it 'includes failed jobs' do
+ expect(page).to have_content('No job trace')
+ end
+ end
+ end
end