diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-03 00:10:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-03 00:10:29 +0300 |
commit | fecb8ece925c48cf64969f1ecced12e4c4497706 (patch) | |
tree | a25112ce0985b27a390721109354fd89effa9b83 /spec/frontend/invite_members/components | |
parent | eed7260f13c0a3139876e3659603f3d803e8fcd7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/invite_members/components')
-rw-r--r-- | spec/frontend/invite_members/components/invite_members_trigger_spec.js | 13 | ||||
-rw-r--r-- | spec/frontend/invite_members/components/invite_modal_base_spec.js | 1 |
2 files changed, 14 insertions, 0 deletions
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 f14d24538d8..58c40a49b3c 100644 --- a/spec/frontend/invite_members/components/invite_members_trigger_spec.js +++ b/spec/frontend/invite_members/components/invite_members_trigger_spec.js @@ -4,6 +4,7 @@ import InviteMembersTrigger from '~/invite_members/components/invite_members_tri import eventHub from '~/invite_members/event_hub'; import { TRIGGER_ELEMENT_BUTTON, + TRIGGER_DEFAULT_QA_SELECTOR, TRIGGER_ELEMENT_WITH_EMOJI, TRIGGER_ELEMENT_DROPDOWN_WITH_EMOJI, TRIGGER_ELEMENT_DISCLOSURE_DROPDOWN, @@ -65,6 +66,18 @@ describe.each(triggerItems)('with triggerElement as %s', (triggerItem) => { 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', () => { diff --git a/spec/frontend/invite_members/components/invite_modal_base_spec.js b/spec/frontend/invite_members/components/invite_modal_base_spec.js index 45d2afb0eac..e70c83a424e 100644 --- a/spec/frontend/invite_members/components/invite_modal_base_spec.js +++ b/spec/frontend/invite_members/components/invite_modal_base_spec.js @@ -91,6 +91,7 @@ describe('InviteModalBase', () => { const actionButton = findActionButton(); expect(actionButton.text()).toBe(INVITE_BUTTON_TEXT); + expect(actionButton.attributes('data-qa-selector')).toBe('invite_button'); expect(actionButton.props()).toMatchObject({ variant: 'confirm', |