@truedat/dq 4.51.7 → 4.52.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.
- package/CHANGELOG.md +8 -1
- package/package.json +5 -5
- package/src/components/RuleEventDecorator.js +11 -7
- package/src/components/RuleImplementationEventRow.js +1 -1
- package/src/components/__tests__/RuleEventDecorator.spec.js +10 -0
- package/src/components/__tests__/RuleImplementationEvents.spec.js +11 -12
- package/src/components/__tests__/__snapshots__/ExecutionGroup.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/RuleEventDecorator.spec.js.snap +10 -0
- package/src/components/__tests__/__snapshots__/RuleImplementationEvents.spec.js.snap +32 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [4.
|
|
3
|
+
## [4.52.1] 2022-09-21
|
|
4
4
|
|
|
5
5
|
### Fixed
|
|
6
6
|
|
|
7
7
|
- [TD-5164] RuleEventDecorator exception if quality_events is empty
|
|
8
8
|
|
|
9
|
+
## [4.52.0] 2022-09-20
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- [TD-5135] Error in implementation audit component when field value is an
|
|
14
|
+
object
|
|
15
|
+
|
|
9
16
|
## [4.51.3] 2022-09-16
|
|
10
17
|
|
|
11
18
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.52.1",
|
|
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.4",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.
|
|
37
|
+
"@truedat/test": "4.52.0",
|
|
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",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@apollo/client": "^3.6.4",
|
|
96
|
-
"@truedat/core": "4.
|
|
97
|
-
"@truedat/df": "4.
|
|
96
|
+
"@truedat/core": "4.52.0",
|
|
97
|
+
"@truedat/df": "4.52.0",
|
|
98
98
|
"graphql": "^15.5.3",
|
|
99
99
|
"path-to-regexp": "^1.7.0",
|
|
100
100
|
"prop-types": "^15.8.1",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"react-dom": ">= 16.8.6 < 17",
|
|
115
115
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "3eea3b93dcb8dc264af0779fd621971216f0e8aa"
|
|
118
118
|
}
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import { flow, last, prop, sortBy } from "lodash/fp";
|
|
1
|
+
import { flow, last, prop, propOr, sortBy } from "lodash/fp";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Icon } from "semantic-ui-react";
|
|
5
5
|
|
|
6
|
+
const PENDING = { name: "info circle", color: "green" };
|
|
7
|
+
|
|
6
8
|
export const icons = {
|
|
7
|
-
PENDING
|
|
9
|
+
PENDING,
|
|
8
10
|
STARTED: { name: "play circle outline", color: "green" },
|
|
9
11
|
SUCCEEDED: { name: "check circle outline", color: "green" },
|
|
10
12
|
FAILED: { name: "warning circle", color: "red" },
|
|
11
13
|
};
|
|
12
|
-
|
|
14
|
+
|
|
15
|
+
export const RuleEventDecorator = ({ _embedded }) => {
|
|
13
16
|
const event = flow(
|
|
17
|
+
propOr([], "quality_events"),
|
|
14
18
|
sortBy("inserted_at"),
|
|
15
19
|
last,
|
|
16
20
|
prop("type")
|
|
17
|
-
)(_embedded
|
|
18
|
-
const icon = icons
|
|
21
|
+
)(_embedded);
|
|
22
|
+
const icon = propOr(PENDING, event)(icons);
|
|
19
23
|
return <Icon size="large" {...icon} />;
|
|
20
24
|
};
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
RuleEventDecorator.propTypes = {
|
|
23
27
|
_embedded: PropTypes.object,
|
|
24
28
|
};
|
|
25
29
|
|
|
26
|
-
export default
|
|
30
|
+
export default RuleEventDecorator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import { RuleEventDecorator } from "../RuleEventDecorator";
|
|
4
|
+
|
|
5
|
+
describe("<RuleEventDecorator />", () => {
|
|
6
|
+
it("matches latest snapshot (no events)", () => {
|
|
7
|
+
const { container } = render(<RuleEventDecorator />);
|
|
8
|
+
expect(container).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -20,23 +20,22 @@ describe("<RuleImplementationEvents />", () => {
|
|
|
20
20
|
ts: "2019-09-12T02:00:00Z",
|
|
21
21
|
payload: [{ field: "bar", action: "deprecated" }],
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
{
|
|
24
|
+
id: 3,
|
|
25
|
+
service: "service",
|
|
26
|
+
event: "implementation_changed",
|
|
27
|
+
resource_id: 100,
|
|
28
|
+
ts: "2019-09-12T02:00:00Z",
|
|
29
|
+
payload: [
|
|
30
|
+
{ field: "bar", action: "changed", value: { id: 123, name: "foo" } },
|
|
31
|
+
],
|
|
30
32
|
},
|
|
31
|
-
|
|
33
|
+
];
|
|
32
34
|
|
|
33
35
|
const props = { events };
|
|
34
36
|
|
|
35
37
|
it("matches the latest snapshot", () => {
|
|
36
|
-
const { container } = render(
|
|
37
|
-
<RuleImplementationEvents {...props} />,
|
|
38
|
-
renderOpts
|
|
39
|
-
);
|
|
38
|
+
const { container } = render(<RuleImplementationEvents {...props} />);
|
|
40
39
|
expect(container).toMatchSnapshot();
|
|
41
40
|
});
|
|
42
41
|
});
|
|
@@ -34,7 +34,7 @@ exports[`<RuleImplementationEvents /> matches the latest snapshot 1`] = `
|
|
|
34
34
|
<div
|
|
35
35
|
class="text extra"
|
|
36
36
|
>
|
|
37
|
-
restored
|
|
37
|
+
Implementation restored
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -64,7 +64,37 @@ exports[`<RuleImplementationEvents /> matches the latest snapshot 1`] = `
|
|
|
64
64
|
<div
|
|
65
65
|
class="text extra"
|
|
66
66
|
>
|
|
67
|
-
deprecated
|
|
67
|
+
Implementation deprecated
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div
|
|
72
|
+
class="event"
|
|
73
|
+
>
|
|
74
|
+
<div
|
|
75
|
+
class="content"
|
|
76
|
+
>
|
|
77
|
+
<div
|
|
78
|
+
class="summary"
|
|
79
|
+
>
|
|
80
|
+
<a
|
|
81
|
+
class="user"
|
|
82
|
+
/>
|
|
83
|
+
|
|
84
|
+
<div
|
|
85
|
+
class="date"
|
|
86
|
+
>
|
|
87
|
+
<time
|
|
88
|
+
datetime="1568253600000"
|
|
89
|
+
>
|
|
90
|
+
2019-09-12 02:00
|
|
91
|
+
</time>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div
|
|
95
|
+
class="text extra"
|
|
96
|
+
>
|
|
97
|
+
Field bar changed to {"id":123,"name":"foo"}
|
|
68
98
|
</div>
|
|
69
99
|
</div>
|
|
70
100
|
</div>
|