@truedat/dd 8.12.5 → 8.12.6
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/dd",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.6",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@testing-library/jest-dom": "^6.6.3",
|
|
55
55
|
"@testing-library/react": "^16.3.0",
|
|
56
56
|
"@testing-library/user-event": "^14.6.1",
|
|
57
|
-
"@truedat/test": "8.12.
|
|
57
|
+
"@truedat/test": "8.12.6",
|
|
58
58
|
"identity-obj-proxy": "^3.0.0",
|
|
59
59
|
"jest": "^29.7.0",
|
|
60
60
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"svg-pan-zoom": "^3.6.2",
|
|
91
91
|
"swr": "^2.3.3"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "fe7375c2d3c6ebdaf3dacd985f56433eda477712"
|
|
94
94
|
}
|
|
@@ -24,18 +24,27 @@ const linksField = (field) =>
|
|
|
24
24
|
(s) => s.kind === "Field" && s.name.value === "links",
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
const
|
|
27
|
+
const expectResourceType = (field, value) => {
|
|
28
|
+
const resourceType = linksField(field).arguments.find(
|
|
29
|
+
(argument) => argument.name.value === "resource_type",
|
|
30
|
+
);
|
|
31
|
+
expect(resourceType.value.value).toBe(value);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const expectRelationLinks = (document, childrenResourceType) => {
|
|
28
35
|
const parents = fieldAtPath(document, PARENT_PATH);
|
|
29
36
|
const children = fieldAtPath(document, CHILD_PATH);
|
|
30
37
|
|
|
31
38
|
expect(selectionNames(parents)).toEqual(expect.arrayContaining(["links"]));
|
|
32
39
|
expect(selectionNames(children)).toEqual(expect.arrayContaining(["links"]));
|
|
33
40
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
expectResourceType(parents, "business_concept");
|
|
42
|
+
|
|
43
|
+
if (childrenResourceType) {
|
|
44
|
+
expectResourceType(children, childrenResourceType);
|
|
45
|
+
} else {
|
|
46
|
+
expect(linksField(children).arguments).toEqual([]);
|
|
47
|
+
}
|
|
39
48
|
};
|
|
40
49
|
|
|
41
50
|
describe("LEGACY_DATA_STRUCTURE_VERSION_QUERY", () => {
|
|
@@ -46,10 +55,10 @@ describe("LEGACY_DATA_STRUCTURE_VERSION_QUERY", () => {
|
|
|
46
55
|
|
|
47
56
|
describe("buildDSVQuery", () => {
|
|
48
57
|
it("requests concept links on parent and child structure relations", () => {
|
|
49
|
-
expectRelationLinks(buildDSVQuery(false));
|
|
58
|
+
expectRelationLinks(buildDSVQuery(false), "business_concept");
|
|
50
59
|
});
|
|
51
60
|
|
|
52
61
|
it("requests concept links on parent and child structure relations when loading metadata", () => {
|
|
53
|
-
expectRelationLinks(buildDSVQuery(true));
|
|
62
|
+
expectRelationLinks(buildDSVQuery(true), "business_concept");
|
|
54
63
|
});
|
|
55
64
|
});
|