diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/frontend/members/utils_spec.js | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/frontend/members/utils_spec.js')
-rw-r--r-- | spec/frontend/members/utils_spec.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/frontend/members/utils_spec.js b/spec/frontend/members/utils_spec.js index b0c9459ff4f..0271483801c 100644 --- a/spec/frontend/members/utils_spec.js +++ b/spec/frontend/members/utils_spec.js @@ -1,5 +1,12 @@ import setWindowLocation from 'helpers/set_window_location_helper'; -import { DEFAULT_SORT, MEMBER_TYPES } from '~/members/constants'; +import { + DEFAULT_SORT, + MEMBER_TYPES, + I18N_USER_YOU, + I18N_USER_BLOCKED, + I18N_USER_BOT, + I188N_USER_2FA, +} from '~/members/constants'; import { generateBadges, isGroup, @@ -52,9 +59,10 @@ describe('Members Utils', () => { it.each` member | expected - ${memberMock} | ${{ show: true, text: "It's you", variant: 'success' }} - ${{ ...memberMock, user: { ...memberMock.user, blocked: true } }} | ${{ show: true, text: 'Blocked', variant: 'danger' }} - ${member2faEnabled} | ${{ show: true, text: '2FA', variant: 'info' }} + ${memberMock} | ${{ show: true, text: I18N_USER_YOU, variant: 'success' }} + ${{ ...memberMock, user: { ...memberMock.user, blocked: true } }} | ${{ show: true, text: I18N_USER_BLOCKED, variant: 'danger' }} + ${{ ...memberMock, user: { ...memberMock.user, isBot: true } }} | ${{ show: true, text: I18N_USER_BOT, variant: 'muted' }} + ${member2faEnabled} | ${{ show: true, text: I188N_USER_2FA, variant: 'info' }} `('returns expected output for "$expected.text" badge', ({ member, expected }) => { expect( generateBadges({ member, isCurrentUser: true, canManageMembers: true }), |