Commit d47c5c77 authored by peterhegman's avatar peterhegman

Fix failing FOSS spec

The CE spec was looking for EE content
parent dda21b59
import { mount } from '@vue/test-utils';
import { GlBadge } from '@gitlab/ui';
import { member as memberMock } from 'jest/vue_shared/components/members/mock_data';
import UserAvatar from '~/vue_shared/components/members/avatars/user_avatar.vue';
describe('UserAvatar', () => {
let wrapper;
const createComponent = (propsData = {}) => {
wrapper = mount(UserAvatar, {
propsData: {
isCurrentUser: false,
...propsData,
},
});
};
afterEach(() => {
wrapper.destroy();
});
describe('badges', () => {
it.each`
member | badgeText
${{ ...memberMock, usingLicense: true }} | ${'Is using seat'}
${{ ...memberMock, groupSso: true }} | ${'SAML'}
${{ ...memberMock, groupManagedAccount: true }} | ${'Managed Account'}
`('renders the "$badgeText" badge', ({ member, badgeText }) => {
createComponent({ member });
expect(wrapper.find(GlBadge).text()).toBe(badgeText);
});
});
});
......@@ -4,7 +4,7 @@ import { GlAvatarLink, GlBadge } from '@gitlab/ui';
import { member as memberMock, orphanedMember } from '../mock_data';
import UserAvatar from '~/vue_shared/components/members/avatars/user_avatar.vue';
describe('MemberList', () => {
describe('UserAvatar', () => {
let wrapper;
const { user } = memberMock;
......@@ -68,11 +68,8 @@ describe('MemberList', () => {
describe('badges', () => {
it.each`
member | badgeText
${{ ...memberMock, usingLicense: true }} | ${'Is using seat'}
${{ ...memberMock, user: { ...memberMock.user, blocked: true } }} | ${'Blocked'}
${{ ...memberMock, user: { ...memberMock.user, twoFactorEnabled: true } }} | ${'2FA'}
${{ ...memberMock, groupSso: true }} | ${'SAML'}
${{ ...memberMock, groupManagedAccount: true }} | ${'Managed Account'}
`('renders the "$badgeText" badge', ({ member, badgeText }) => {
createComponent({ member });
......
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