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

Extend Gitlab::Ci::Status#illustration to include metadata

parent d696194f
......@@ -19,7 +19,11 @@ module Gitlab
end
def illustration
'canceled-job_empty'
{
image: 'illustrations/canceled-job_empty.svg',
size: 'svg-430',
title: _('This job has been canceled')
}
end
end
end
......
......@@ -19,7 +19,12 @@ module Gitlab
end
def illustration
'job_not_triggered'
{
image: 'illustrations/job_not_triggered.svg',
size: 'svg-306',
title: _('This job has not been triggered yet'),
content: _('This job depends on upstream jobs that need to succeed in order for this job to be triggered')
}
end
end
end
......
......@@ -19,7 +19,12 @@ module Gitlab
end
def illustration
'manual_action'
{
image: 'illustrations/manual_action.svg',
size: 'svg-394',
title: _('This job requires a manual action'),
content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments')
}
end
end
end
......
......@@ -19,7 +19,12 @@ module Gitlab
end
def illustration
'pending_job_empty'
{
image: 'illustrations/pending_job_empty.svg',
size: 'svg-430',
title: _('This job has not started yet'),
content: _('This job is in pending state and is waiting to be picked by a runner')
}
end
end
end
......
......@@ -19,7 +19,11 @@ module Gitlab
end
def illustration
'skipped-job_empty'
{
image: 'illustrations/skipped-job_empty.svg',
size: 'svg-430',
title: _('This job has been skipped')
}
end
end
end
......
......@@ -115,7 +115,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.text).to eq 'canceled'
expect(status.icon).to eq 'status_canceled'
expect(status.favicon).to eq 'favicon_status_canceled'
expect(status.illustration).to eq 'canceled-job_empty'
expect(status.illustration).to include(:image, :size, :title)
expect(status.label).to eq 'canceled'
expect(status).to have_details
expect(status).to have_action
......@@ -168,7 +168,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.text).to eq 'pending'
expect(status.icon).to eq 'status_pending'
expect(status.favicon).to eq 'favicon_status_pending'
expect(status.illustration).to eq 'pending_job_empty'
expect(status.illustration).to include(:image, :size, :title, :content)
expect(status.label).to eq 'pending'
expect(status).to have_details
expect(status).to have_action
......@@ -194,7 +194,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.text).to eq 'skipped'
expect(status.icon).to eq 'status_skipped'
expect(status.favicon).to eq 'favicon_status_skipped'
expect(status.illustration).to eq 'skipped-job_empty'
expect(status.illustration).to include(:image, :size, :title)
expect(status.label).to eq 'skipped'
expect(status).to have_details
expect(status).not_to have_action
......@@ -224,7 +224,7 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.group).to eq 'manual'
expect(status.icon).to eq 'status_manual'
expect(status.favicon).to eq 'favicon_status_manual'
expect(status.illustration).to eq 'manual_action'
expect(status.illustration).to include(:image, :size, :title, :content)
expect(status.label).to include 'manual play action'
expect(status).to have_details
expect(status.action_path).to include 'play'
......
......@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Canceled do
end
describe '#illustration' do
it { expect(subject.illustration).to eq 'canceled-job_empty' }
it { expect(subject.illustration).to include(:image, :size, :title) }
end
describe '#group' do
......
......@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Created do
end
describe '#illustration' do
it { expect(subject.illustration).to eq 'job_not_triggered' }
it { expect(subject.illustration).to include(:image, :size, :title, :content) }
end
describe '#group' do
......
......@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Manual do
end
describe '#illustration' do
it { expect(subject.illustration).to eq 'manual_action' }
it { expect(subject.illustration).to include(:image, :size, :title, :content) }
end
describe '#group' do
......
......@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Pending do
end
describe '#illustration' do
it { expect(subject.illustration).to eq 'pending_job_empty' }
it { expect(subject.illustration).to include(:image, :size, :title, :content) }
end
describe '#group' do
......
......@@ -22,7 +22,7 @@ describe Gitlab::Ci::Status::Skipped do
end
describe '#illustration' do
it { expect(subject.illustration).to eq 'skipped-job_empty' }
it { expect(subject.illustration).to include(:image, :size, :title) }
end
describe '#group' 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