2019-08-19 12:20:38 +01:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import ProjectMemberListItem from '@/components/team/ProjectMemberListItem.vue';
|
2019-09-09 11:33:39 +01:00
|
|
|
|
2019-08-20 13:57:43 +01:00
|
|
|
import { ProjectMember } from '@/types/projectMembers';
|
2019-09-09 11:33:39 +01:00
|
|
|
import { mount } from '@vue/test-utils';
|
2019-08-19 12:20:38 +01:00
|
|
|
|
|
|
|
describe('', () => {
|
|
|
|
it('should renders correctly', function () {
|
|
|
|
const member: ProjectMember = new ProjectMember('testFullName', 'testShortName', 'test@example.com', '2019-08-09T08:52:43.695679Z', '1');
|
|
|
|
|
|
|
|
const wrapper = mount(ProjectMemberListItem, {
|
|
|
|
propsData: {
|
2019-09-13 15:58:18 +01:00
|
|
|
itemData: member,
|
|
|
|
},
|
2019-08-19 12:20:38 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render correctly with item row highlighted', function () {
|
|
|
|
const member: ProjectMember = new ProjectMember('testFullName', 'testShortName', 'test@example.com', '2019-08-09T08:52:43.695679Z', '1');
|
|
|
|
member.isSelected = true;
|
|
|
|
|
|
|
|
const wrapper = mount(ProjectMemberListItem, {
|
|
|
|
propsData: {
|
2019-09-13 15:58:18 +01:00
|
|
|
itemData: member,
|
|
|
|
},
|
2019-08-19 12:20:38 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|