diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-11-05 13:22:25 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-11-05 17:16:29 +0000 |
commit | 00c7d78d49ab94f963e1e6b0bb0428b395aa036a (patch) | |
tree | f47cf4df964198346333aab6f597f6abbe4cf2bf /spec/javascripts/jobs | |
parent | 3eb57ceccd3b75c34993c77e329f7f08000f118f (diff) | |
download | gitlab-ce-00c7d78d49ab94f963e1e6b0bb0428b395aa036a.tar.gz |
[ci skip] Renders a warning block for archieved job
When the job is archieved we render a affixed warning
on the top of the job log
Diffstat (limited to 'spec/javascripts/jobs')
-rw-r--r-- | spec/javascripts/jobs/components/job_app_spec.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/javascripts/jobs/components/job_app_spec.js b/spec/javascripts/jobs/components/job_app_spec.js index ba1889c4dcd..f8ca43fc150 100644 --- a/spec/javascripts/jobs/components/job_app_spec.js +++ b/spec/javascripts/jobs/components/job_app_spec.js @@ -423,6 +423,40 @@ describe('Job App ', () => { }); }); + describe('archived job', () => { + beforeEach(() => { + mock.onGet(props.endpoint).reply(200, Object.assign({}, job, { archived: true }), {}); + vm = mountComponentWithStore(Component, { + props, + store, + }); + }); + + it('renders warning about job being archived', done => { + setTimeout(() => { + expect(vm.$el.querySelector('.js-archived-job ')).not.toBeNull(); + done(); + }, 0); + }); + }); + + describe('non-archived job', () => { + beforeEach(() => { + mock.onGet(props.endpoint).reply(200, job, {}); + vm = mountComponentWithStore(Component, { + props, + store, + }); + }); + + it('does not warning about job being archived', done => { + setTimeout(() => { + expect(vm.$el.querySelector('.js-archived-job ')).toBeNull(); + done(); + }, 0); + }); + }); + describe('trace output', () => { beforeEach(() => { mock.onGet(props.endpoint).reply(200, job, {}); |