@truedat/df 6.6.5 → 6.6.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/df",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.6",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.5",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "6.6.
|
|
37
|
+
"@truedat/test": "6.6.6",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@apollo/client": "^3.7.1",
|
|
90
|
-
"@truedat/auth": "6.6.
|
|
91
|
-
"@truedat/core": "6.6.
|
|
90
|
+
"@truedat/auth": "6.6.6",
|
|
91
|
+
"@truedat/core": "6.6.6",
|
|
92
92
|
"decode-uri-component": "^0.2.2",
|
|
93
93
|
"path-to-regexp": "^1.7.0",
|
|
94
94
|
"prop-types": "^15.8.1",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"react-dom": ">= 16.8.6 < 17",
|
|
110
110
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "87a359e52cc9df990110f9dcbb39a2f3d6b6eb80"
|
|
113
113
|
}
|
|
@@ -88,7 +88,8 @@ export const DynamicField = ({
|
|
|
88
88
|
<label>
|
|
89
89
|
{(label && fieldProps.type != "hierarchy") ||
|
|
90
90
|
(fieldProps.type == "hierarchy" &&
|
|
91
|
-
fieldProps.values.hierarchy.min_depth == 0
|
|
91
|
+
(fieldProps.values.hierarchy.min_depth == 0 ||
|
|
92
|
+
!fieldProps.values.hierarchy.min_depth)) ? (
|
|
92
93
|
<FormattedMessage id={`fields.${label}`} defaultMessage={label} />
|
|
93
94
|
) : null}
|
|
94
95
|
{label &&
|
|
@@ -16,4 +16,52 @@ describe("<HierarchyDropdown />", () => {
|
|
|
16
16
|
const { container } = render(<HierarchyDropdown {...props} />);
|
|
17
17
|
expect(container).toMatchSnapshot();
|
|
18
18
|
});
|
|
19
|
+
|
|
20
|
+
it("matches the latest snapshot (min-depth 0)", async () => {
|
|
21
|
+
const missingMinDepthProps = {
|
|
22
|
+
field: {
|
|
23
|
+
name: "foo",
|
|
24
|
+
cardinality: "*",
|
|
25
|
+
value: "",
|
|
26
|
+
values: { hierarchy: { id: 50, min_depth: 0 } },
|
|
27
|
+
},
|
|
28
|
+
onChange: jest.fn(),
|
|
29
|
+
};
|
|
30
|
+
const { container } = render(
|
|
31
|
+
<HierarchyDropdown {...missingMinDepthProps} />
|
|
32
|
+
);
|
|
33
|
+
expect(container).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("matches the latest snapshot (min-depth 2)", async () => {
|
|
37
|
+
const missingMinDepthProps = {
|
|
38
|
+
field: {
|
|
39
|
+
name: "foo",
|
|
40
|
+
cardinality: "*",
|
|
41
|
+
value: "",
|
|
42
|
+
values: { hierarchy: { id: 50, min_depth: 2 } },
|
|
43
|
+
},
|
|
44
|
+
onChange: jest.fn(),
|
|
45
|
+
};
|
|
46
|
+
const { container } = render(
|
|
47
|
+
<HierarchyDropdown {...missingMinDepthProps} />
|
|
48
|
+
);
|
|
49
|
+
expect(container).toMatchSnapshot();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("matches the latest snapshot (missing min-depth)", async () => {
|
|
53
|
+
const missingMinDepthProps = {
|
|
54
|
+
field: {
|
|
55
|
+
name: "foo",
|
|
56
|
+
cardinality: "*",
|
|
57
|
+
value: "",
|
|
58
|
+
values: { hierarchy: { id: 50 } },
|
|
59
|
+
},
|
|
60
|
+
onChange: jest.fn(),
|
|
61
|
+
};
|
|
62
|
+
const { container } = render(
|
|
63
|
+
<HierarchyDropdown {...missingMinDepthProps} />
|
|
64
|
+
);
|
|
65
|
+
expect(container).toMatchSnapshot();
|
|
66
|
+
});
|
|
19
67
|
});
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`<HierarchyDropdown /> matches the latest snapshot (min-depth 0) 1`] = `<div />`;
|
|
4
|
+
|
|
5
|
+
exports[`<HierarchyDropdown /> matches the latest snapshot (min-depth 2) 1`] = `<div />`;
|
|
6
|
+
|
|
7
|
+
exports[`<HierarchyDropdown /> matches the latest snapshot (missing min-depth) 1`] = `<div />`;
|
|
8
|
+
|
|
3
9
|
exports[`<HierarchyDropdown /> matches the latest snapshot 1`] = `<div />`;
|