diff options
Diffstat (limited to 'spec/frontend/vue_shared/components/alerts_deprecation_warning_spec.js')
-rw-r--r-- | spec/frontend/vue_shared/components/alerts_deprecation_warning_spec.js | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/spec/frontend/vue_shared/components/alerts_deprecation_warning_spec.js b/spec/frontend/vue_shared/components/alerts_deprecation_warning_spec.js deleted file mode 100644 index b73f4d6a396..00000000000 --- a/spec/frontend/vue_shared/components/alerts_deprecation_warning_spec.js +++ /dev/null @@ -1,48 +0,0 @@ -import { GlAlert, GlLink } from '@gitlab/ui'; -import { mount } from '@vue/test-utils'; -import AlertDeprecationWarning from '~/vue_shared/components/alerts_deprecation_warning.vue'; - -describe('AlertDetails', () => { - let wrapper; - - function mountComponent(hasManagedPrometheus = false) { - wrapper = mount(AlertDeprecationWarning, { - provide: { - hasManagedPrometheus, - }, - }); - } - - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - - const findAlert = () => wrapper.findComponent(GlAlert); - const findLink = () => wrapper.findComponent(GlLink); - - describe('Alert details', () => { - describe('with no manual prometheus', () => { - beforeEach(() => { - mountComponent(); - }); - - it('renders nothing', () => { - expect(findAlert().exists()).toBe(false); - }); - }); - - describe('with manual prometheus', () => { - beforeEach(() => { - mountComponent(true); - }); - - it('renders a deprecation notice', () => { - expect(findAlert().text()).toContain('GitLab-managed Prometheus is deprecated'); - expect(findLink().attributes('href')).toContain( - 'operations/metrics/alerts.html#managed-prometheus-instances', - ); - }); - }); - }); -}); |