-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathRCPCHChart.test.tsx
46 lines (39 loc) · 1.35 KB
/
RCPCHChart.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
34
35
36
37
38
39
40
41
42
43
44
45
46
// Generated with util/create-component.js
import * as React from "react";
import { render } from "@testing-library/react";
import RCPCHChart from "./RCPCHChart";
import { RCPCHChartProps } from "./RCPCHChart.types";
import { chartObject, axesObject, gridlinesObject, centilesObject, measurementObjects, sdsObject } from '../testParameters/styles/monochromeStyles'
describe("RCPCHChart", () => {
let props: RCPCHChartProps;
beforeEach(() => {
props = {
reference: 'uk-who',
title: 'TestChartTitle',
measurementMethod: 'height',
sex: 'male',
midParentalHeightData: {},
enableZoom: false,
enableExport: false,
exportChartCallback: ()=>null,
clinicianFocus: false,
measurements: {},
chartType:'centile',
customThemeStyles: {
chartStyle: chartObject,
axisStyle: axesObject,
gridlineStyle: gridlinesObject,
centileStyle: centilesObject,
sdsStyle: sdsObject,
measurementStyle: measurementObjects,
}
};
});
const renderComponent = () => render(<RCPCHChart {...props} />);
test.skip("should render chart title text correctly", () => {
props.measurementMethod = "height";
const { getByTestId } = renderComponent();
const component = getByTestId("RCPCHChart");
expect(component.textContent?.match(/TestChartTitle/));
});
});