Skip to content
Snippets Groups Projects
Commit 1994c032 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Add test example for pipeline with yaml errors

parent 37a61896
No related branches found
No related tags found
No related merge requests found
Loading
@@ -36,6 +36,10 @@ FactoryGirl.define do
Loading
@@ -36,6 +36,10 @@ FactoryGirl.define do
# #
pipeline.config_processor if evaluator.config pipeline.config_processor if evaluator.config
end end
trait :invalid do
config(rspec: nil)
end
end end
end end
end end
Loading
@@ -86,6 +86,24 @@ describe 'Pipelines', :feature, :js do
Loading
@@ -86,6 +86,24 @@ describe 'Pipelines', :feature, :js do
end end
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 context 'with manual actions' do
let!(:manual) do let!(:manual) do
create(:ci_build, :manual, create(:ci_build, :manual,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment