Skip to content

Commit 9b22e12

Browse files
Merge pull request #302 from ajit3190/trigyn-testcases-record-form-form-subforms-subform-traces-components-trace-matches
[New] Added test cases for record form form subforms subform traces c…
2 parents 35af156 + 5a902a1 commit 9b22e12

File tree

2 files changed

+32
-44
lines changed

2 files changed

+32
-44
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { fromJS } from "immutable";
2+
3+
import { mountedComponent, screen } from "../../../../../../../test-utils";
4+
5+
import TraceMatches from "./component";
6+
7+
describe("<RecordForm>/form/subforms/<TraceMatches>", () => {
8+
const props = {
9+
traceValues: {
10+
unique_id: "12345"
11+
},
12+
tracingRequestValues: {
13+
short_id: "12",
14+
relation_name: "Tracing Request Name",
15+
inquiry_date: "2020-01-01"
16+
},
17+
recordType: "recordType1"
18+
};
19+
20+
it("should render a list with the tracing request information", () => {
21+
mountedComponent(<TraceMatches {...props} />, fromJS([]));
22+
expect(screen.getByText(/tracing_requests.inquirer/i)).toBeInTheDocument();
23+
expect(screen.getByText(/tracing_requests.id:/i)).toBeInTheDocument();
24+
expect(screen.getByText(/tracing_requests.name:/i)).toBeInTheDocument();
25+
expect(screen.getByText(/tracing_requests.date_of_inquiry:/i)).toBeInTheDocument();
26+
});
27+
28+
it("should render an IndexTable", () => {
29+
mountedComponent(<TraceMatches {...props} />, fromJS([]));
30+
expect(screen.getByRole("grid")).toBeInTheDocument();
31+
});
32+
});

app/javascript/components/record-form/form/subforms/subform-traces/components/trace-matches/component.unit.test.js

-44
This file was deleted.

0 commit comments

Comments
 (0)