@truedat/dq 4.44.0 → 4.44.3
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 +20 -1
- package/package.json +5 -5
- package/src/components/EditRule.js +1 -1
- package/src/components/ExecutionForm.js +68 -78
- package/src/components/ExecutionPopup.js +10 -6
- package/src/components/ImplementationCrumbs.js +91 -0
- package/src/components/ImplementationResultBar.js +1 -2
- package/src/components/ImplementationStructures.js +1 -3
- package/src/components/Implementations.js +9 -2
- package/src/components/ImplementationsRoutes.js +386 -17
- package/src/components/NewRule.js +1 -1
- package/src/components/NewRuleImplementation.js +99 -135
- package/src/components/RemediationCrumbs.js +1 -2
- package/src/components/RemediationForm.js +32 -43
- package/src/components/RuleCrumbs.js +6 -63
- package/src/components/RuleForm.js +102 -103
- package/src/components/RuleImplementation.js +35 -40
- package/src/components/RuleImplementationActions.js +19 -23
- package/src/components/RuleImplementationLink.js +2 -3
- package/src/components/RuleImplementationProperties.js +13 -14
- package/src/components/RuleImplementationResultTabs.js +27 -35
- package/src/components/RuleImplementationResults.js +1 -6
- package/src/components/RuleImplementationResultsLink.js +3 -9
- package/src/components/RuleImplementationTabs.js +13 -18
- package/src/components/RuleImplementationsActions.js +48 -2
- package/src/components/RuleLink.js +3 -4
- package/src/components/RuleResultRow.js +1 -6
- package/src/components/RuleResultSegmentRow.js +0 -3
- package/src/components/RuleResultSegments.js +2 -6
- package/src/components/RuleResultsRoutes.js +45 -60
- package/src/components/RuleRoutes.js +41 -334
- package/src/components/RulesRoutes.js +0 -5
- package/src/components/__tests__/ExecutionForm.spec.js +7 -1
- package/src/components/__tests__/ExecutionPopup.spec.js +3 -2
- package/src/components/__tests__/ImplementationResultBar.spec.js +44 -63
- package/src/components/__tests__/InformationSummary.spec.js +2 -6
- package/src/components/__tests__/NewRuleImplementation.spec.js +4 -6
- package/src/components/__tests__/RemediationForm.spec.js +47 -58
- package/src/components/__tests__/RuleForm.spec.js +80 -207
- package/src/components/__tests__/RuleImplementation.spec.js +45 -22
- package/src/components/__tests__/RuleImplementationsActions.spec.js +0 -1
- package/src/components/__tests__/RuleImplementationsOptions.spec.js +1 -10
- package/src/components/__tests__/RuleResultsUpload.spec.js +1 -5
- package/src/components/__tests__/RuleSummary.spec.js +6 -11
- package/src/components/__tests__/__snapshots__/EditRule.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/ExecutionForm.spec.js.snap +1 -2
- package/src/components/__tests__/__snapshots__/ImplementationResultBar.spec.js.snap +5 -5
- package/src/components/__tests__/__snapshots__/NewRule.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/NewRuleImplementation.spec.js.snap +3 -0
- package/src/components/__tests__/__snapshots__/RemediationForm.spec.js.snap +2 -3
- package/src/components/__tests__/__snapshots__/RuleCrumbs.spec.js.snap +2 -73
- package/src/components/__tests__/__snapshots__/RuleForm.spec.js.snap +699 -385
- package/src/components/__tests__/__snapshots__/RuleImplementation.spec.js.snap +20 -33
- package/src/components/__tests__/__snapshots__/RuleImplementationResultTabs.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/RuleImplementationResults.spec.js.snap +0 -7
- package/src/components/__tests__/__snapshots__/RuleImplementationResultsLink.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/RuleImplementationTabs.spec.js.snap +5 -5
- package/src/components/__tests__/__snapshots__/RuleImplementationsActions.spec.js.snap +1 -1
- package/src/components/index.js +0 -2
- package/src/components/ruleImplementationForm/InformationForm.js +51 -74
- package/src/components/ruleImplementationForm/RuleImplementationForm.js +52 -47
- package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +76 -98
- package/src/components/ruleImplementationForm/__tests__/LimitsForm.spec.js +9 -35
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationForm.spec.js +26 -51
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +42 -2
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationForm.spec.js.snap +88 -17
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationRawForm.spec.js.snap +12 -1
- package/src/messages/en.js +7 -6
- package/src/messages/es.js +7 -6
- package/src/reducers/__tests__/ruleImplementationRedirect.spec.js +2 -2
- package/src/reducers/__tests__/ruleRedirect.spec.js +3 -3
- package/src/reducers/ruleImplementation.js +3 -0
- package/src/reducers/ruleImplementationRedirect.js +7 -6
- package/src/reducers/ruleRedirect.js +4 -2
- package/src/reducers/userRulePermissions.js +3 -1
- package/src/sagas/__tests__/deleteRuleResult.spec.js +3 -5
- package/src/sagas/__tests__/setRuleImplementationStatus.spec.js +7 -4
- package/src/sagas/deleteRuleResult.js +2 -7
- package/src/sagas/setRuleImplementationStatus.js +7 -1
- package/src/components/DynamicRuleForm.js +0 -78
- package/src/components/__tests__/DynamicRuleForm.spec.js +0 -51
- package/src/components/__tests__/__snapshots__/DynamicRuleForm.spec.js.snap +0 -3
|
@@ -9,37 +9,60 @@ const state = {
|
|
|
9
9
|
rule_id: 1,
|
|
10
10
|
implementation_key: "impl key",
|
|
11
11
|
id: 1,
|
|
12
|
+
executable: true,
|
|
12
13
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const stateExecutePermission = {
|
|
17
|
+
...state,
|
|
18
|
+
implementationActions: {
|
|
19
|
+
manage: true,
|
|
20
|
+
link_concept: true,
|
|
21
|
+
execute: true,
|
|
16
22
|
},
|
|
17
|
-
implementationActions: { link_concept: true },
|
|
18
23
|
};
|
|
19
24
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"ruleImplementation.actions.delete.confirmation.header": "header",
|
|
27
|
-
"ruleImplementation.actions.deprecate": "archive",
|
|
28
|
-
"ruleImplementation.actions.edit": "edit",
|
|
29
|
-
"ruleImplementation.actions.move": "move",
|
|
30
|
-
"tabs.dq.implementation.links.concepts": "Related concepts",
|
|
31
|
-
"tabs.dq.implementation.structures": "Structures",
|
|
32
|
-
"tabs.dq.ruleImplementation.audit": "events",
|
|
33
|
-
"tabs.dq.ruleImplementation.results": "results",
|
|
34
|
-
"tabs.dq.ruleImplementation": "implementation",
|
|
35
|
-
},
|
|
25
|
+
const stateNoExecutePermission = {
|
|
26
|
+
...state,
|
|
27
|
+
implementationActions: {
|
|
28
|
+
manage: true,
|
|
29
|
+
link_concept: true,
|
|
30
|
+
execute: false,
|
|
36
31
|
},
|
|
37
|
-
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const renderOptsNoExecutePermission = {
|
|
35
|
+
state: stateNoExecutePermission,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const renderOptsExecutePermission = {
|
|
39
|
+
state: stateExecutePermission,
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
describe("<RuleImplementation />", () => {
|
|
41
43
|
it("matches the latest snapshot", () => {
|
|
42
|
-
const { container } = render(
|
|
44
|
+
const { container } = render(
|
|
45
|
+
<RuleImplementation />,
|
|
46
|
+
renderOptsExecutePermission
|
|
47
|
+
);
|
|
43
48
|
expect(container).toMatchSnapshot();
|
|
44
49
|
});
|
|
50
|
+
|
|
51
|
+
it("presence of execute permissions enables the execute button", () => {
|
|
52
|
+
const { queryByText } = render(
|
|
53
|
+
<RuleImplementation />,
|
|
54
|
+
renderOptsExecutePermission
|
|
55
|
+
);
|
|
56
|
+
const button = queryByText(/execute/i);
|
|
57
|
+
expect(button).toBeInTheDocument();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it("lack of execute permissions disables the execute button", () => {
|
|
61
|
+
const { queryByText } = render(
|
|
62
|
+
<RuleImplementation />,
|
|
63
|
+
renderOptsNoExecutePermission
|
|
64
|
+
);
|
|
65
|
+
const button = queryByText(/execute/i);
|
|
66
|
+
expect(button).not.toBeInTheDocument();
|
|
67
|
+
});
|
|
45
68
|
});
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { waitFor } from "@testing-library/react";
|
|
3
3
|
import { render } from "@truedat/test/render";
|
|
4
|
-
import coreEn from "@truedat/core/messages/en";
|
|
5
4
|
import RuleImplementationsOptions from "../RuleImplementationsOptions";
|
|
6
|
-
import en from "../../messages/en";
|
|
7
|
-
|
|
8
|
-
const renderOpts = {
|
|
9
|
-
messages: { en: { ...coreEn, ...en } },
|
|
10
|
-
};
|
|
11
5
|
|
|
12
6
|
const props = { canUploadResults: true };
|
|
13
7
|
|
|
14
8
|
describe("<RuleImplementationsOptions />", () => {
|
|
15
9
|
it("matches the latest snapshot", async () => {
|
|
16
|
-
const { container } = render(
|
|
17
|
-
<RuleImplementationsOptions {...props} />,
|
|
18
|
-
renderOpts
|
|
19
|
-
);
|
|
10
|
+
const { container } = render(<RuleImplementationsOptions {...props} />);
|
|
20
11
|
await waitFor(() => expect(container).toMatchSnapshot());
|
|
21
12
|
});
|
|
22
13
|
});
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { waitFor } from "@testing-library/react";
|
|
3
3
|
import { render } from "@truedat/test/render";
|
|
4
|
-
import coreEn from "@truedat/core/messages/en";
|
|
5
4
|
import RuleResultsUpload from "../RuleResultsUpload";
|
|
6
|
-
import en from "../../messages/en";
|
|
7
|
-
|
|
8
|
-
const renderOpts = { messages: { en: { ...coreEn, ...en } } };
|
|
9
5
|
|
|
10
6
|
describe("<RuleResultsUpload />", () => {
|
|
11
7
|
it("matches the latest snapshot", async () => {
|
|
12
|
-
const { container } = render(<RuleResultsUpload
|
|
8
|
+
const { container } = render(<RuleResultsUpload />);
|
|
13
9
|
await waitFor(() => expect(container).toMatchSnapshot());
|
|
14
10
|
});
|
|
15
11
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { render } from "@truedat/test/render";
|
|
3
2
|
import { fireEvent } from "@testing-library/react";
|
|
3
|
+
import { render } from "@truedat/test/render";
|
|
4
4
|
import { RuleSummary } from "../RuleSummary";
|
|
5
|
-
import messages from "../../messages/en";
|
|
6
5
|
|
|
7
6
|
describe("<RuleSummary />", () => {
|
|
8
7
|
const implementationLimits = {
|
|
@@ -40,15 +39,11 @@ describe("<RuleSummary />", () => {
|
|
|
40
39
|
},
|
|
41
40
|
};
|
|
42
41
|
|
|
43
|
-
const renderOpts = {
|
|
44
|
-
messages: { en: messages },
|
|
45
|
-
};
|
|
46
|
-
|
|
47
42
|
it("render 100% overGoal implementations", () => {
|
|
48
43
|
const props = {
|
|
49
44
|
implementations: [overGoalExecution],
|
|
50
45
|
};
|
|
51
|
-
const { container } = render(<RuleSummary {...props}
|
|
46
|
+
const { container } = render(<RuleSummary {...props} />);
|
|
52
47
|
expect(container).toMatchSnapshot();
|
|
53
48
|
expect(container).toHaveTextContent("100%");
|
|
54
49
|
});
|
|
@@ -61,7 +56,7 @@ describe("<RuleSummary />", () => {
|
|
|
61
56
|
underMinimumExecution,
|
|
62
57
|
],
|
|
63
58
|
};
|
|
64
|
-
const { container } = render(<RuleSummary {...props}
|
|
59
|
+
const { container } = render(<RuleSummary {...props} />);
|
|
65
60
|
expect(container).toMatchSnapshot();
|
|
66
61
|
expect(container).toHaveTextContent("33%");
|
|
67
62
|
});
|
|
@@ -70,7 +65,7 @@ describe("<RuleSummary />", () => {
|
|
|
70
65
|
const props = {
|
|
71
66
|
implementations: [notExecuted, failedExecution],
|
|
72
67
|
};
|
|
73
|
-
const { container } = render(<RuleSummary {...props}
|
|
68
|
+
const { container } = render(<RuleSummary {...props} />);
|
|
74
69
|
expect(container).toMatchSnapshot();
|
|
75
70
|
expect(container).toHaveTextContent("50%");
|
|
76
71
|
});
|
|
@@ -79,7 +74,7 @@ describe("<RuleSummary />", () => {
|
|
|
79
74
|
const props = {
|
|
80
75
|
implementations: [],
|
|
81
76
|
};
|
|
82
|
-
const { container } = render(<RuleSummary {...props}
|
|
77
|
+
const { container } = render(<RuleSummary {...props} />);
|
|
83
78
|
expect(container).toMatchSnapshot();
|
|
84
79
|
});
|
|
85
80
|
|
|
@@ -92,7 +87,7 @@ describe("<RuleSummary />", () => {
|
|
|
92
87
|
underMinimumExecution,
|
|
93
88
|
],
|
|
94
89
|
};
|
|
95
|
-
const { container } = render(<RuleSummary {...props}
|
|
90
|
+
const { container } = render(<RuleSummary {...props} />);
|
|
96
91
|
expect(container).toMatchSnapshot();
|
|
97
92
|
expect(container.querySelector(".over-goal-color")).toHaveTextContent(
|
|
98
93
|
"75%"
|
|
@@ -8,7 +8,7 @@ exports[`<ImplementationResultBar /> render failed implementation 1`] = `
|
|
|
8
8
|
<a
|
|
9
9
|
as="div"
|
|
10
10
|
class="rule-summary pointer"
|
|
11
|
-
href="/
|
|
11
|
+
href="/implementations/1/results"
|
|
12
12
|
>
|
|
13
13
|
<span
|
|
14
14
|
class="failed-color"
|
|
@@ -33,7 +33,7 @@ exports[`<ImplementationResultBar /> render not executed implementation 1`] = `
|
|
|
33
33
|
<a
|
|
34
34
|
as="div"
|
|
35
35
|
class="rule-summary pointer"
|
|
36
|
-
href="/
|
|
36
|
+
href="/implementations/1/results"
|
|
37
37
|
>
|
|
38
38
|
<span
|
|
39
39
|
class="not-executed-color"
|
|
@@ -58,7 +58,7 @@ exports[`<ImplementationResultBar /> render overGoal implementation 1`] = `
|
|
|
58
58
|
<a
|
|
59
59
|
as="div"
|
|
60
60
|
class="rule-summary pointer"
|
|
61
|
-
href="/
|
|
61
|
+
href="/implementations/1/results"
|
|
62
62
|
>
|
|
63
63
|
<span
|
|
64
64
|
class="over-goal-color"
|
|
@@ -88,7 +88,7 @@ exports[`<ImplementationResultBar /> render underGoal implementation 1`] = `
|
|
|
88
88
|
<a
|
|
89
89
|
as="div"
|
|
90
90
|
class="rule-summary pointer"
|
|
91
|
-
href="/
|
|
91
|
+
href="/implementations/1/results"
|
|
92
92
|
>
|
|
93
93
|
<span
|
|
94
94
|
class="under-goal-color"
|
|
@@ -118,7 +118,7 @@ exports[`<ImplementationResultBar /> render underMinimum implementation 1`] = `
|
|
|
118
118
|
<a
|
|
119
119
|
as="div"
|
|
120
120
|
class="rule-summary pointer"
|
|
121
|
-
href="/
|
|
121
|
+
href="/implementations/1/results"
|
|
122
122
|
>
|
|
123
123
|
<span
|
|
124
124
|
class="under-minimum-color"
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`<RemediationForm />
|
|
3
|
+
exports[`<RemediationForm /> matches the latest snapshot 1`] = `
|
|
4
4
|
<div>
|
|
5
5
|
<form
|
|
6
6
|
aria-label="remediation-form"
|
|
7
7
|
class="ui form"
|
|
8
|
-
style="display: none;"
|
|
9
8
|
>
|
|
10
9
|
<button
|
|
11
10
|
class="ui primary disabled button"
|
|
12
11
|
disabled=""
|
|
13
12
|
tabindex="-1"
|
|
14
13
|
>
|
|
15
|
-
|
|
14
|
+
Create
|
|
16
15
|
</button>
|
|
17
16
|
</form>
|
|
18
17
|
</div>
|
|
@@ -27,58 +27,10 @@ exports[`<RuleCrumbs /> matches a snapshot with resultId 1`] = `
|
|
|
27
27
|
<BreadcrumbDivider
|
|
28
28
|
icon="right angle"
|
|
29
29
|
/>
|
|
30
|
-
<BreadcrumbSection
|
|
31
|
-
active={false}
|
|
32
|
-
as={
|
|
33
|
-
Object {
|
|
34
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
35
|
-
"displayName": "Link",
|
|
36
|
-
"propTypes": Object {
|
|
37
|
-
"innerRef": [Function],
|
|
38
|
-
"onClick": [Function],
|
|
39
|
-
"replace": [Function],
|
|
40
|
-
"target": [Function],
|
|
41
|
-
"to": [Function],
|
|
42
|
-
},
|
|
43
|
-
"render": [Function],
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
to="/rules/1"
|
|
47
|
-
>
|
|
48
|
-
foo
|
|
49
|
-
</BreadcrumbSection>
|
|
50
|
-
<BreadcrumbDivider
|
|
51
|
-
icon="right angle"
|
|
52
|
-
/>
|
|
53
|
-
<BreadcrumbSection
|
|
54
|
-
active={false}
|
|
55
|
-
as={
|
|
56
|
-
Object {
|
|
57
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
58
|
-
"displayName": "Link",
|
|
59
|
-
"propTypes": Object {
|
|
60
|
-
"innerRef": [Function],
|
|
61
|
-
"onClick": [Function],
|
|
62
|
-
"replace": [Function],
|
|
63
|
-
"target": [Function],
|
|
64
|
-
"to": [Function],
|
|
65
|
-
},
|
|
66
|
-
"render": [Function],
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
to="/rules/1/implementations/2"
|
|
70
|
-
>
|
|
71
|
-
ri
|
|
72
|
-
</BreadcrumbSection>
|
|
73
|
-
<BreadcrumbDivider
|
|
74
|
-
icon="right angle"
|
|
75
|
-
/>
|
|
76
30
|
<BreadcrumbSection
|
|
77
31
|
active={true}
|
|
78
32
|
>
|
|
79
|
-
|
|
80
|
-
value="2021-10-14 11:57"
|
|
81
|
-
/>
|
|
33
|
+
foo
|
|
82
34
|
</BreadcrumbSection>
|
|
83
35
|
</Breadcrumb>
|
|
84
36
|
`;
|
|
@@ -110,33 +62,10 @@ exports[`<RuleCrumbs /> matches the latest snapshot 1`] = `
|
|
|
110
62
|
<BreadcrumbDivider
|
|
111
63
|
icon="right angle"
|
|
112
64
|
/>
|
|
113
|
-
<BreadcrumbSection
|
|
114
|
-
active={false}
|
|
115
|
-
as={
|
|
116
|
-
Object {
|
|
117
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
118
|
-
"displayName": "Link",
|
|
119
|
-
"propTypes": Object {
|
|
120
|
-
"innerRef": [Function],
|
|
121
|
-
"onClick": [Function],
|
|
122
|
-
"replace": [Function],
|
|
123
|
-
"target": [Function],
|
|
124
|
-
"to": [Function],
|
|
125
|
-
},
|
|
126
|
-
"render": [Function],
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
to="/rules/1"
|
|
130
|
-
>
|
|
131
|
-
foo
|
|
132
|
-
</BreadcrumbSection>
|
|
133
|
-
<BreadcrumbDivider
|
|
134
|
-
icon="right angle"
|
|
135
|
-
/>
|
|
136
65
|
<BreadcrumbSection
|
|
137
66
|
active={true}
|
|
138
67
|
>
|
|
139
|
-
|
|
68
|
+
foo
|
|
140
69
|
</BreadcrumbSection>
|
|
141
70
|
</Breadcrumb>
|
|
142
71
|
`;
|