diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-10 03:07:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-10 03:07:23 +0300 |
commit | c1924278d0c49e43e8a9ad7910f267007f24669d (patch) | |
tree | 7ca946598a6c3702ff3655463f1d8e40afd2f2ca /spec/frontend/invite_members/components | |
parent | e374f6b2297582fde956350e92c19d1ae93ddfc8 (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/members_token_select_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/invite_members/components/members_token_select_spec.js b/spec/frontend/invite_members/components/members_token_select_spec.js index c7e9905dee3..ff0313cc49e 100644 --- a/spec/frontend/invite_members/components/members_token_select_spec.js +++ b/spec/frontend/invite_members/components/members_token_select_spec.js @@ -130,6 +130,18 @@ describe('MembersTokenSelect', () => { expect(tokenSelector.props('hideDropdownWithNoItems')).toBe(false); }); + it('calls the API with search parameter with whitespaces and is trimmed', async () => { + tokenSelector.vm.$emit('text-input', ' foo@bar.com '); + + await waitForPromises(); + + expect(UserApi.getUsers).toHaveBeenCalledWith('foo@bar.com', { + active: true, + without_project_bots: true, + }); + expect(tokenSelector.props('hideDropdownWithNoItems')).toBe(false); + }); + describe('when input text is an email', () => { it('allows user defined tokens', async () => { tokenSelector.vm.$emit('text-input', 'foo@bar.com'); |