summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-03-26 20:47:06 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-03-26 20:47:06 +0200
commit6df1eb14fa02268f16b961d15fc43b7b03586778 (patch)
treee310111c3737852b9d8e4237563d27201d1a3d59 /spec/features
parent4b0cbf630629cf1db5285baa0880513e4dd5ca16 (diff)
downloadgitlab-ce-6df1eb14fa02268f16b961d15fc43b7b03586778.tar.gz
Use Gitlab::Ci::Status#illustration in job empty_states partial42568-pipeline-empty-state
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects/jobs_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb
index d1cee58fce5..749a1b81872 100644
--- a/spec/features/projects/jobs_spec.rb
+++ b/spec/features/projects/jobs_spec.rb
@@ -379,6 +379,7 @@ feature 'Jobs' do
end
it 'shows manual action empty state' do
+ expect(page).to have_content(job.detailed_status(user).illustration[:title])
expect(page).to have_content('This job requires a manual action')
expect(page).to have_content('This job depends on a user to trigger its process. Often they are used to deploy code to production environments')
expect(page).to have_link('Trigger this manual action')
@@ -402,6 +403,7 @@ feature 'Jobs' do
end
it 'shows empty state' do
+ expect(page).to have_content(job.detailed_status(user).illustration[:title])
expect(page).to have_content('This job has not been triggered yet')
expect(page).to have_content('This job depends on upstream jobs that need to succeed in order for this job to be triggered')
end
@@ -415,6 +417,7 @@ feature 'Jobs' do
end
it 'shows pending empty state' do
+ expect(page).to have_content(job.detailed_status(user).illustration[:title])
expect(page).to have_content('This job has not started yet')
expect(page).to have_content('This job is in pending state and is waiting to be picked by a runner')
end
@@ -441,11 +444,26 @@ feature 'Jobs' do
end
it 'renders empty state' do
+ expect(page).to have_content(job.detailed_status(user).illustration[:title])
expect(page).not_to have_selector('.js-build-output')
expect(page).to have_content('This job has been canceled')
end
end
end
+
+ context 'Skipped job' do
+ let(:job) { create(:ci_build, :skipped, pipeline: pipeline) }
+
+ before do
+ visit project_job_path(project, job)
+ end
+
+ it 'renders empty state' do
+ expect(page).to have_content(job.detailed_status(user).illustration[:title])
+ expect(page).not_to have_selector('.js-build-output')
+ expect(page).to have_content('This job has been skipped')
+ end
+ end
end
describe "POST /:project/jobs/:id/cancel", :js do