diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-01 00:09:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-01 00:09:47 +0300 |
commit | 3aeda4e6146bea1920c3283e98b01ca4fcf796a8 (patch) | |
tree | b44e6298a749bd8a02283bc5867ab4a3269b62c3 /spec/javascripts | |
parent | adafb996ef88da50b30c737cdb8caee8307ec6d6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/pipelines/time_ago_spec.js | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/spec/javascripts/pipelines/time_ago_spec.js b/spec/javascripts/pipelines/time_ago_spec.js deleted file mode 100644 index 42b34c82f89..00000000000 --- a/spec/javascripts/pipelines/time_ago_spec.js +++ /dev/null @@ -1,64 +0,0 @@ -import Vue from 'vue'; -import timeAgo from '~/pipelines/components/time_ago.vue'; - -describe('Timeago component', () => { - let TimeAgo; - beforeEach(() => { - TimeAgo = Vue.extend(timeAgo); - }); - - describe('with duration', () => { - it('should render duration and timer svg', () => { - const component = new TimeAgo({ - propsData: { - duration: 10, - finishedTime: '', - }, - }).$mount(); - - expect(component.$el.querySelector('.duration')).toBeDefined(); - expect(component.$el.querySelector('.duration svg')).toBeDefined(); - }); - }); - - describe('without duration', () => { - it('should not render duration and timer svg', () => { - const component = new TimeAgo({ - propsData: { - duration: 0, - finishedTime: '', - }, - }).$mount(); - - expect(component.$el.querySelector('.duration')).toBe(null); - }); - }); - - describe('with finishedTime', () => { - it('should render time and calendar icon', () => { - const component = new TimeAgo({ - propsData: { - duration: 0, - finishedTime: '2017-04-26T12:40:23.277Z', - }, - }).$mount(); - - expect(component.$el.querySelector('.finished-at')).toBeDefined(); - expect(component.$el.querySelector('.finished-at i.fa-calendar')).toBeDefined(); - expect(component.$el.querySelector('.finished-at time')).toBeDefined(); - }); - }); - - describe('without finishedTime', () => { - it('should not render time and calendar icon', () => { - const component = new TimeAgo({ - propsData: { - duration: 0, - finishedTime: '', - }, - }).$mount(); - - expect(component.$el.querySelector('.finished-at')).toBe(null); - }); - }); -}); |