Commit 8bd9f6ce authored by peterhegman's avatar peterhegman

Add LDAP badge to user avatar

Part of a larger initiative to convert the group members view from
HAML to Vue
parent 8a72e28e
......@@ -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