diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-16 12:07:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-16 12:07:42 +0000 |
commit | 6d4ce68742e8decbfca5a1b382ce260790e8c396 (patch) | |
tree | 148d261da58065998137fd140a6a55f62f4798df /spec/frontend/jira_connect | |
parent | 9c149f7026664e988e69dae31121e6ccc810c6e8 (diff) | |
download | gitlab-ce-6d4ce68742e8decbfca5a1b382ce260790e8c396.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/jira_connect')
-rw-r--r-- | spec/frontend/jira_connect/subscriptions/components/compatibility_alert_spec.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/spec/frontend/jira_connect/subscriptions/components/compatibility_alert_spec.js b/spec/frontend/jira_connect/subscriptions/components/compatibility_alert_spec.js deleted file mode 100644 index 5f38a0acb9d..00000000000 --- a/spec/frontend/jira_connect/subscriptions/components/compatibility_alert_spec.js +++ /dev/null @@ -1,56 +0,0 @@ -import { GlAlert, GlLink } from '@gitlab/ui'; -import { shallowMount, mount } from '@vue/test-utils'; -import CompatibilityAlert from '~/jira_connect/subscriptions/components/compatibility_alert.vue'; - -import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue'; - -describe('CompatibilityAlert', () => { - let wrapper; - - const createComponent = ({ mountFn = shallowMount } = {}) => { - wrapper = mountFn(CompatibilityAlert); - }; - - const findAlert = () => wrapper.findComponent(GlAlert); - const findLink = () => wrapper.findComponent(GlLink); - const findLocalStorageSync = () => wrapper.findComponent(LocalStorageSync); - - afterEach(() => { - wrapper.destroy(); - }); - - it('displays an alert', () => { - createComponent(); - - expect(findAlert().exists()).toBe(true); - }); - - it('renders help link with target="_blank" and rel="noopener noreferrer"', () => { - createComponent({ mountFn: mount }); - expect(findLink().attributes()).toMatchObject({ - target: '_blank', - rel: 'noopener', - }); - }); - - it('`local-storage-sync` value prop is initially false', () => { - createComponent(); - - expect(findLocalStorageSync().props('value')).toBe(false); - }); - - describe('when dismissed', () => { - beforeEach(async () => { - createComponent(); - await findAlert().vm.$emit('dismiss'); - }); - - it('hides alert', () => { - expect(findAlert().exists()).toBe(false); - }); - - it('updates value prop of `local-storage-sync`', () => { - expect(findLocalStorageSync().props('value')).toBe(true); - }); - }); -}); |