Commit d696194f authored by Matija Čupić's avatar Matija Čupić

Add illustrations to build statuses

parent 18bce8fc
...@@ -17,6 +17,10 @@ module Gitlab ...@@ -17,6 +17,10 @@ module Gitlab
def favicon def favicon
'favicon_status_canceled' 'favicon_status_canceled'
end end
def illustration
'canceled-job_empty'
end
end end
end end
end end
......
...@@ -22,6 +22,10 @@ module Gitlab ...@@ -22,6 +22,10 @@ module Gitlab
raise NotImplementedError raise NotImplementedError
end end
def illustration
raise NotImplementedError
end
def label def label
raise NotImplementedError raise NotImplementedError
end end
......
...@@ -17,6 +17,10 @@ module Gitlab ...@@ -17,6 +17,10 @@ module Gitlab
def favicon def favicon
'favicon_status_created' 'favicon_status_created'
end end
def illustration
'job_not_triggered'
end
end end
end end
end end
......
...@@ -17,6 +17,10 @@ module Gitlab ...@@ -17,6 +17,10 @@ module Gitlab
def favicon def favicon
'favicon_status_manual' 'favicon_status_manual'
end end
def illustration
'manual_action'
end
end end
end end
end end
......
...@@ -17,6 +17,10 @@ module Gitlab ...@@ -17,6 +17,10 @@ module Gitlab
def favicon def favicon
'favicon_status_pending' 'favicon_status_pending'
end end
def illustration
'pending_job_empty'
end
end end
end end
end end
......
...@@ -17,6 +17,10 @@ module Gitlab ...@@ -17,6 +17,10 @@ module Gitlab
def favicon def favicon
'favicon_status_skipped' 'favicon_status_skipped'
end end
def illustration
'skipped-job_empty'
end
end end
end end
end end
......
...@@ -115,6 +115,7 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -115,6 +115,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.text).to eq 'canceled' expect(status.text).to eq 'canceled'
expect(status.icon).to eq 'status_canceled' expect(status.icon).to eq 'status_canceled'
expect(status.favicon).to eq 'favicon_status_canceled' expect(status.favicon).to eq 'favicon_status_canceled'
expect(status.illustration).to eq 'canceled-job_empty'
expect(status.label).to eq 'canceled' expect(status.label).to eq 'canceled'
expect(status).to have_details expect(status).to have_details
expect(status).to have_action expect(status).to have_action
...@@ -167,6 +168,7 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -167,6 +168,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.text).to eq 'pending' expect(status.text).to eq 'pending'
expect(status.icon).to eq 'status_pending' expect(status.icon).to eq 'status_pending'
expect(status.favicon).to eq 'favicon_status_pending' expect(status.favicon).to eq 'favicon_status_pending'
expect(status.illustration).to eq 'pending_job_empty'
expect(status.label).to eq 'pending' expect(status.label).to eq 'pending'
expect(status).to have_details expect(status).to have_details
expect(status).to have_action expect(status).to have_action
...@@ -192,6 +194,7 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -192,6 +194,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.text).to eq 'skipped' expect(status.text).to eq 'skipped'
expect(status.icon).to eq 'status_skipped' expect(status.icon).to eq 'status_skipped'
expect(status.favicon).to eq 'favicon_status_skipped' expect(status.favicon).to eq 'favicon_status_skipped'
expect(status.illustration).to eq 'skipped-job_empty'
expect(status.label).to eq 'skipped' expect(status.label).to eq 'skipped'
expect(status).to have_details expect(status).to have_details
expect(status).not_to have_action expect(status).not_to have_action
...@@ -221,6 +224,7 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -221,6 +224,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.group).to eq 'manual' expect(status.group).to eq 'manual'
expect(status.icon).to eq 'status_manual' expect(status.icon).to eq 'status_manual'
expect(status.favicon).to eq 'favicon_status_manual' expect(status.favicon).to eq 'favicon_status_manual'
expect(status.illustration).to eq 'manual_action'
expect(status.label).to include 'manual play action' expect(status.label).to include 'manual play action'
expect(status).to have_details expect(status).to have_details
expect(status.action_path).to include 'play' expect(status.action_path).to include 'play'
......
...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Canceled do ...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Canceled do
it { expect(subject.favicon).to eq 'favicon_status_canceled' } it { expect(subject.favicon).to eq 'favicon_status_canceled' }
end end
describe '#illustration' do
it { expect(subject.illustration).to eq 'canceled-job_empty' }
end
describe '#group' do describe '#group' do
it { expect(subject.group).to eq 'canceled' } it { expect(subject.group).to eq 'canceled' }
end end
......
...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Created do ...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Created do
it { expect(subject.favicon).to eq 'favicon_status_created' } it { expect(subject.favicon).to eq 'favicon_status_created' }
end end
describe '#illustration' do
it { expect(subject.illustration).to eq 'job_not_triggered' }
end
describe '#group' do describe '#group' do
it { expect(subject.group).to eq 'created' } it { expect(subject.group).to eq 'created' }
end end
......
...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Manual do ...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Manual do
it { expect(subject.favicon).to eq 'favicon_status_manual' } it { expect(subject.favicon).to eq 'favicon_status_manual' }
end end
describe '#illustration' do
it { expect(subject.illustration).to eq 'manual_action' }
end
describe '#group' do describe '#group' do
it { expect(subject.group).to eq 'manual' } it { expect(subject.group).to eq 'manual' }
end end
......
...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Pending do ...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Pending do
it { expect(subject.favicon).to eq 'favicon_status_pending' } it { expect(subject.favicon).to eq 'favicon_status_pending' }
end end
describe '#illustration' do
it { expect(subject.illustration).to eq 'pending_job_empty' }
end
describe '#group' do describe '#group' do
it { expect(subject.group).to eq 'pending' } it { expect(subject.group).to eq 'pending' }
end end
......
...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Skipped do ...@@ -21,6 +21,10 @@ describe Gitlab::Ci::Status::Skipped do
it { expect(subject.favicon).to eq 'favicon_status_skipped' } it { expect(subject.favicon).to eq 'favicon_status_skipped' }
end end
describe '#illustration' do
it { expect(subject.illustration).to eq 'skipped-job_empty' }
end
describe '#group' do describe '#group' do
it { expect(subject.group).to eq 'skipped' } it { expect(subject.group).to eq 'skipped' }
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