-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathactionItemDisplay.test.tsx
33 lines (29 loc) · 1 KB
/
actionItemDisplay.test.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import * as React from "react";
import { shallow } from 'enzyme';
import toJson from "enzyme-to-json";
import ActionItemDisplay, {
ActionItemDisplayProps,
} from "../actionItemDisplay";
const mockOnUpdateActionItem = jest.fn(() => {});
const defaultTestProps: ActionItemDisplayProps = {
feedbackItemId: "101",
feedbackItemTitle: "Test Feedback Item Title",
team: undefined,
boardId: "Test Board Id",
boardTitle: "Test Board Title",
defaultIteration: "1",
defaultAreaPath: "/testPath",
actionItems: [],
nonHiddenWorkItemTypes: [],
allWorkItemTypes: [],
allowAddNewActionItem: false,
onUpdateActionItem: mockOnUpdateActionItem,
};
describe("Action Item Display component", () => {
it("renders correctly when there are no action items.", () => {
const wrapper = shallow(<ActionItemDisplay {...defaultTestProps} /> as any);
const component = wrapper.children().dive();
expect(toJson(component)).toMatchSnapshot();
});
it("renders correctly when action items exist", () => {});
});