Commit 1994c032 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add test example for pipeline with yaml errors

parent 37a61896
......@@ -36,6 +36,10 @@ FactoryGirl.define do
#
pipeline.config_processor if evaluator.config
end
trait :invalid do
config(rspec: nil)
end
end
end
end
......@@ -86,6 +86,24 @@ describe 'Pipelines', :feature, :js do
end
end
context 'when pipeline has configuration errors' do
let(:pipeline) do
create(:ci_pipeline, :invalid, project: project)
end
before { visit_project_pipelines }
it 'contains badge that indicate errors' do
expect(page).to have_content 'yaml invalid'
end
it 'contains badge with tooltip which contains error' do
expect(pipeline).to have_yaml_errors
expect(page).to have_selector(
%Q{span[data-original-title="#{pipeline.yaml_errors}"]})
end
end
context 'with manual actions' do
let!(:manual) do
create(:ci_build, :manual,
......
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