Commit 5d744500 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'remove-pipeline-warnings-from-pipeline-view' into 'master'

Remove pipeline warnings from pipeline view

See merge request gitlab-org/gitlab!41419
parents 7294a17d 2bb55a99
- total_warnings = warnings.length
- message = warning_header(total_warnings)
- if warnings.any?
.bs-callout.bs-callout-warning
%details
%summary.gl-mb-2= message
- warnings.map(&:content).each do |warning|
= markdown(warning)
......@@ -19,7 +19,6 @@
- lint_link_start = '<a href="%{url}">'.html_safe % { url: lint_link_url }
= s_('You can also test your %{gitlab_ci_yml} in %{lint_link_start}CI Lint%{lint_link_end}').html_safe % { gitlab_ci_yml: '.gitlab-ci.yml', lint_link_start: lint_link_start, lint_link_end: '</a>'.html_safe }
= render "projects/pipelines/pipeline_warnings", warnings: @pipeline.warning_messages(limit: Gitlab::Ci::Warnings::MAX_LIMIT)
= render "projects/pipelines/with_tabs", pipeline: @pipeline, pipeline_has_errors: pipeline_has_errors
.js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json) } }
---
title: Remove pipeline warnings from pipeline view
merge_request: 41419
author:
type: changed
......@@ -11,7 +11,6 @@ type: reference
Pipeline configuration warnings are shown when you:
- [View pipeline details](pipelines/index.md#view-pipelines).
- [Validate configuration with the CI Lint tool](yaml/README.md#validate-the-gitlab-ciyml).
- [Manually run a pipeline](pipelines/index.md#run-a-pipeline-manually).
......
......@@ -16,24 +16,6 @@ RSpec.describe 'projects/pipelines/show' do
stub_feature_flags(new_pipeline_form: false)
end
shared_examples 'pipeline with warning messages' do
let(:warning_messages) do
[double(content: 'warning 1'), double(content: 'warning 2')]
end
before do
allow(pipeline).to receive(:warning_messages).and_return(warning_messages)
end
it 'displays the warnings' do
render
expect(rendered).to have_css('.bs-callout-warning')
expect(rendered).to have_content('warning 1')
expect(rendered).to have_content('warning 2')
end
end
context 'when pipeline has errors' do
before do
allow(pipeline).to receive(:yaml_errors).and_return('some errors')
......@@ -51,10 +33,6 @@ RSpec.describe 'projects/pipelines/show' do
expect(rendered).not_to have_css('ul.pipelines-tabs')
end
context 'when pipeline has also warnings' do
it_behaves_like 'pipeline with warning messages'
end
end
context 'when pipeline is valid' do
......@@ -69,9 +47,5 @@ RSpec.describe 'projects/pipelines/show' do
expect(rendered).to have_css('ul.pipelines-tabs')
end
context 'when pipeline has warnings' do
it_behaves_like 'pipeline with warning messages'
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment