@truedat/lm 8.12.2 → 8.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/lm",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.4",
|
|
4
4
|
"description": "Truedat Link Manager",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@testing-library/jest-dom": "^6.6.3",
|
|
58
58
|
"@testing-library/react": "^16.3.0",
|
|
59
59
|
"@testing-library/user-event": "^14.6.1",
|
|
60
|
-
"@truedat/test": "8.12.
|
|
60
|
+
"@truedat/test": "8.12.4",
|
|
61
61
|
"identity-obj-proxy": "^3.0.0",
|
|
62
62
|
"jest": "^29.7.0",
|
|
63
63
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"semantic-ui-react": "^3.0.0-beta.2",
|
|
90
90
|
"swr": "^2.3.3"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "d5bc1af84c4d828bdec676b0da58385cf0d6015f"
|
|
93
93
|
}
|
|
@@ -80,11 +80,14 @@ jest.mock("@truedat/core/components", () => ({
|
|
|
80
80
|
HistoryBackButton: ({ content }) => <button>{content}</button>,
|
|
81
81
|
}));
|
|
82
82
|
|
|
83
|
+
const tagOptions = [{ id: 1, text: "relates_to", value: 1 }];
|
|
84
|
+
const emptyTagOptions = [];
|
|
85
|
+
|
|
83
86
|
const props = {
|
|
84
87
|
targetId: 10,
|
|
85
88
|
targetType: "quality_control",
|
|
86
89
|
redirectUrl: "/qualityControls/10/version/1/links/concepts",
|
|
87
|
-
selectTagOptions: jest.fn(() =>
|
|
90
|
+
selectTagOptions: jest.fn(() => tagOptions),
|
|
88
91
|
};
|
|
89
92
|
|
|
90
93
|
const renderOpts = {
|
|
@@ -237,7 +240,7 @@ describe("<ConceptLinkForm />", () => {
|
|
|
237
240
|
it("does not render TagTypeDropdownSelector when tagOptions is empty", async () => {
|
|
238
241
|
const rendered = render(
|
|
239
242
|
<ConceptLinkForm
|
|
240
|
-
{...{ ...props, selectTagOptions: jest.fn(() =>
|
|
243
|
+
{...{ ...props, selectTagOptions: jest.fn(() => emptyTagOptions) }}
|
|
241
244
|
/>,
|
|
242
245
|
{
|
|
243
246
|
state: {},
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import _ from "lodash/fp";
|
|
6
6
|
import { fireEvent, waitFor } from "@testing-library/react";
|
|
7
|
-
import { render
|
|
7
|
+
import { render } from "@truedat/test/render";
|
|
8
8
|
import { LinksPaneDataCell } from "../LinksPaneDataCell";
|
|
9
9
|
|
|
10
10
|
jest.mock(
|
|
@@ -47,14 +47,23 @@ describe("<LinksPaneDataCell />", () => {
|
|
|
47
47
|
},
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
const renderCell = (props) =>
|
|
51
|
+
render(
|
|
52
|
+
<table>
|
|
53
|
+
<tbody>
|
|
54
|
+
<tr>
|
|
55
|
+
<LinksPaneDataCell {...props} />
|
|
56
|
+
</tr>
|
|
57
|
+
</tbody>
|
|
58
|
+
</table>,
|
|
59
|
+
renderOpts,
|
|
60
|
+
);
|
|
61
|
+
|
|
50
62
|
it("renders cell content from column", () => {
|
|
51
63
|
const column = { name: "name" };
|
|
52
64
|
const link = { id: 1, name: "Alpha" };
|
|
53
65
|
|
|
54
|
-
const { getByText } =
|
|
55
|
-
<LinksPaneDataCell column={column} link={link} />,
|
|
56
|
-
renderOpts,
|
|
57
|
-
);
|
|
66
|
+
const { getByText } = renderCell({ column, link });
|
|
58
67
|
|
|
59
68
|
expect(getByText("Alpha")).toBeInTheDocument();
|
|
60
69
|
});
|
|
@@ -67,10 +76,7 @@ describe("<LinksPaneDataCell />", () => {
|
|
|
67
76
|
};
|
|
68
77
|
const link = { id: 1, type: "column" };
|
|
69
78
|
|
|
70
|
-
const { getByText } =
|
|
71
|
-
<LinksPaneDataCell column={column} link={link} />,
|
|
72
|
-
renderOpts,
|
|
73
|
-
);
|
|
79
|
+
const { getByText } = renderCell({ column, link });
|
|
74
80
|
|
|
75
81
|
expect(getByText("column")).toBeInTheDocument();
|
|
76
82
|
});
|
|
@@ -80,10 +86,7 @@ describe("<LinksPaneDataCell />", () => {
|
|
|
80
86
|
const column = { name: "name" };
|
|
81
87
|
const link = { id: 1, name: value };
|
|
82
88
|
|
|
83
|
-
const { container } =
|
|
84
|
-
<LinksPaneDataCell column={column} link={link} />,
|
|
85
|
-
renderOpts,
|
|
86
|
-
);
|
|
89
|
+
const { container } = renderCell({ column, link });
|
|
87
90
|
|
|
88
91
|
const cell = container.querySelector("td");
|
|
89
92
|
setHorizontalOverflow(cell, 240, 120);
|
|
@@ -103,10 +106,7 @@ describe("<LinksPaneDataCell />", () => {
|
|
|
103
106
|
const column = { name: "name" };
|
|
104
107
|
const link = { id: 1, name: value };
|
|
105
108
|
|
|
106
|
-
const { container } =
|
|
107
|
-
<LinksPaneDataCell column={column} link={link} />,
|
|
108
|
-
renderOpts,
|
|
109
|
-
);
|
|
109
|
+
const { container } = renderCell({ column, link });
|
|
110
110
|
|
|
111
111
|
const cell = container.querySelector("td");
|
|
112
112
|
setHorizontalOverflow(cell, 120, 120);
|
|
@@ -128,10 +128,7 @@ describe("<LinksPaneDataCell />", () => {
|
|
|
128
128
|
};
|
|
129
129
|
const link = { id: 1, _actions: { delete: true } };
|
|
130
130
|
|
|
131
|
-
const { container } =
|
|
132
|
-
<LinksPaneDataCell column={column} link={link} />,
|
|
133
|
-
renderOpts,
|
|
134
|
-
);
|
|
131
|
+
const { container } = renderCell({ column, link });
|
|
135
132
|
|
|
136
133
|
const cell = container.querySelector("td");
|
|
137
134
|
setHorizontalOverflow(cell, 240, 60);
|
|
@@ -151,10 +148,7 @@ describe("<LinksPaneDataCell />", () => {
|
|
|
151
148
|
};
|
|
152
149
|
const link = { id: 1, group: "Analytics" };
|
|
153
150
|
|
|
154
|
-
const { container } =
|
|
155
|
-
<LinksPaneDataCell column={column} link={link} />,
|
|
156
|
-
renderOpts,
|
|
157
|
-
);
|
|
151
|
+
const { container } = renderCell({ column, link });
|
|
158
152
|
|
|
159
153
|
const cell = container.querySelector("td");
|
|
160
154
|
setHorizontalOverflow(cell, 240, 60);
|
|
@@ -174,10 +168,7 @@ describe("<LinksPaneDataCell />", () => {
|
|
|
174
168
|
};
|
|
175
169
|
const link = { id: 1, note: { text_input: "Complete note value" } };
|
|
176
170
|
|
|
177
|
-
const { container } =
|
|
178
|
-
<LinksPaneDataCell column={column} link={link} />,
|
|
179
|
-
renderOpts,
|
|
180
|
-
);
|
|
171
|
+
const { container } = renderCell({ column, link });
|
|
181
172
|
|
|
182
173
|
const cell = container.querySelector("td");
|
|
183
174
|
setHorizontalOverflow(cell, 240, 60);
|