@truedat/lm 8.7.0 → 8.7.1

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.
Files changed (68) hide show
  1. package/package.json +3 -3
  2. package/src/components/ConceptLinkForm.js +6 -6
  3. package/src/components/ConceptStructureLinkForm.js +1 -1
  4. package/src/components/ConceptSuggestionLinkForm.js +1 -1
  5. package/src/components/ImplementationLinks.js +4 -4
  6. package/src/components/ImplementationRelationForm.js +3 -3
  7. package/src/components/LinksPane.js +3 -3
  8. package/src/components/LinksSearch.js +1 -1
  9. package/src/components/QualityControlConcepts.js +1 -1
  10. package/src/components/QualityControlStructures.js +4 -2
  11. package/src/components/RelationGraph.js +20 -12
  12. package/src/components/RelationGraphDepth.js +22 -7
  13. package/src/components/RelationTagForm.js +2 -2
  14. package/src/components/RelationTagsLoader.js +1 -1
  15. package/src/components/RelationsLoader.js +1 -1
  16. package/src/components/StructureLinkForm.js +6 -6
  17. package/src/components/StructureLinks.js +3 -3
  18. package/src/components/StructureRelationForm.js +3 -3
  19. package/src/components/StructureSuggestionLinkForm.js +54 -50
  20. package/src/components/TagTypeDropdownSelector.js +4 -4
  21. package/src/components/__tests__/ConceptImplementationLink.spec.js +1 -1
  22. package/src/components/__tests__/ConceptLinkForm.spec.js +5 -5
  23. package/src/components/__tests__/ConceptSuggestionLinkForm.spec.js +7 -8
  24. package/src/components/__tests__/ConfirmDeleteRelation.spec.js +1 -1
  25. package/src/components/__tests__/ImplementationLinkRow.spec.js +1 -1
  26. package/src/components/__tests__/ImplementationLinks.spec.js +2 -2
  27. package/src/components/__tests__/ImplementationRelationForm.spec.js +8 -8
  28. package/src/components/__tests__/LinksPane.spec.js +28 -5
  29. package/src/components/__tests__/LinksSearch.spec.js +13 -13
  30. package/src/components/__tests__/QualityControlConcepts.spec.js +23 -23
  31. package/src/components/__tests__/QualityControlStructures.spec.js +15 -15
  32. package/src/components/__tests__/RelationRoutes.spec.js +3 -3
  33. package/src/components/__tests__/RelationRow.spec.js +4 -4
  34. package/src/components/__tests__/RelationTagForm.spec.js +7 -7
  35. package/src/components/__tests__/Relations.spec.js +1 -1
  36. package/src/components/__tests__/RelationsLoader.spec.js +1 -1
  37. package/src/components/__tests__/StructureLinkForm.spec.js +6 -6
  38. package/src/components/__tests__/StructureRelationForm.spec.js +9 -9
  39. package/src/components/__tests__/StructureSuggestionLinkForm.spec.js +87 -85
  40. package/src/hooks/useRelations.js +6 -5
  41. package/src/messages/en.js +2 -1
  42. package/src/messages/es.js +2 -1
  43. package/src/messages/index.js +1 -1
  44. package/src/reducers/__tests__/handlingRelation.spec.js +3 -3
  45. package/src/reducers/__tests__/relationRedirect.spec.js +8 -8
  46. package/src/reducers/__tests__/relationTags.spec.js +4 -4
  47. package/src/reducers/__tests__/relationTagsLoading.spec.js +2 -2
  48. package/src/reducers/__tests__/relations.spec.js +4 -4
  49. package/src/reducers/__tests__/relationsActions.spec.js +6 -6
  50. package/src/reducers/__tests__/relationsGraph.spec.js +21 -21
  51. package/src/reducers/__tests__/relationsGraphLoading.spec.js +2 -2
  52. package/src/reducers/__tests__/relationsLoading.spec.js +2 -2
  53. package/src/reducers/__tests__/selectedRelationTags.spec.js +5 -5
  54. package/src/reducers/relationTags.js +1 -1
  55. package/src/reducers/selectedRelationTags.js +1 -1
  56. package/src/routines.js +2 -2
  57. package/src/sagas/createRelation.js +1 -1
  58. package/src/sagas/createRelationTag.js +1 -1
  59. package/src/sagas/fetchRelations.js +1 -1
  60. package/src/sagas/updateRelationTag.js +1 -1
  61. package/src/selectors/getImplementationToConceptLinks.js +1 -1
  62. package/src/selectors/getStructureLinks.js +1 -1
  63. package/src/selectors/index.js +1 -1
  64. package/src/selectors/messages.js +3 -2
  65. package/src/services/__tests__/edgeColorPalette.spec.js +3 -5
  66. package/src/services/__tests__/relationGraphTraversal.spec.js +2 -2
  67. package/src/services/edgeColorPalette.js +6 -1
  68. package/src/services/relationGraphTraversal.js +14 -14
@@ -38,7 +38,7 @@ jest.mock("../../routines", () => ({
38
38
  }));
39
39
 
40
40
  jest.mock("../RelationTagsLoader", () =>
41
- jest.fn(() => <div>RelationTagsLoader</div>)
41
+ jest.fn(() => <div>RelationTagsLoader</div>),
42
42
  );
43
43
 
44
44
  jest.mock("@truedat/lm/components/TagTypeDropdownSelector", () =>
@@ -54,7 +54,7 @@ jest.mock("@truedat/lm/components/TagTypeDropdownSelector", () =>
54
54
  </button>
55
55
  ))}
56
56
  </div>
57
- ))
57
+ )),
58
58
  );
59
59
 
60
60
  jest.mock("@truedat/bg/concepts/relations/components/ConceptSelector", () =>
@@ -73,7 +73,7 @@ jest.mock("@truedat/bg/concepts/relations/components/ConceptSelector", () =>
73
73
  Select Concept
74
74
  </button>
75
75
  </div>
76
- ))
76
+ )),
77
77
  );
78
78
 
79
79
  jest.mock("@truedat/core/components", () => ({
@@ -241,12 +241,12 @@ describe("<ConceptLinkForm />", () => {
241
241
  />,
242
242
  {
243
243
  state: {},
244
- }
244
+ },
245
245
  );
246
246
  await waitForLoad(rendered);
247
247
 
248
248
  expect(
249
- rendered.queryByText("TagTypeDropdownSelector")
249
+ rendered.queryByText("TagTypeDropdownSelector"),
250
250
  ).not.toBeInTheDocument();
251
251
  });
252
252
  });
@@ -1,7 +1,7 @@
1
1
  import { render, fireEvent, screen, waitFor } from "@testing-library/react";
2
- import ConceptSuggestionLinkForm from "../ConceptSuggestionLinkForm";
3
2
  import { useSelector, useDispatch } from "react-redux";
4
3
  import { useParams } from "react-router";
4
+ import ConceptSuggestionLinkForm from "../ConceptSuggestionLinkForm";
5
5
  import { createRelation, clearSelectedRelationTags } from "../../routines";
6
6
 
7
7
  jest.mock("react-redux", () => ({
@@ -22,7 +22,7 @@ jest.mock("react-intl", () => ({
22
22
  // Mock selector factory
23
23
  jest.mock("@truedat/core/selectors", () => ({
24
24
  makeTagOptionsSelector: jest.fn(() =>
25
- jest.fn(() => [{ id: "tag1", name: "Tag 1" }])
25
+ jest.fn(() => [{ id: "tag1", name: "Tag 1" }]),
26
26
  ),
27
27
  }));
28
28
 
@@ -40,11 +40,11 @@ jest.mock("@truedat/ai/components/StructureSuggestions", () =>
40
40
  </button>
41
41
  </div>
42
42
  );
43
- })
43
+ }),
44
44
  );
45
45
 
46
46
  jest.mock("../TagTypeDropdownSelector", () =>
47
- jest.fn(() => <div>MockTagTypeDropdownSelector</div>)
47
+ jest.fn(() => <div>MockTagTypeDropdownSelector</div>),
48
48
  );
49
49
 
50
50
  jest.mock("@truedat/core/components", () => ({
@@ -58,10 +58,9 @@ jest.mock("@truedat/core/routes", () => ({
58
58
  }));
59
59
 
60
60
  jest.mock("../RelationTagsLoader", () =>
61
- jest.fn(() => <div>RelationTagsLoader</div>)
61
+ jest.fn(() => <div>RelationTagsLoader</div>),
62
62
  );
63
63
 
64
-
65
64
  describe("ConceptSuggestionLinkForm", () => {
66
65
  const mockDispatch = jest.fn();
67
66
 
@@ -73,7 +72,7 @@ describe("ConceptSuggestionLinkForm", () => {
73
72
  useSelector.mockImplementation((selector) =>
74
73
  selector({
75
74
  selectedRelationTags: ["tag1"],
76
- })
75
+ }),
77
76
  );
78
77
 
79
78
  clearSelectedRelationTags.trigger = jest.fn(() => ({ type: "CLEAR_TAGS" }));
@@ -115,7 +114,7 @@ describe("ConceptSuggestionLinkForm", () => {
115
114
  });
116
115
 
117
116
  expect(mockDispatch).toHaveBeenCalledWith(
118
- expect.objectContaining({ type: "CREATE_RELATION" })
117
+ expect.objectContaining({ type: "CREATE_RELATION" }),
119
118
  );
120
119
  });
121
120
 
@@ -19,7 +19,7 @@ describe("<ConfirmDeleteRelation />", () => {
19
19
  it("matches the latest snapshot", () => {
20
20
  const { container } = render(
21
21
  <ConfirmDeleteRelation {...props} />,
22
- renderOpts
22
+ renderOpts,
23
23
  );
24
24
  expect(container).toMatchSnapshot();
25
25
  });
@@ -17,7 +17,7 @@ describe("<ImplementationLinkRow />", () => {
17
17
 
18
18
  const { container } = render(
19
19
  <Table renderBodyRow={renderBodyRow} tableData={[{ id: 1 }]} />,
20
- renderOpts
20
+ renderOpts,
21
21
  );
22
22
  expect(container).toMatchSnapshot();
23
23
  });
@@ -28,7 +28,7 @@ describe("<ImplementationLinks />", () => {
28
28
  };
29
29
  const { container } = render(
30
30
  <ImplementationLinks {...props} />,
31
- renderOpts
31
+ renderOpts,
32
32
  );
33
33
  expect(container).toMatchSnapshot();
34
34
  });
@@ -43,7 +43,7 @@ describe("<ImplementationLinks />", () => {
43
43
  };
44
44
  const { container } = render(
45
45
  <ImplementationLinks {...props} />,
46
- renderOpts
46
+ renderOpts,
47
47
  );
48
48
  expect(container).toMatchSnapshot();
49
49
  });
@@ -49,7 +49,7 @@ const filterData = {
49
49
 
50
50
  jest.mock("@truedat/bg/concepts/hooks/useConcepts", () => {
51
51
  const originalModule = jest.requireActual(
52
- "@truedat/bg/concepts/hooks/useConcepts"
52
+ "@truedat/bg/concepts/hooks/useConcepts",
53
53
  );
54
54
 
55
55
  return {
@@ -94,7 +94,7 @@ describe("<ImplementationRelationForm />", () => {
94
94
  await waitForLoad(rendered);
95
95
 
96
96
  await waitFor(() =>
97
- expect(rendered.getByText(/relates_to/i)).toBeInTheDocument()
97
+ expect(rendered.getByText(/relates_to/i)).toBeInTheDocument(),
98
98
  );
99
99
 
100
100
  const user = userEvent.setup({ delay: null });
@@ -105,7 +105,7 @@ describe("<ImplementationRelationForm />", () => {
105
105
  });
106
106
 
107
107
  await waitFor(() =>
108
- expect(rendered.getByText(/foo concept/i)).toBeInTheDocument()
108
+ expect(rendered.getByText(/foo concept/i)).toBeInTheDocument(),
109
109
  );
110
110
 
111
111
  expect(rendered.container).toMatchSnapshot();
@@ -120,7 +120,7 @@ describe("<ImplementationRelationForm />", () => {
120
120
  const rendered = render(<ImplementationRelationForm {...newProps} />);
121
121
 
122
122
  await waitFor(() =>
123
- expect(rendered.getByText(/relates_to/i)).toBeInTheDocument()
123
+ expect(rendered.getByText(/relates_to/i)).toBeInTheDocument(),
124
124
  );
125
125
 
126
126
  expect(rendered.queryByRole("button", { name: /create/i })).toBeDisabled();
@@ -130,15 +130,15 @@ describe("<ImplementationRelationForm />", () => {
130
130
  await user.click(await rendered.findByText(/bar concept/i));
131
131
 
132
132
  await waitFor(() =>
133
- expect(rendered.queryByRole("button", { name: /create/i })).toBeEnabled()
133
+ expect(rendered.queryByRole("button", { name: /create/i })).toBeEnabled(),
134
134
  );
135
135
 
136
136
  await user.click(await rendered.findByRole("button", { name: /create/i }));
137
137
 
138
138
  await waitFor(() =>
139
139
  expect(rendered.queryByRole("button", { name: /create/i })).toHaveClass(
140
- "loading"
141
- )
140
+ "loading",
141
+ ),
142
142
  );
143
143
  });
144
144
 
@@ -147,7 +147,7 @@ describe("<ImplementationRelationForm />", () => {
147
147
  await waitForLoad(rendered);
148
148
 
149
149
  await waitFor(() =>
150
- expect(rendered.getByText(/relates_to/i)).toBeInTheDocument()
150
+ expect(rendered.getByText(/relates_to/i)).toBeInTheDocument(),
151
151
  );
152
152
 
153
153
  const user = userEvent.setup({ delay: null });
@@ -65,8 +65,18 @@ describe("<LinksPane />", () => {
65
65
  });
66
66
 
67
67
  const structureLinks = [
68
- { id: 1, resource_type: "data_structure", resource_id: 123, name: "Structure 1" },
69
- { id: 2, resource_type: "data_structure", resource_id: 456, name: "Structure 2" },
68
+ {
69
+ id: 1,
70
+ resource_type: "data_structure",
71
+ resource_id: 123,
72
+ name: "Structure 1",
73
+ },
74
+ {
75
+ id: 2,
76
+ resource_type: "data_structure",
77
+ resource_id: 456,
78
+ name: "Structure 2",
79
+ },
70
80
  ];
71
81
 
72
82
  const propsWithStructures = {
@@ -121,8 +131,18 @@ describe("<LinksPane />", () => {
121
131
  });
122
132
 
123
133
  const structureLinksMixedNotes = [
124
- { id: 1, resource_type: "data_structure", resource_id: 123, name: "Structure 1" },
125
- { id: 2, resource_type: "data_structure", resource_id: 456, name: "Structure 2" },
134
+ {
135
+ id: 1,
136
+ resource_type: "data_structure",
137
+ resource_id: 123,
138
+ name: "Structure 1",
139
+ },
140
+ {
141
+ id: 2,
142
+ resource_type: "data_structure",
143
+ resource_id: 456,
144
+ name: "Structure 2",
145
+ },
126
146
  ];
127
147
 
128
148
  const columnsWithNotes = [
@@ -154,7 +174,10 @@ describe("<LinksPane />", () => {
154
174
  groups: [[columnsWithNotes, ["tag", structureLinksMixedNotes]]],
155
175
  };
156
176
 
157
- const rendered = render(<LinksPane {...propsWithMixedNotes} />, renderOptsWithNotes);
177
+ const rendered = render(
178
+ <LinksPane {...propsWithMixedNotes} />,
179
+ renderOptsWithNotes,
180
+ );
158
181
  await waitForLoad(rendered);
159
182
 
160
183
  await waitFor(() => {
@@ -23,7 +23,7 @@ jest.mock("../../hooks/useRelations", () => ({
23
23
 
24
24
  jest.mock("@truedat/core/search/SearchContext", () => {
25
25
  const originalModule = jest.requireActual(
26
- "@truedat/core/search/SearchContext"
26
+ "@truedat/core/search/SearchContext",
27
27
  );
28
28
 
29
29
  return {
@@ -34,11 +34,11 @@ jest.mock("@truedat/core/search/SearchContext", () => {
34
34
  });
35
35
 
36
36
  jest.mock("../LinksPagination", () =>
37
- jest.fn(() => <div>LinksPagination</div>)
37
+ jest.fn(() => <div>LinksPagination</div>),
38
38
  );
39
39
 
40
40
  jest.mock("@truedat/core/search/SearchWidget", () =>
41
- jest.fn(() => <div>SearchWidget</div>)
41
+ jest.fn(() => <div>SearchWidget</div>),
42
42
  );
43
43
 
44
44
  const { useSearchContext } = require("@truedat/core/search/SearchContext");
@@ -89,7 +89,7 @@ describe("<LinksSearch />", () => {
89
89
  });
90
90
 
91
91
  const rendered = render(
92
- <LinksSearch columns={columns} defaultFilters={defaultFilters} />
92
+ <LinksSearch columns={columns} defaultFilters={defaultFilters} />,
93
93
  );
94
94
  await waitForLoad(rendered);
95
95
  expect(rendered.container).toMatchSnapshot();
@@ -103,7 +103,7 @@ describe("<LinksSearch />", () => {
103
103
  });
104
104
 
105
105
  const rendered = render(
106
- <LinksSearch columns={columns} defaultFilters={defaultFilters} />
106
+ <LinksSearch columns={columns} defaultFilters={defaultFilters} />,
107
107
  );
108
108
  await waitForLoad(rendered);
109
109
 
@@ -119,7 +119,7 @@ describe("<LinksSearch />", () => {
119
119
  });
120
120
 
121
121
  const rendered = render(
122
- <LinksSearch columns={columns} defaultFilters={defaultFilters} />
122
+ <LinksSearch columns={columns} defaultFilters={defaultFilters} />,
123
123
  );
124
124
  await waitForLoad(rendered);
125
125
 
@@ -136,7 +136,7 @@ describe("<LinksSearch />", () => {
136
136
  });
137
137
 
138
138
  const rendered = render(
139
- <LinksSearch columns={columns} defaultFilters={defaultFilters} />
139
+ <LinksSearch columns={columns} defaultFilters={defaultFilters} />,
140
140
  );
141
141
  await waitForLoad(rendered);
142
142
 
@@ -160,7 +160,7 @@ describe("<LinksSearch />", () => {
160
160
  columns={columns}
161
161
  defaultFilters={defaultFilters}
162
162
  extraRow={extraRow}
163
- />
163
+ />,
164
164
  );
165
165
  await waitForLoad(rendered);
166
166
 
@@ -184,7 +184,7 @@ describe("<LinksSearch />", () => {
184
184
  columns={columns}
185
185
  defaultFilters={defaultFilters}
186
186
  extraRow={extraRow}
187
- />
187
+ />,
188
188
  );
189
189
  await waitForLoad(rendered);
190
190
 
@@ -206,7 +206,7 @@ describe("<LinksSearch />", () => {
206
206
  columns={columns}
207
207
  defaultFilters={defaultFilters}
208
208
  deletedLinkId={2}
209
- />
209
+ />,
210
210
  );
211
211
  await waitForLoad(rendered);
212
212
 
@@ -232,7 +232,7 @@ describe("<LinksSearch />", () => {
232
232
  defaultFilters={defaultFilters}
233
233
  refetchSearch={true}
234
234
  setRefetchSearch={setRefetchSearch}
235
- />
235
+ />,
236
236
  );
237
237
  await waitForLoad(rendered);
238
238
 
@@ -266,7 +266,7 @@ describe("<LinksSearch />", () => {
266
266
  columns={columns}
267
267
  defaultFilters={defaultFilters}
268
268
  extraRow={extraRow}
269
- />
269
+ />,
270
270
  );
271
271
  await waitForLoad(rendered);
272
272
 
@@ -286,7 +286,7 @@ describe("<LinksSearch />", () => {
286
286
  columns={columns}
287
287
  defaultFilters={defaultFilters}
288
288
  extraRow={extraRow}
289
- />
289
+ />,
290
290
  );
291
291
 
292
292
  await waitFor(() => {
@@ -45,8 +45,8 @@ jest.mock("../LinksSearch", () =>
45
45
  {JSON.stringify(defaultFilters)}
46
46
  </div>
47
47
  </div>
48
- )
49
- )
48
+ ),
49
+ ),
50
50
  );
51
51
 
52
52
  jest.mock("../ConfirmDeleteRelation", () =>
@@ -57,18 +57,18 @@ jest.mock("../ConfirmDeleteRelation", () =>
57
57
  >
58
58
  Delete {id}
59
59
  </button>
60
- ))
60
+ )),
61
61
  );
62
62
 
63
63
  jest.mock("@truedat/core/routes", () => ({
64
64
  linkTo: {
65
65
  QUALITY_CONTROL_CONCEPT_LINKS_NEW: jest.fn(
66
66
  ({ id, version }) =>
67
- `/qualityControls/${id}/version/${version}/links/concepts/new`
67
+ `/qualityControls/${id}/version/${version}/links/concepts/new`,
68
68
  ),
69
69
  CONCEPT_LINKS_QUALITY_CONTROLS: jest.fn(
70
70
  ({ business_concept_id, id }) =>
71
- `/concepts/${business_concept_id}/links/qualityControls/${id}`
71
+ `/concepts/${business_concept_id}/links/qualityControls/${id}`,
72
72
  ),
73
73
  },
74
74
  }));
@@ -100,7 +100,7 @@ describe("<QualityControlConcepts />", () => {
100
100
  <QualityControlConcepts
101
101
  qualityControl={qualityControl}
102
102
  actions={actions}
103
- />
103
+ />,
104
104
  );
105
105
  await waitForLoad(rendered);
106
106
  expect(rendered.container).toMatchSnapshot();
@@ -111,7 +111,7 @@ describe("<QualityControlConcepts />", () => {
111
111
  <QualityControlConcepts
112
112
  qualityControl={qualityControl}
113
113
  actions={actions}
114
- />
114
+ />,
115
115
  );
116
116
  await waitForLoad(rendered);
117
117
 
@@ -121,7 +121,7 @@ describe("<QualityControlConcepts />", () => {
121
121
  target_id: 10,
122
122
  target_type: "quality_control",
123
123
  source_type: "business_concept",
124
- })
124
+ }),
125
125
  );
126
126
  });
127
127
 
@@ -130,7 +130,7 @@ describe("<QualityControlConcepts />", () => {
130
130
  <QualityControlConcepts
131
131
  qualityControl={qualityControl}
132
132
  actions={actions}
133
- />
133
+ />,
134
134
  );
135
135
  await waitForLoad(rendered);
136
136
 
@@ -141,12 +141,12 @@ describe("<QualityControlConcepts />", () => {
141
141
 
142
142
  it("hides create button when user does not have link_to_business_concept permission", async () => {
143
143
  const rendered = render(
144
- <QualityControlConcepts qualityControl={qualityControl} actions={[]} />
144
+ <QualityControlConcepts qualityControl={qualityControl} actions={[]} />,
145
145
  );
146
146
  await waitForLoad(rendered);
147
147
 
148
148
  expect(
149
- rendered.queryByText("links.actions.create")
149
+ rendered.queryByText("links.actions.create"),
150
150
  ).not.toBeInTheDocument();
151
151
  });
152
152
 
@@ -155,13 +155,13 @@ describe("<QualityControlConcepts />", () => {
155
155
  <QualityControlConcepts
156
156
  qualityControl={qualityControl}
157
157
  actions={actions}
158
- />
158
+ />,
159
159
  );
160
160
  await waitForLoad(rendered);
161
161
 
162
162
  await waitFor(() => {
163
163
  const columnsCount = parseInt(
164
- rendered.getByTestId("columns-count").textContent
164
+ rendered.getByTestId("columns-count").textContent,
165
165
  );
166
166
  expect(columnsCount).toBe(5); // name, domain, tags, status, delete
167
167
  });
@@ -169,13 +169,13 @@ describe("<QualityControlConcepts />", () => {
169
169
 
170
170
  it("excludes delete column when user does not have permission", async () => {
171
171
  const rendered = render(
172
- <QualityControlConcepts qualityControl={qualityControl} actions={[]} />
172
+ <QualityControlConcepts qualityControl={qualityControl} actions={[]} />,
173
173
  );
174
174
  await waitForLoad(rendered);
175
175
 
176
176
  await waitFor(() => {
177
177
  const columnsCount = parseInt(
178
- rendered.getByTestId("columns-count").textContent
178
+ rendered.getByTestId("columns-count").textContent,
179
179
  );
180
180
  expect(columnsCount).toBe(4); // name, domain, tags, status (no delete)
181
181
  });
@@ -194,14 +194,14 @@ describe("<QualityControlConcepts />", () => {
194
194
  <QualityControlConcepts
195
195
  qualityControl={qualityControl}
196
196
  actions={actions}
197
- />
197
+ />,
198
198
  );
199
199
  await waitForLoad(rendered);
200
200
 
201
201
  await waitFor(() => {
202
202
  expect(rendered.getByTestId("extra-row")).toBeInTheDocument();
203
203
  expect(rendered.getByTestId("extra-row").textContent).toBe(
204
- JSON.stringify(createdRelation)
204
+ JSON.stringify(createdRelation),
205
205
  );
206
206
  });
207
207
  });
@@ -211,7 +211,7 @@ describe("<QualityControlConcepts />", () => {
211
211
  <QualityControlConcepts
212
212
  qualityControl={qualityControl}
213
213
  actions={actions}
214
- />
214
+ />,
215
215
  );
216
216
  await waitForLoad(rendered);
217
217
 
@@ -221,14 +221,14 @@ describe("<QualityControlConcepts />", () => {
221
221
 
222
222
  // Verify the delete column is included when user has permission
223
223
  const columnsCount = parseInt(
224
- rendered.getByTestId("columns-count").textContent
224
+ rendered.getByTestId("columns-count").textContent,
225
225
  );
226
226
  expect(columnsCount).toBe(5); // Includes delete column
227
227
  });
228
228
 
229
229
  it("handles missing qualityControl gracefully", async () => {
230
230
  const rendered = render(
231
- <QualityControlConcepts qualityControl={null} actions={actions} />
231
+ <QualityControlConcepts qualityControl={null} actions={actions} />,
232
232
  );
233
233
  await waitForLoad(rendered);
234
234
 
@@ -238,7 +238,7 @@ describe("<QualityControlConcepts />", () => {
238
238
  target_id: undefined,
239
239
  target_type: "quality_control",
240
240
  source_type: "business_concept",
241
- })
241
+ }),
242
242
  );
243
243
  });
244
244
 
@@ -252,11 +252,11 @@ describe("<QualityControlConcepts />", () => {
252
252
  <QualityControlConcepts
253
253
  qualityControl={qualityControl}
254
254
  actions={actions}
255
- />
255
+ />,
256
256
  );
257
257
 
258
258
  expect(
259
- rendered.container.querySelector(".segment.loading")
259
+ rendered.container.querySelector(".segment.loading"),
260
260
  ).toBeInTheDocument();
261
261
  });
262
262
  });
@@ -47,8 +47,8 @@ jest.mock("../LinksSearch", () =>
47
47
  {JSON.stringify(defaultFilters)}
48
48
  </div>
49
49
  </div>
50
- )
51
- )
50
+ ),
51
+ ),
52
52
  );
53
53
 
54
54
  jest.mock("../ConfirmDeleteRelation", () =>
@@ -59,14 +59,14 @@ jest.mock("../ConfirmDeleteRelation", () =>
59
59
  >
60
60
  Delete {id}
61
61
  </button>
62
- ))
62
+ )),
63
63
  );
64
64
 
65
65
  jest.mock("@truedat/core/routes", () => ({
66
66
  linkTo: {
67
67
  QUALITY_CONTROL_STRUCTURE_LINKS_NEW: jest.fn(
68
68
  ({ id, version }) =>
69
- `/qualityControls/${id}/version/${version}/links/structures/new`
69
+ `/qualityControls/${id}/version/${version}/links/structures/new`,
70
70
  ),
71
71
  STRUCTURE: jest.fn(({ id }) => `/structures/${id}`),
72
72
  },
@@ -109,7 +109,7 @@ describe("<QualityControlStructures />", () => {
109
109
  <QualityControlStructures
110
110
  qualityControl={qualityControl}
111
111
  actions={actions}
112
- />
112
+ />,
113
113
  );
114
114
  await waitForLoad(rendered);
115
115
  expect(rendered.container).toMatchSnapshot();
@@ -120,7 +120,7 @@ describe("<QualityControlStructures />", () => {
120
120
  <QualityControlStructures
121
121
  qualityControl={qualityControl}
122
122
  actions={actions}
123
- />
123
+ />,
124
124
  );
125
125
  await waitForLoad(rendered);
126
126
 
@@ -129,12 +129,12 @@ describe("<QualityControlStructures />", () => {
129
129
 
130
130
  it("does not render create button when canCreateLink is false", async () => {
131
131
  const rendered = render(
132
- <QualityControlStructures qualityControl={qualityControl} actions={[]} />
132
+ <QualityControlStructures qualityControl={qualityControl} actions={[]} />,
133
133
  );
134
134
  await waitForLoad(rendered);
135
135
 
136
136
  expect(
137
- rendered.queryByText("links.actions.create")
137
+ rendered.queryByText("links.actions.create"),
138
138
  ).not.toBeInTheDocument();
139
139
  });
140
140
 
@@ -143,12 +143,12 @@ describe("<QualityControlStructures />", () => {
143
143
  <QualityControlStructures
144
144
  qualityControl={qualityControl}
145
145
  actions={actions}
146
- />
146
+ />,
147
147
  );
148
148
  await waitForLoad(rendered);
149
149
 
150
150
  const defaultFilters = JSON.parse(
151
- rendered.getByTestId("default-filters").textContent
151
+ rendered.getByTestId("default-filters").textContent,
152
152
  );
153
153
  expect(defaultFilters).toEqual({
154
154
  source_id: 10,
@@ -162,13 +162,13 @@ describe("<QualityControlStructures />", () => {
162
162
  <QualityControlStructures
163
163
  qualityControl={qualityControl}
164
164
  actions={actions}
165
- />
165
+ />,
166
166
  );
167
167
  await waitForLoad(rendered);
168
168
 
169
169
  await waitFor(() => {
170
170
  const columnsCount = parseInt(
171
- rendered.getByTestId("columns-count").textContent
171
+ rendered.getByTestId("columns-count").textContent,
172
172
  );
173
173
  // Should include delete column: name, domain, system, path, last_change_at, relation_tags, deleted_at, delete
174
174
  expect(columnsCount).toBe(8);
@@ -177,13 +177,13 @@ describe("<QualityControlStructures />", () => {
177
177
 
178
178
  it("excludes delete column when user does not have permission", async () => {
179
179
  const rendered = render(
180
- <QualityControlStructures qualityControl={qualityControl} actions={[]} />
180
+ <QualityControlStructures qualityControl={qualityControl} actions={[]} />,
181
181
  );
182
182
  await waitForLoad(rendered);
183
183
 
184
184
  await waitFor(() => {
185
185
  const columnsCount = parseInt(
186
- rendered.getByTestId("columns-count").textContent
186
+ rendered.getByTestId("columns-count").textContent,
187
187
  );
188
188
  // Should not include delete column: name, domain, system, path, last_change_at, relation_tags, deleted_at
189
189
  expect(columnsCount).toBe(7);
@@ -202,7 +202,7 @@ describe("<QualityControlStructures />", () => {
202
202
  <QualityControlStructures
203
203
  qualityControl={qualityControl}
204
204
  actions={actions}
205
- />
205
+ />,
206
206
  );
207
207
  await waitForLoad(rendered);
208
208
 
@@ -12,21 +12,21 @@ jest.mock(
12
12
  () =>
13
13
  function NewRelationTag() {
14
14
  return <div>NewRelationTag</div>;
15
- }
15
+ },
16
16
  );
17
17
  jest.mock(
18
18
  "../RelationTags",
19
19
  () =>
20
20
  function RelationTags() {
21
21
  return <div>RelationTags</div>;
22
- }
22
+ },
23
23
  );
24
24
  jest.mock(
25
25
  "../RelationTagsLoader",
26
26
  () =>
27
27
  function RelationTagsLoader() {
28
28
  return <div>RelationTagsLoader</div>;
29
- }
29
+ },
30
30
  );
31
31
  jest.mock("@truedat/core/components", () => ({
32
32
  Unauthorized: () => <div>Unauthorized</div>,