diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-07-29 07:43:10 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-07-29 07:43:10 +0000 |
commit | a5aa40c5fe93dc3daba8a578f4c09c4e443fcbec (patch) | |
tree | 34eb74d209b1919f78ce70d89ee0900cd2602780 /spec/frontend | |
parent | 946f7c0687760ec49aca582a329d0ec3c7ac3037 (diff) | |
download | gitlab-ce-a5aa40c5fe93dc3daba8a578f4c09c4e443fcbec.tar.gz |
Add Job specific variables
Adds Job specific variables to facilitate specifying variables when
running manual jobs.
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/jobs/components/empty_state_spec.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/spec/frontend/jobs/components/empty_state_spec.js b/spec/frontend/jobs/components/empty_state_spec.js index a2df79bdda0..dfba5a936ee 100644 --- a/spec/frontend/jobs/components/empty_state_spec.js +++ b/spec/frontend/jobs/components/empty_state_spec.js @@ -10,6 +10,8 @@ describe('Empty State', () => { illustrationPath: 'illustrations/pending_job_empty.svg', illustrationSizeClass: 'svg-430', title: 'This job has not started yet', + playable: false, + variablesSettingsUrl: '', }; const content = 'This job is in pending state and is waiting to be picked by a runner'; @@ -90,4 +92,44 @@ describe('Empty State', () => { expect(vm.$el.querySelector('.js-job-empty-state-action')).toBeNull(); }); }); + + describe('without playbale action', () => { + it('does not render manual variables form', () => { + vm = mountComponent(Component, { + ...props, + content, + }); + + expect(vm.$el.querySelector('.js-manual-vars-form')).toBeNull(); + }); + }); + + describe('with playbale action and not scheduled job', () => { + it('renders manual variables form', () => { + vm = mountComponent(Component, { + ...props, + content, + playable: true, + scheduled: false, + action: { + path: 'runner', + button_title: 'Check runner', + method: 'post', + }, + }); + + expect(vm.$el.querySelector('.js-manual-vars-form')).not.toBeNull(); + }); + }); + + describe('with playbale action and scheduled job', () => { + it('does not render manual variables form', () => { + vm = mountComponent(Component, { + ...props, + content, + }); + + expect(vm.$el.querySelector('.js-manual-vars-form')).toBeNull(); + }); + }); }); |