Commit 599fb7ef authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add feature specs for pipeline failure reason badge

parent 123da5fb
...@@ -47,6 +47,7 @@ FactoryGirl.define do ...@@ -47,6 +47,7 @@ FactoryGirl.define do
trait :invalid do trait :invalid do
config(rspec: nil) config(rspec: nil)
failure_reason :config_error
end end
trait :blocked do trait :blocked do
......
...@@ -162,6 +162,16 @@ describe 'Pipelines', :js do ...@@ -162,6 +162,16 @@ describe 'Pipelines', :js do
expect(page).to have_selector( expect(page).to have_selector(
%Q{span[data-original-title="#{pipeline.yaml_errors}"]}) %Q{span[data-original-title="#{pipeline.yaml_errors}"]})
end end
it 'contains badge that indicates failure reason' do
expect(page).to have_content 'error'
end
it 'contains badge with tooltip which contains failure reason' do
expect(pipeline.failure_reason?).to eq true
expect(page).to have_selector(
%Q{span[data-original-title="#{pipeline.present.failure_reason}"]})
end
end end
context 'with manual actions' do context 'with manual actions' do
......
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