@truedat/lm 8.12.5 → 8.12.7
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 +3 -3
- package/src/components/ConceptLinkForm.js +1 -1
- package/src/components/ConceptStructureLinkForm.js +1 -1
- package/src/components/ConceptSuggestionLinkForm.js +1 -1
- package/src/components/ConfirmDeleteRelation.js +1 -1
- package/src/components/ImplementationRelationForm.js +1 -1
- package/src/components/LinksPagination.js +1 -1
- package/src/components/RelationGraph.js +1 -1
- package/src/components/RelationRow.js +1 -1
- package/src/components/RelationTagCards.js +1 -1
- package/src/components/RelationTagForm.js +1 -1
- package/src/components/RelationsGraphLoader.js +1 -1
- package/src/components/StructureLinkForm.js +1 -1
- package/src/components/StructureRelationForm.js +1 -1
- package/src/components/StructureSuggestionLinkForm.js +1 -1
- package/src/components/__tests__/ConceptLinkForm.spec.js +3 -3
- package/src/components/__tests__/ConceptLinkTags.spec.js +2 -1
- package/src/components/__tests__/ConceptSuggestionLinkForm.spec.js +3 -3
- package/src/components/__tests__/ConfirmDeleteRelation.spec.js +1 -1
- package/src/components/__tests__/ImplementationLinkRow.spec.js +1 -1
- package/src/components/__tests__/LinksPane.spec.js +2 -1
- package/src/components/__tests__/LinksPaneDataCell.spec.js +1 -1
- package/src/components/__tests__/LinksPaneRow.spec.js +1 -1
- package/src/components/__tests__/LinksPaneTypeFilter.spec.js +1 -1
- package/src/components/__tests__/LinksSearch.spec.js +2 -1
- package/src/components/__tests__/QualityControlConcepts.spec.js +2 -1
- package/src/components/__tests__/QualityControlStructures.spec.js +2 -1
- package/src/components/__tests__/RelationRoutes.spec.js +0 -4
- package/src/components/__tests__/RelationRow.spec.js +2 -1
- package/src/components/__tests__/RelationTagCards.spec.js +1 -1
- package/src/components/__tests__/RelationTagsLoader.spec.js +2 -1
- package/src/components/__tests__/RelationsGraphLoader.spec.js +2 -1
- package/src/components/__tests__/RelationsLoader.spec.js +2 -1
- package/src/components/__tests__/StructureLinkForm.spec.js +30 -12
- package/src/components/__tests__/StructureSuggestionLinkForm.spec.js +3 -3
- package/src/components/__tests__/TagTypeSelector.spec.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/lm",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.7",
|
|
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.7",
|
|
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": "dae06fd2f915163d5f1e7e3f26c414c8ee9bf055"
|
|
93
93
|
}
|
|
@@ -3,7 +3,7 @@ import { lazy, useState, useEffect } from "react";
|
|
|
3
3
|
import { useSelector, useDispatch } from "react-redux";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { Divider, Button } from "semantic-ui-react";
|
|
6
|
-
import
|
|
6
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
7
7
|
import { useWebContext } from "@truedat/core/webContext";
|
|
8
8
|
import { useNavigate } from "react-router";
|
|
9
9
|
import { useCreateRelation } from "../hooks/useRelations";
|
|
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
5
|
import { Button, Divider } from "semantic-ui-react";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
|
-
import
|
|
7
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
8
8
|
import { linkTo } from "@truedat/core/routes";
|
|
9
9
|
import { makeTagOptionsSelector } from "@truedat/core/selectors";
|
|
10
10
|
import {
|
|
@@ -5,7 +5,7 @@ import { useParams } from "react-router";
|
|
|
5
5
|
import { useDispatch, useSelector } from "react-redux";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
7
|
import { makeTagOptionsSelector } from "@truedat/core/selectors";
|
|
8
|
-
import
|
|
8
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
9
9
|
import { linkTo } from "@truedat/core/routes";
|
|
10
10
|
import { Button } from "semantic-ui-react";
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@ import PropTypes from "prop-types";
|
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
import { Button, Icon } from "semantic-ui-react";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
|
-
import
|
|
5
|
+
import ConfirmModal from "@truedat/core/components/ConfirmModal";
|
|
6
6
|
import { deleteRelation } from "../routines";
|
|
7
7
|
|
|
8
8
|
export const ConfirmDeleteRelation = ({ id, deleteRelation, resourceType }) => (
|
|
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import { Button, Form, Grid, Header, Segment } from "semantic-ui-react";
|
|
7
|
-
import
|
|
7
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
8
8
|
import { linkTo } from "@truedat/core/routes";
|
|
9
9
|
import { makeTagOptionsSelector } from "@truedat/core/selectors";
|
|
10
10
|
import { linkConcept } from "../routines";
|
|
@@ -2,7 +2,7 @@ import _ from "lodash/fp";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import
|
|
5
|
+
import Graph from "@truedat/core/components/Graph";
|
|
6
6
|
import { EMPTY_EDGE_TYPE } from "../services/edgeColorPalette";
|
|
7
7
|
|
|
8
8
|
export const RelationGraph = ({
|
|
@@ -4,7 +4,7 @@ import { FormattedMessage } from "react-intl";
|
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
5
|
import { useNavigate } from "react-router";
|
|
6
6
|
import { Table, Icon, Label } from "semantic-ui-react";
|
|
7
|
-
import
|
|
7
|
+
import ConfirmModal from "@truedat/core/components/ConfirmModal";
|
|
8
8
|
import { deleteRelation } from "../routines";
|
|
9
9
|
|
|
10
10
|
const goToResource = ({ navigate, relationPath }) => navigate(relationPath);
|
|
@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
|
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
4
|
import { Button, Card, Checkbox, Icon } from "semantic-ui-react";
|
|
5
5
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
6
|
-
import
|
|
6
|
+
import ConfirmModal from "@truedat/core/components/ConfirmModal";
|
|
7
7
|
import { deleteRelationTag, updateRelationTag } from "../routines";
|
|
8
8
|
|
|
9
9
|
export const RelationTagCards = ({
|
|
@@ -3,7 +3,7 @@ import { Button, Form } from "semantic-ui-react";
|
|
|
3
3
|
import { useForm, Controller } from "react-hook-form";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { connect } from "react-redux";
|
|
6
|
-
import
|
|
6
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
7
7
|
|
|
8
8
|
export const RelationTagForm = ({ relationTag, isSubmitting, onSubmit }) => {
|
|
9
9
|
const { formatMessage } = useIntl();
|
|
@@ -2,7 +2,7 @@ import _ from "lodash/fp";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
|
-
import
|
|
5
|
+
import Loading from "@truedat/core/components/Loading";
|
|
6
6
|
import { clearRelationsGraph, fetchRelationsGraph } from "../routines";
|
|
7
7
|
|
|
8
8
|
export const RelationsGraphLoader = ({
|
|
@@ -3,7 +3,7 @@ import { lazy, useState, useEffect } from "react";
|
|
|
3
3
|
import { useSelector, useDispatch } from "react-redux";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { Divider, Button } from "semantic-ui-react";
|
|
6
|
-
import
|
|
6
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
7
7
|
import { useWebContext } from "@truedat/core/webContext";
|
|
8
8
|
import { useNavigate } from "react-router";
|
|
9
9
|
import { useCreateRelation } from "../hooks/useRelations";
|
|
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import { connect } from "react-redux";
|
|
6
6
|
import { Button, Grid, Header, Form } from "semantic-ui-react";
|
|
7
|
-
import
|
|
7
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
8
8
|
import { makeTagOptionsSelector } from "@truedat/core/selectors";
|
|
9
9
|
import { linkTo } from "@truedat/core/routes";
|
|
10
10
|
import { linkConcept } from "../routines";
|
|
@@ -5,7 +5,7 @@ import { useParams } from "react-router";
|
|
|
5
5
|
import { useDispatch, useSelector } from "react-redux";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
7
|
import { makeTagOptionsSelector } from "@truedat/core/selectors";
|
|
8
|
-
import
|
|
8
|
+
import HistoryBackButton from "@truedat/core/components/HistoryBackButton";
|
|
9
9
|
import { linkTo } from "@truedat/core/routes";
|
|
10
10
|
import { Button } from "semantic-ui-react";
|
|
11
11
|
|
|
@@ -76,9 +76,9 @@ jest.mock("@truedat/bg/concepts/relations/components/ConceptSelector", () =>
|
|
|
76
76
|
)),
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
-
jest.mock("@truedat/core/components", () => ({
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
jest.mock("@truedat/core/components/HistoryBackButton", () => ({ content }) => (
|
|
80
|
+
<button>{content}</button>
|
|
81
|
+
));
|
|
82
82
|
|
|
83
83
|
const tagOptions = [{ id: 1, text: "relates_to", value: 1 }];
|
|
84
84
|
const emptyTagOptions = [];
|
|
@@ -47,9 +47,9 @@ jest.mock("../TagTypeDropdownSelector", () =>
|
|
|
47
47
|
jest.fn(() => <div>MockTagTypeDropdownSelector</div>),
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
-
jest.mock("@truedat/core/components", () => (
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
jest.mock("@truedat/core/components/HistoryBackButton", () => (props) => (
|
|
51
|
+
<button>{props.content}</button>
|
|
52
|
+
));
|
|
53
53
|
|
|
54
54
|
jest.mock("@truedat/core/routes", () => ({
|
|
55
55
|
linkTo: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import { fireEvent, waitFor } from "@testing-library/react";
|
|
3
|
-
import { render
|
|
3
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
4
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
4
5
|
import { useDataStructureSearch } from "@truedat/dd/hooks/useStructures";
|
|
5
6
|
import { LinksPane } from "../LinksPane";
|
|
6
7
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import _ from "lodash/fp";
|
|
6
6
|
import { fireEvent, waitFor } from "@testing-library/react";
|
|
7
|
-
import { render } from "@truedat/test/
|
|
7
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
8
8
|
import { LinksPaneDataCell } from "../LinksPaneDataCell";
|
|
9
9
|
|
|
10
10
|
jest.mock(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import _ from "lodash/fp";
|
|
6
6
|
import { fireEvent, waitFor } from "@testing-library/react";
|
|
7
|
-
import { render } from "@truedat/test/
|
|
7
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
8
8
|
import { LinksPaneTypeFilter } from "../LinksPaneTypeFilter";
|
|
9
9
|
|
|
10
10
|
describe("<LinksPaneTypeFilter />", () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { waitFor } from "@testing-library/react";
|
|
2
|
-
import { render
|
|
2
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
3
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
3
4
|
import LinksSearch from "../LinksSearch";
|
|
4
5
|
|
|
5
6
|
const mockNavigate = jest.fn();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { waitFor } from "@testing-library/react";
|
|
2
|
-
import { render
|
|
2
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
3
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
3
4
|
import { QualityControlConcepts } from "../QualityControlConcepts";
|
|
4
5
|
|
|
5
6
|
const mockDeleteRelation = jest.fn();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { waitFor } from "@testing-library/react";
|
|
2
|
-
import { render
|
|
2
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
3
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
3
4
|
import { QualityControlStructures } from "../QualityControlStructures";
|
|
4
5
|
|
|
5
6
|
const mockDeleteRelation = jest.fn();
|
|
@@ -28,10 +28,6 @@ jest.mock(
|
|
|
28
28
|
return <div>RelationTagsLoader</div>;
|
|
29
29
|
},
|
|
30
30
|
);
|
|
31
|
-
jest.mock("@truedat/core/components", () => ({
|
|
32
|
-
Unauthorized: () => <div>Unauthorized</div>,
|
|
33
|
-
...jest.requireActual("@truedat/core/components"),
|
|
34
|
-
}));
|
|
35
31
|
|
|
36
32
|
describe("<RelationRoutes />", () => {
|
|
37
33
|
it("renders correctly with default route", async () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { render
|
|
1
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
2
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
2
3
|
import { RelationRow } from "../RelationRow";
|
|
3
4
|
|
|
4
5
|
jest.mock("react-router", () => ({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { render
|
|
1
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
2
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
2
3
|
import { RelationTagsLoader } from "../RelationTagsLoader";
|
|
3
4
|
|
|
4
5
|
describe("<RelationTagsLoader />", () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { render
|
|
1
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
2
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
2
3
|
import { RelationsGraphLoader } from "../RelationsGraphLoader";
|
|
3
4
|
|
|
4
5
|
describe("<RelationsGraphLoader />", () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { render
|
|
1
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
2
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
2
3
|
import { RelationsLoader } from "../RelationsLoader";
|
|
3
4
|
|
|
4
5
|
describe("<RelationsLoader />", () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import userEvent from "@testing-library/user-event";
|
|
2
2
|
import { waitFor } from "@testing-library/react";
|
|
3
|
-
import { render
|
|
3
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
4
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
4
5
|
import { StructureLinkForm } from "../StructureLinkForm";
|
|
5
6
|
|
|
6
7
|
const mockNavigate = jest.fn();
|
|
@@ -93,9 +94,9 @@ jest.mock("@truedat/dd/components/StructureSelector", () =>
|
|
|
93
94
|
)),
|
|
94
95
|
);
|
|
95
96
|
|
|
96
|
-
jest.mock("@truedat/core/components", () => ({
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
jest.mock("@truedat/core/components/HistoryBackButton", () => ({ content }) => (
|
|
98
|
+
<button>{content}</button>
|
|
99
|
+
));
|
|
99
100
|
|
|
100
101
|
const props = {
|
|
101
102
|
sourceId: 10,
|
|
@@ -119,13 +120,17 @@ describe("<StructureLinkForm />", () => {
|
|
|
119
120
|
});
|
|
120
121
|
|
|
121
122
|
it("matches the latest snapshot", async () => {
|
|
122
|
-
const rendered = render(<StructureLinkForm {...props}
|
|
123
|
+
const rendered = render(<StructureLinkForm {...props} />, {
|
|
124
|
+
fallback: <div>loading</div>,
|
|
125
|
+
});
|
|
123
126
|
await waitForLoad(rendered);
|
|
124
127
|
expect(rendered.container).toMatchSnapshot();
|
|
125
128
|
});
|
|
126
129
|
|
|
127
130
|
it("renders all form components", async () => {
|
|
128
|
-
const rendered = render(<StructureLinkForm {...props}
|
|
131
|
+
const rendered = render(<StructureLinkForm {...props} />, {
|
|
132
|
+
fallback: <div>loading</div>,
|
|
133
|
+
});
|
|
129
134
|
await waitForLoad(rendered);
|
|
130
135
|
|
|
131
136
|
expect(rendered.getByText("RelationTagsLoader")).toBeInTheDocument();
|
|
@@ -136,7 +141,9 @@ describe("<StructureLinkForm />", () => {
|
|
|
136
141
|
});
|
|
137
142
|
|
|
138
143
|
it("disables create button when structure or tags are not selected", async () => {
|
|
139
|
-
const rendered = render(<StructureLinkForm {...props}
|
|
144
|
+
const rendered = render(<StructureLinkForm {...props} />, {
|
|
145
|
+
fallback: <div>loading</div>,
|
|
146
|
+
});
|
|
140
147
|
await waitForLoad(rendered);
|
|
141
148
|
|
|
142
149
|
const createButton = rendered.getByText("actions.create");
|
|
@@ -145,7 +152,9 @@ describe("<StructureLinkForm />", () => {
|
|
|
145
152
|
|
|
146
153
|
it("enables create button when both structure and tags are selected", async () => {
|
|
147
154
|
const user = userEvent.setup({ delay: null });
|
|
148
|
-
const rendered = render(<StructureLinkForm {...props}
|
|
155
|
+
const rendered = render(<StructureLinkForm {...props} />, {
|
|
156
|
+
fallback: <div>loading</div>,
|
|
157
|
+
});
|
|
149
158
|
await waitForLoad(rendered);
|
|
150
159
|
|
|
151
160
|
const createButton = rendered.getByText("actions.create");
|
|
@@ -160,7 +169,9 @@ describe("<StructureLinkForm />", () => {
|
|
|
160
169
|
|
|
161
170
|
it("calls createRelation and navigates on submit", async () => {
|
|
162
171
|
const user = userEvent.setup({ delay: null });
|
|
163
|
-
const rendered = render(<StructureLinkForm {...props}
|
|
172
|
+
const rendered = render(<StructureLinkForm {...props} />, {
|
|
173
|
+
fallback: <div>loading</div>,
|
|
174
|
+
});
|
|
164
175
|
await waitForLoad(rendered);
|
|
165
176
|
|
|
166
177
|
await user.click(rendered.getByText("Select Structure"));
|
|
@@ -211,7 +222,9 @@ describe("<StructureLinkForm />", () => {
|
|
|
211
222
|
};
|
|
212
223
|
mockCreateRelation.mockRejectedValueOnce(error);
|
|
213
224
|
|
|
214
|
-
const rendered = render(<StructureLinkForm {...props}
|
|
225
|
+
const rendered = render(<StructureLinkForm {...props} />, {
|
|
226
|
+
fallback: <div>loading</div>,
|
|
227
|
+
});
|
|
215
228
|
await waitForLoad(rendered);
|
|
216
229
|
|
|
217
230
|
await user.click(rendered.getByText("Select Structure"));
|
|
@@ -241,7 +254,9 @@ describe("<StructureLinkForm />", () => {
|
|
|
241
254
|
};
|
|
242
255
|
mockCreateRelation.mockRejectedValueOnce(error);
|
|
243
256
|
|
|
244
|
-
const rendered = render(<StructureLinkForm {...props}
|
|
257
|
+
const rendered = render(<StructureLinkForm {...props} />, {
|
|
258
|
+
fallback: <div>loading</div>,
|
|
259
|
+
});
|
|
245
260
|
await waitForLoad(rendered);
|
|
246
261
|
|
|
247
262
|
await user.click(rendered.getByText("Select Structure"));
|
|
@@ -261,7 +276,9 @@ describe("<StructureLinkForm />", () => {
|
|
|
261
276
|
});
|
|
262
277
|
|
|
263
278
|
it("dispatches clearSelectedRelationTags on unmount", () => {
|
|
264
|
-
const { unmount } = render(<StructureLinkForm {...props}
|
|
279
|
+
const { unmount } = render(<StructureLinkForm {...props} />, {
|
|
280
|
+
fallback: <div>loading</div>,
|
|
281
|
+
});
|
|
265
282
|
unmount();
|
|
266
283
|
|
|
267
284
|
expect(mockDispatch).toHaveBeenCalledWith({
|
|
@@ -274,6 +291,7 @@ describe("<StructureLinkForm />", () => {
|
|
|
274
291
|
<StructureLinkForm
|
|
275
292
|
{...{ ...props, selectTagOptions: jest.fn(() => []) }}
|
|
276
293
|
/>,
|
|
294
|
+
{ fallback: <div>loading</div> },
|
|
277
295
|
);
|
|
278
296
|
await waitForLoad(rendered);
|
|
279
297
|
|
|
@@ -48,9 +48,9 @@ jest.mock("../RelationTagsLoader", () =>
|
|
|
48
48
|
jest.fn(() => <div>RelationTagsLoader</div>),
|
|
49
49
|
);
|
|
50
50
|
|
|
51
|
-
jest.mock("@truedat/core/components", () => (
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
jest.mock("@truedat/core/components/HistoryBackButton", () => (props) => (
|
|
52
|
+
<button>{props.content}</button>
|
|
53
|
+
));
|
|
54
54
|
|
|
55
55
|
jest.mock("@truedat/core/routes", () => ({
|
|
56
56
|
linkTo: { STRUCTURE_LINKS: jest.fn(() => "/mocked/redirect/url") },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { render
|
|
1
|
+
import { renderWithIntl as render } from "@truedat/test/renderWithIntl";
|
|
2
|
+
import { waitForLoad } from "@truedat/test/waitForLoad";
|
|
2
3
|
import { TagTypeSelector } from "../TagTypeSelector";
|
|
3
4
|
|
|
4
5
|
describe("<TagTypeSelector />", () => {
|