diff options
Diffstat (limited to 'spec/javascripts/cycle_analytics/banner_spec.js')
-rw-r--r-- | spec/javascripts/cycle_analytics/banner_spec.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/javascripts/cycle_analytics/banner_spec.js b/spec/javascripts/cycle_analytics/banner_spec.js deleted file mode 100644 index 06fbaa68ffc..00000000000 --- a/spec/javascripts/cycle_analytics/banner_spec.js +++ /dev/null @@ -1,45 +0,0 @@ -import Vue from 'vue'; -import mountComponent from 'spec/helpers/vue_mount_component_helper'; -import banner from '~/cycle_analytics/components/banner.vue'; - -describe('Cycle analytics banner', () => { - let vm; - - beforeEach(() => { - const Component = Vue.extend(banner); - vm = mountComponent(Component, { - documentationLink: 'path', - }); - }); - - afterEach(() => { - vm.$destroy(); - }); - - it('should render value stream analytics information', () => { - expect(vm.$el.querySelector('h4').textContent.trim()).toEqual( - 'Introducing Value Stream Analytics', - ); - - expect( - vm.$el - .querySelector('p') - .textContent.trim() - .replace(/[\r\n]+/g, ' '), - ).toContain( - 'Value Stream Analytics gives an overview of how much time it takes to go from idea to production in your project.', - ); - - expect(vm.$el.querySelector('a').textContent.trim()).toEqual('Read more'); - - expect(vm.$el.querySelector('a').getAttribute('href')).toEqual('path'); - }); - - it('should emit an event when close button is clicked', () => { - spyOn(vm, '$emit'); - - vm.$el.querySelector('.js-ca-dismiss-button').click(); - - expect(vm.$emit).toHaveBeenCalled(); - }); -}); |