diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-24 18:08:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-24 18:08:28 +0300 |
commit | 8e1bb8745bafe36f273ce4a095c3576c38ceb8b4 (patch) | |
tree | ec27d8dc078480009afe783f7bea87d3927f28f1 /spec/frontend | |
parent | 4b4c254b2cfaca26c2c8e2bda70d45c13e3a6f97 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
4 files changed, 20 insertions, 34 deletions
diff --git a/spec/frontend/ide/components/ide_status_bar_spec.js b/spec/frontend/ide/components/ide_status_bar_spec.js index 00ef75fcf3a..17a5aa17b1f 100644 --- a/spec/frontend/ide/components/ide_status_bar_spec.js +++ b/spec/frontend/ide/components/ide_status_bar_spec.js @@ -11,6 +11,8 @@ const TEST_PROJECT_ID = 'abcproject'; const TEST_MERGE_REQUEST_ID = '9001'; const TEST_MERGE_REQUEST_URL = `${TEST_HOST}merge-requests/${TEST_MERGE_REQUEST_ID}`; +jest.mock('~/lib/utils/poll'); + describe('ideStatusBar', () => { let store; let vm; diff --git a/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js b/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js index b4c5d4f9957..fa91f8de45a 100644 --- a/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js +++ b/spec/frontend/integrations/edit/components/jira_issues_fields_spec.js @@ -11,7 +11,6 @@ describe('JiraIssuesFields', () => { const defaultProps = { showJiraVulnerabilitiesIntegration: true, - upgradePlanPath: 'https://gitlab.com', }; const createComponent = ({ diff --git a/spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js b/spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js deleted file mode 100644 index e90e9a5d2ac..00000000000 --- a/spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js +++ /dev/null @@ -1,31 +0,0 @@ -import { shallowMount } from '@vue/test-utils'; - -import JiraUpgradeCta from '~/integrations/edit/components/jira_upgrade_cta.vue'; - -describe('JiraUpgradeCta', () => { - let wrapper; - - const contentMessage = 'Upgrade your plan to enable this feature of the Jira Integration.'; - - const createComponent = (propsData) => { - wrapper = shallowMount(JiraUpgradeCta, { - propsData, - }); - }; - - afterEach(() => { - wrapper.destroy(); - }); - - it('displays the correct message for premium and lower users', () => { - createComponent({ showPremiumMessage: true }); - expect(wrapper.text()).toContain('This is a Premium feature'); - expect(wrapper.text()).toContain(contentMessage); - }); - - it('displays the correct message for ultimate and lower users', () => { - createComponent({ showUltimateMessage: true }); - expect(wrapper.text()).toContain('This is an Ultimate feature'); - expect(wrapper.text()).toContain(contentMessage); - }); -}); diff --git a/spec/frontend/invite_members/components/invite_members_trigger_spec.js b/spec/frontend/invite_members/components/invite_members_trigger_spec.js index 28402c8331c..c522abe63c5 100644 --- a/spec/frontend/invite_members/components/invite_members_trigger_spec.js +++ b/spec/frontend/invite_members/components/invite_members_trigger_spec.js @@ -2,7 +2,11 @@ import { GlButton, GlLink, GlIcon } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import InviteMembersTrigger from '~/invite_members/components/invite_members_trigger.vue'; import eventHub from '~/invite_members/event_hub'; -import { TRIGGER_ELEMENT_BUTTON, TRIGGER_ELEMENT_SIDE_NAV } from '~/invite_members/constants'; +import { + TRIGGER_ELEMENT_BUTTON, + TRIGGER_ELEMENT_SIDE_NAV, + TRIGGER_DEFAULT_QA_SELECTOR, +} from '~/invite_members/constants'; jest.mock('~/experimentation/experiment_tracking'); @@ -50,12 +54,24 @@ describe.each(triggerItems)('with triggerElement as %s', (triggerItem) => { wrapper.destroy(); }); - describe('displayText', () => { + describe('configurable attributes', () => { it('includes the correct displayText for the button', () => { createComponent(); expect(findButton().text()).toBe(displayText); }); + + it('uses the default qa selector value', () => { + createComponent(); + + expect(findButton().attributes('data-qa-selector')).toBe(TRIGGER_DEFAULT_QA_SELECTOR); + }); + + it('sets the qa selector value', () => { + createComponent({ qaSelector: '_qaSelector_' }); + + expect(findButton().attributes('data-qa-selector')).toBe('_qaSelector_'); + }); }); describe('clicking the link', () => { |