Commit 528d13c8 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '238453-convert-group-members-list-view-from-haml-to-vue-ldap-badge' into 'master'

Add LDAP badge to user avatar

See merge request gitlab-org/gitlab!45484
parents 67a47ef4 8bd9f6ce
......@@ -18,4 +18,9 @@ export const generateBadges = (member, isCurrentUser) => [
text: __('Managed Account'),
variant: 'info',
},
{
show: member.canOverride,
text: __('LDAP'),
variant: 'info',
},
];
......@@ -25,6 +25,7 @@ describe('UserAvatar', () => {
${{ ...memberMock, usingLicense: true }} | ${'Is using seat'}
${{ ...memberMock, groupSso: true }} | ${'SAML'}
${{ ...memberMock, groupManagedAccount: true }} | ${'Managed Account'}
${{ ...memberMock, canOverride: true }} | ${'LDAP'}
`('renders the "$badgeText" badge', ({ member, badgeText }) => {
createComponent({ member });
......
......@@ -22,6 +22,7 @@ describe('Members Utils', () => {
${{ ...memberMock, usingLicense: true }} | ${{ show: true, text: 'Is using seat', variant: 'neutral' }}
${{ ...memberMock, groupSso: true }} | ${{ show: true, text: 'SAML', variant: 'info' }}
${{ ...memberMock, groupManagedAccount: true }} | ${{ show: true, text: 'Managed Account', variant: 'info' }}
${{ ...memberMock, canOverride: true }} | ${{ show: true, text: 'LDAP', variant: 'info' }}
`('returns expected output for "$expected.text" badge', ({ member, expected }) => {
expect(generateBadges(member, true)).toContainEqual(expect.objectContaining(expected));
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment