diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-04 14:48:24 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-04 14:48:24 +0300 |
commit | 1994c0323af72ff9b3667f5d9f45a99ae09986d4 (patch) | |
tree | 6472faf851c6d9c1c3fe061b17b8eb68e96e9357 /spec/features/projects/pipelines/pipelines_spec.rb | |
parent | 37a618961a73a099a90e43bb78a67205b117c8a3 (diff) |
Add test example for pipeline with yaml errors
Diffstat (limited to 'spec/features/projects/pipelines/pipelines_spec.rb')
-rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 574efe351f5..cfc74c140dd 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -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, |