@truedat/qx 8.6.7 → 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.
- package/package.json +3 -3
- package/src/components/__tests__/QxRoutes.spec.js +1 -1
- package/src/components/common/ClauseViewer.js +1 -1
- package/src/components/common/ResourceSelector.js +1 -1
- package/src/components/common/TypeSelector.js +7 -3
- package/src/components/common/__tests__/ResourceSelector.spec.js +6 -6
- package/src/components/common/expressions/FieldSelector.js +2 -2
- package/src/components/common/expressions/FunctionSelector.js +3 -3
- package/src/components/common/expressions/ParamSelector.js +1 -1
- package/src/components/common/expressions/ShapeSelector.js +4 -5
- package/src/components/common/expressions/__tests__/Clauses.spec.js +11 -11
- package/src/components/common/expressions/__tests__/Condition.spec.js +15 -13
- package/src/components/common/expressions/__tests__/ConstantSelector.spec.js +2 -2
- package/src/components/common/expressions/__tests__/Expression.spec.js +5 -5
- package/src/components/common/expressions/__tests__/FieldSelector.spec.js +6 -2
- package/src/components/common/expressions/__tests__/FunctionArgs.spec.js +3 -3
- package/src/components/common/expressions/__tests__/FunctionSelector.spec.js +3 -3
- package/src/components/common/expressions/__tests__/ParamSelector.spec.js +3 -3
- package/src/components/common/expressions/__tests__/ShapeSelector.spec.js +7 -7
- package/src/components/common/expressions/__tests__/useWatchParams.spec.js +3 -1
- package/src/components/common/expressions/constantInputs/AnySelector.js +0 -1
- package/src/components/common/expressions/constantInputs/BooleanSelector.js +5 -1
- package/src/components/common/expressions/constantInputs/__tests__/AnySelector.spec.js +6 -2
- package/src/components/common/expressions/constantInputs/__tests__/BooleanSelector.spec.js +8 -4
- package/src/components/common/expressions/constantInputs/__tests__/DefaultSelector.spec.js +6 -3
- package/src/components/common/resourceSelectors/DataStructureSelector.js +5 -1
- package/src/components/common/resourceSelectors/DataViewSelector.js +3 -3
- package/src/components/common/resourceSelectors/ReferenceDatasetSelector.js +7 -2
- package/src/components/common/resourceSelectors/__tests__/DataStructureSelector.spec.js +1 -1
- package/src/components/common/resourceSelectors/__tests__/DataViewSelector.spec.js +7 -7
- package/src/components/common/resourceSelectors/__tests__/ReferenceDatasetSelector.spec.js +6 -6
- package/src/components/dataViews/DataViewEditor.js +3 -2
- package/src/components/dataViews/DataViewSummary.js +1 -1
- package/src/components/dataViews/DataViews.js +2 -2
- package/src/components/dataViews/__tests__/AdvancedDataViewEditor.spec.js +3 -3
- package/src/components/dataViews/__tests__/DataViewEditor.spec.js +7 -7
- package/src/components/dataViews/__tests__/DataViewSelect.spec.js +1 -1
- package/src/components/dataViews/__tests__/DataViewSummary.spec.js +15 -15
- package/src/components/dataViews/__tests__/DataViews.spec.js +6 -6
- package/src/components/dataViews/__tests__/Queryable.spec.js +6 -6
- package/src/components/dataViews/__tests__/Queryables.spec.js +6 -6
- package/src/components/dataViews/__tests__/SimpleDataViewEditor.spec.js +17 -17
- package/src/components/dataViews/__tests__/queryableFunctions.spec.js +4 -4
- package/src/components/dataViews/advancedForm/AdvancedDataViewEditor.js +3 -3
- package/src/components/dataViews/advancedForm/DataViewSelect.js +1 -1
- package/src/components/dataViews/advancedForm/Queryable.js +3 -3
- package/src/components/dataViews/queryableFunctions.js +35 -35
- package/src/components/dataViews/queryableProperties/Select.js +1 -1
- package/src/components/dataViews/queryableProperties/SelectField.js +5 -5
- package/src/components/dataViews/queryableProperties/__tests__/From.spec.js +1 -1
- package/src/components/dataViews/queryableProperties/__tests__/GroupBy.spec.js +19 -19
- package/src/components/dataViews/queryableProperties/__tests__/Join.spec.js +1 -1
- package/src/components/dataViews/queryableProperties/__tests__/JoinTypeIcon.spec.js +1 -1
- package/src/components/dataViews/queryableProperties/__tests__/Select.spec.js +5 -5
- package/src/components/dataViews/queryableProperties/__tests__/SelectField.spec.js +3 -3
- package/src/components/dataViews/queryableProperties/__tests__/Where.spec.js +1 -1
- package/src/components/dataViews/queryableSummaryHelpers.js +1 -1
- package/src/components/dataViews/simpleForm/AggregationForm.js +2 -2
- package/src/components/dataViews/simpleForm/DatasetForm.js +1 -1
- package/src/components/dataViews/simpleForm/FormQueryable.js +3 -3
- package/src/components/dataViews/simpleForm/InformationForm.js +2 -2
- package/src/components/dataViews/simpleForm/SelectionForm.js +1 -1
- package/src/components/dataViews/simpleForm/SimpleDataViewEditor.js +3 -3
- package/src/components/dataViews/summary/GroupBy.js +1 -1
- package/src/components/dataViews/summary/Join.js +50 -48
- package/src/components/dataViews/summary/Select.js +1 -1
- package/src/components/dataViews/summary/Where.js +6 -1
- package/src/components/functions/FunctionEditor.js +1 -1
- package/src/components/functions/Functions.js +1 -1
- package/src/components/functions/__tests__/FunctionEditor.spec.js +7 -7
- package/src/components/functions/__tests__/FunctionParams.spec.js +4 -4
- package/src/components/qualityControls/ConceptLinkNew.js +2 -2
- package/src/components/qualityControls/ConceptLinks.js +1 -1
- package/src/components/qualityControls/ContentSummary.js +23 -21
- package/src/components/qualityControls/ControlProperties.js +1 -1
- package/src/components/qualityControls/ControlPropertiesView.js +1 -1
- package/src/components/qualityControls/EditQualityControl.js +1 -1
- package/src/components/qualityControls/NewDraftQualityControl.js +1 -1
- package/src/components/qualityControls/QualityControlActions.js +4 -4
- package/src/components/qualityControls/QualityControlEditor.js +11 -20
- package/src/components/qualityControls/QualityControlEvents.js +2 -2
- package/src/components/qualityControls/QualityControlHeader.js +2 -2
- package/src/components/qualityControls/QualityControlRoutes.js +1 -1
- package/src/components/qualityControls/QualityControlScores.js +3 -3
- package/src/components/qualityControls/QualityControlSelector.js +1 -1
- package/src/components/qualityControls/QualityControlSummary.js +17 -15
- package/src/components/qualityControls/QualityControls.js +9 -11
- package/src/components/qualityControls/QualityControlsTable.js +1 -1
- package/src/components/qualityControls/SegmentationForm.js +99 -100
- package/src/components/qualityControls/SegmentationSummary.js +113 -104
- package/src/components/qualityControls/StructureLinkNew.js +2 -2
- package/src/components/qualityControls/StructureLinks.js +1 -1
- package/src/components/qualityControls/__tests__/ConceptLinkNew.spec.js +5 -5
- package/src/components/qualityControls/__tests__/ConceptLinks.spec.js +3 -3
- package/src/components/qualityControls/__tests__/ControlProperties.spec.js +6 -2
- package/src/components/qualityControls/__tests__/ControlPropertiesForm.spec.js +6 -6
- package/src/components/qualityControls/__tests__/ControlPropertiesSummary.spec.js +7 -7
- package/src/components/qualityControls/__tests__/ControlPropertiesView.spec.js +7 -2
- package/src/components/qualityControls/__tests__/EditQualityControl.spec.js +12 -12
- package/src/components/qualityControls/__tests__/InformationForm.spec.js +29 -11
- package/src/components/qualityControls/__tests__/NewDraftQualityControl.spec.js +23 -21
- package/src/components/qualityControls/__tests__/NewQualityControl.spec.js +38 -38
- package/src/components/qualityControls/__tests__/QualityBadge.spec.js +7 -7
- package/src/components/qualityControls/__tests__/QualityControl.spec.js +7 -7
- package/src/components/qualityControls/__tests__/QualityControlActions.spec.js +16 -16
- package/src/components/qualityControls/__tests__/QualityControlCrumbs.spec.js +1 -1
- package/src/components/qualityControls/__tests__/QualityControlEditor.spec.js +6 -2
- package/src/components/qualityControls/__tests__/QualityControlEvents.spec.js +3 -3
- package/src/components/qualityControls/__tests__/QualityControlHeader.spec.js +3 -3
- package/src/components/qualityControls/__tests__/QualityControlHistory.spec.js +2 -2
- package/src/components/qualityControls/__tests__/QualityControlManageDomain.spec.js +4 -4
- package/src/components/qualityControls/__tests__/QualityControlQueryModal.spec.js +2 -2
- package/src/components/qualityControls/__tests__/QualityControlRoutes.spec.js +2 -2
- package/src/components/qualityControls/__tests__/QualityControlRow.spec.js +4 -4
- package/src/components/qualityControls/__tests__/QualityControlScores.spec.js +9 -9
- package/src/components/qualityControls/__tests__/QualityControlSelector.spec.js +21 -17
- package/src/components/qualityControls/__tests__/QualityControls.spec.js +21 -21
- package/src/components/qualityControls/__tests__/QualityControlsLabelResults.spec.js +5 -5
- package/src/components/qualityControls/__tests__/QualityControlsPagination.spec.js +1 -1
- package/src/components/qualityControls/__tests__/QualityControlsTable.spec.js +1 -1
- package/src/components/qualityControls/__tests__/ScoreCriteria.spec.js +6 -6
- package/src/components/qualityControls/__tests__/ScoreCriteriaView.spec.js +6 -6
- package/src/components/qualityControls/__tests__/StructureLinkNew.spec.js +9 -9
- package/src/components/qualityControls/__tests__/StructureLinks.spec.js +6 -6
- package/src/components/qualityControls/controlProperties/__tests__/ResourceWithValidation.spec.js +9 -9
- package/src/components/qualityControls/scoreCriterias/__tests__/Deviation.spec.js +5 -5
- package/src/components/qualityControls/scoreCriterias/__tests__/ErrorCount.spec.js +10 -10
- package/src/components/qualityControls/scoreCriterias/__tests__/Percentage.spec.js +6 -6
- package/src/components/scores/QualityBar.js +1 -1
- package/src/components/scores/ScoreDetails.js +1 -1
- package/src/components/scores/ScoreGroup.js +2 -2
- package/src/components/scores/ScoreGroupForm.js +1 -1
- package/src/components/scores/__tests__/MyScoreGroups.spec.js +1 -1
- package/src/components/scores/__tests__/QualityBar.spec.js +3 -3
- package/src/components/scores/__tests__/Score.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreContext.spec.js +2 -2
- package/src/components/scores/__tests__/ScoreCrumbs.spec.js +2 -2
- package/src/components/scores/__tests__/ScoreDetails.spec.js +2 -2
- package/src/components/scores/__tests__/ScoreEvents.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreGroup.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreGroupBreadcrumbs.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreGroupForm.spec.js +3 -3
- package/src/components/scores/__tests__/ScoreGroupLink.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreGroupMessage.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreGroupPopup.spec.js +2 -2
- package/src/components/scores/__tests__/ScoreGroupsRoutes.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreGroupsTable.spec.js +2 -2
- package/src/components/scores/__tests__/ScorePagination.spec.js +1 -1
- package/src/components/scores/__tests__/ScoreStatusDecorator.spec.js +2 -2
- package/src/components/selectors/__tests__/getMyScoreGroupsColumns.spec.js +5 -5
- package/src/components/selectors/__tests__/getQualityControlScoresColumns.spec.js +3 -3
- package/src/components/selectors/getMyScoreGroupsColumns.js +1 -1
- package/src/components/selectors/getQualityControlScoresColumns.js +1 -1
- package/src/hooks/useDataViews.js +1 -1
- package/src/hooks/useExecutionGroups.js +2 -2
- package/src/hooks/useFunctions.js +1 -1
- package/src/hooks/useQualityControls.js +3 -3
- package/src/hooks/useScoreGroups.js +3 -3
- package/src/hooks/useScores.js +1 -1
- package/src/types.js +5 -3
package/src/components/qualityControls/controlProperties/__tests__/ResourceWithValidation.spec.js
CHANGED
|
@@ -31,7 +31,7 @@ jest.mock("@truedat/qx/components/common/ResourceSelector", () =>
|
|
|
31
31
|
<div data-testid="resource-selector-label">{labelId}</div>
|
|
32
32
|
<div data-testid="resource-selector-required">{String(required)}</div>
|
|
33
33
|
</div>
|
|
34
|
-
))
|
|
34
|
+
)),
|
|
35
35
|
);
|
|
36
36
|
|
|
37
37
|
jest.mock("@truedat/qx/components/common/expressions", () => ({
|
|
@@ -97,7 +97,7 @@ describe("<ResourceWithValidation />", () => {
|
|
|
97
97
|
resourceLabelId="resource.label"
|
|
98
98
|
validationLabelId="validation.label"
|
|
99
99
|
/>
|
|
100
|
-
</ComponentWrapper
|
|
100
|
+
</ComponentWrapper>,
|
|
101
101
|
);
|
|
102
102
|
|
|
103
103
|
expect(rendered.getByText(/loading-component/i)).toBeInTheDocument();
|
|
@@ -121,16 +121,16 @@ describe("<ResourceWithValidation />", () => {
|
|
|
121
121
|
resourceLabelId="resource.label"
|
|
122
122
|
validationLabelId="validation.label"
|
|
123
123
|
/>
|
|
124
|
-
</ComponentWrapper
|
|
124
|
+
</ComponentWrapper>,
|
|
125
125
|
);
|
|
126
126
|
await waitForLoad(rendered);
|
|
127
127
|
|
|
128
128
|
expect(rendered.getByText(/resource-selector/i)).toBeInTheDocument();
|
|
129
129
|
expect(rendered.getByTestId("resource-selector-label")).toHaveTextContent(
|
|
130
|
-
"resource.label"
|
|
130
|
+
"resource.label",
|
|
131
131
|
);
|
|
132
132
|
expect(
|
|
133
|
-
rendered.getByTestId("resource-selector-required")
|
|
133
|
+
rendered.getByTestId("resource-selector-required"),
|
|
134
134
|
).toHaveTextContent("true");
|
|
135
135
|
expect(rendered.queryByText(/clauses-component/i)).not.toBeInTheDocument();
|
|
136
136
|
});
|
|
@@ -154,13 +154,13 @@ describe("<ResourceWithValidation />", () => {
|
|
|
154
154
|
resourceLabelId="resource.label"
|
|
155
155
|
validationLabelId="validation.label"
|
|
156
156
|
/>
|
|
157
|
-
</ComponentWrapper
|
|
157
|
+
</ComponentWrapper>,
|
|
158
158
|
);
|
|
159
159
|
await waitForLoad(rendered);
|
|
160
160
|
|
|
161
161
|
expect(rendered.getByText(/clauses-component/i)).toBeInTheDocument();
|
|
162
162
|
expect(rendered.getByTestId("clauses-label")).toHaveTextContent(
|
|
163
|
-
"validation.label"
|
|
163
|
+
"validation.label",
|
|
164
164
|
);
|
|
165
165
|
});
|
|
166
166
|
|
|
@@ -180,12 +180,12 @@ describe("<ResourceWithValidation />", () => {
|
|
|
180
180
|
resourceLabelId="errors.resource.label"
|
|
181
181
|
validationLabelId="validation.label"
|
|
182
182
|
/>
|
|
183
|
-
</ComponentWrapper
|
|
183
|
+
</ComponentWrapper>,
|
|
184
184
|
);
|
|
185
185
|
await waitForLoad(rendered);
|
|
186
186
|
|
|
187
187
|
expect(rendered.getByTestId("resource-selector-label")).toHaveTextContent(
|
|
188
|
-
"errors.resource.label"
|
|
188
|
+
"errors.resource.label",
|
|
189
189
|
);
|
|
190
190
|
expect(rendered.getByText(/clauses-component/i)).toBeInTheDocument();
|
|
191
191
|
});
|
|
@@ -25,7 +25,7 @@ describe("<Deviation />", () => {
|
|
|
25
25
|
<TestFormWrapper>
|
|
26
26
|
<Deviation />
|
|
27
27
|
</TestFormWrapper>,
|
|
28
|
-
renderOpts
|
|
28
|
+
renderOpts,
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
expect(container).toMatchSnapshot();
|
|
@@ -38,7 +38,7 @@ describe("<Deviation />", () => {
|
|
|
38
38
|
<TestFormWrapper defaultValues={defaultValues}>
|
|
39
39
|
<Deviation />
|
|
40
40
|
</TestFormWrapper>,
|
|
41
|
-
renderOpts
|
|
41
|
+
renderOpts,
|
|
42
42
|
);
|
|
43
43
|
|
|
44
44
|
const goalInput = getByPlaceholderText("Goal");
|
|
@@ -48,7 +48,7 @@ describe("<Deviation />", () => {
|
|
|
48
48
|
fireEvent.change(goalInput, { target: { value: "10" } });
|
|
49
49
|
fireEvent.change(thresholdInput, { target: { value: "20" } });
|
|
50
50
|
await waitFor(() =>
|
|
51
|
-
expect(queryByText(/Must be greater than y/i)).not.toBeInTheDocument()
|
|
51
|
+
expect(queryByText(/Must be greater than y/i)).not.toBeInTheDocument(),
|
|
52
52
|
);
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -57,7 +57,7 @@ describe("<Deviation />", () => {
|
|
|
57
57
|
<TestFormWrapper>
|
|
58
58
|
<Deviation />
|
|
59
59
|
</TestFormWrapper>,
|
|
60
|
-
renderOpts
|
|
60
|
+
renderOpts,
|
|
61
61
|
);
|
|
62
62
|
|
|
63
63
|
const goalInput = getByPlaceholderText("Goal");
|
|
@@ -68,7 +68,7 @@ describe("<Deviation />", () => {
|
|
|
68
68
|
fireEvent.change(thresholdInput, { target: { value: "1" } });
|
|
69
69
|
|
|
70
70
|
await waitFor(() =>
|
|
71
|
-
expect(queryByText(/Must be greater than y/i)).toBeInTheDocument()
|
|
71
|
+
expect(queryByText(/Must be greater than y/i)).toBeInTheDocument(),
|
|
72
72
|
);
|
|
73
73
|
});
|
|
74
74
|
});
|
|
@@ -9,7 +9,7 @@ describe("<ErrorCount />", () => {
|
|
|
9
9
|
const rendered = render(
|
|
10
10
|
<TestFormWrapper>
|
|
11
11
|
<ErrorCount />
|
|
12
|
-
</TestFormWrapper
|
|
12
|
+
</TestFormWrapper>,
|
|
13
13
|
);
|
|
14
14
|
await waitForLoad(rendered);
|
|
15
15
|
expect(rendered.container).toMatchSnapshot();
|
|
@@ -20,16 +20,16 @@ describe("<ErrorCount />", () => {
|
|
|
20
20
|
const rendered = render(
|
|
21
21
|
<TestFormWrapper defaultValues={defaultValues}>
|
|
22
22
|
<ErrorCount />
|
|
23
|
-
</TestFormWrapper
|
|
23
|
+
</TestFormWrapper>,
|
|
24
24
|
);
|
|
25
25
|
await waitForLoad(rendered);
|
|
26
26
|
|
|
27
27
|
const user = userEvent.setup({ delay: null });
|
|
28
28
|
const goalInput = rendered.getByPlaceholderText(
|
|
29
|
-
/quality_control\.score_criteria\.error_count\.goal/i
|
|
29
|
+
/quality_control\.score_criteria\.error_count\.goal/i,
|
|
30
30
|
);
|
|
31
31
|
const thresholdInput = rendered.getByPlaceholderText(
|
|
32
|
-
/quality_control\.score_criteria\.error_count\.maximum/i
|
|
32
|
+
/quality_control\.score_criteria\.error_count\.maximum/i,
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
await user.type(goalInput, "10");
|
|
@@ -37,8 +37,8 @@ describe("<ErrorCount />", () => {
|
|
|
37
37
|
|
|
38
38
|
await waitFor(() =>
|
|
39
39
|
expect(
|
|
40
|
-
rendered.queryByText(/must be greater than y/i)
|
|
41
|
-
).not.toBeInTheDocument()
|
|
40
|
+
rendered.queryByText(/must be greater than y/i),
|
|
41
|
+
).not.toBeInTheDocument(),
|
|
42
42
|
);
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -46,16 +46,16 @@ describe("<ErrorCount />", () => {
|
|
|
46
46
|
const rendered = render(
|
|
47
47
|
<TestFormWrapper>
|
|
48
48
|
<ErrorCount />
|
|
49
|
-
</TestFormWrapper
|
|
49
|
+
</TestFormWrapper>,
|
|
50
50
|
);
|
|
51
51
|
await waitForLoad(rendered);
|
|
52
52
|
|
|
53
53
|
const user = userEvent.setup({ delay: null });
|
|
54
54
|
const goalInput = rendered.getByPlaceholderText(
|
|
55
|
-
/quality_control\.score_criteria\.error_count\.goal/i
|
|
55
|
+
/quality_control\.score_criteria\.error_count\.goal/i,
|
|
56
56
|
);
|
|
57
57
|
const thresholdInput = rendered.getByPlaceholderText(
|
|
58
|
-
/quality_control\.score_criteria\.error_count\.maximum/i
|
|
58
|
+
/quality_control\.score_criteria\.error_count\.maximum/i,
|
|
59
59
|
);
|
|
60
60
|
|
|
61
61
|
await user.type(goalInput, "10");
|
|
@@ -64,7 +64,7 @@ describe("<ErrorCount />", () => {
|
|
|
64
64
|
await waitForLoad(rendered);
|
|
65
65
|
await waitFor(() => {
|
|
66
66
|
expect(
|
|
67
|
-
rendered.queryByText("form.validation.must_be_greater_than_or_equal")
|
|
67
|
+
rendered.queryByText("form.validation.must_be_greater_than_or_equal"),
|
|
68
68
|
).toBeInTheDocument();
|
|
69
69
|
});
|
|
70
70
|
});
|
|
@@ -13,7 +13,7 @@ describe("<Percentage />", () => {
|
|
|
13
13
|
<TestFormWrapper>
|
|
14
14
|
<Percentage />
|
|
15
15
|
</TestFormWrapper>,
|
|
16
|
-
renderOpts
|
|
16
|
+
renderOpts,
|
|
17
17
|
);
|
|
18
18
|
await waitForLoad(rendered);
|
|
19
19
|
expect(rendered.container).toMatchSnapshot();
|
|
@@ -25,7 +25,7 @@ describe("<Percentage />", () => {
|
|
|
25
25
|
<TestFormWrapper>
|
|
26
26
|
<Percentage />
|
|
27
27
|
</TestFormWrapper>,
|
|
28
|
-
renderOpts
|
|
28
|
+
renderOpts,
|
|
29
29
|
);
|
|
30
30
|
await waitForLoad(rendered);
|
|
31
31
|
|
|
@@ -37,8 +37,8 @@ describe("<Percentage />", () => {
|
|
|
37
37
|
|
|
38
38
|
await waitFor(() =>
|
|
39
39
|
expect(
|
|
40
|
-
rendered.queryByText(/must be less than 10/i)
|
|
41
|
-
).not.toBeInTheDocument()
|
|
40
|
+
rendered.queryByText(/must be less than 10/i),
|
|
41
|
+
).not.toBeInTheDocument(),
|
|
42
42
|
);
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ describe("<Percentage />", () => {
|
|
|
48
48
|
<TestFormWrapper>
|
|
49
49
|
<Percentage />
|
|
50
50
|
</TestFormWrapper>,
|
|
51
|
-
renderOpts
|
|
51
|
+
renderOpts,
|
|
52
52
|
);
|
|
53
53
|
await waitForLoad(rendered);
|
|
54
54
|
|
|
@@ -59,7 +59,7 @@ describe("<Percentage />", () => {
|
|
|
59
59
|
await user.type(thresholdInput, "20");
|
|
60
60
|
|
|
61
61
|
await waitFor(() =>
|
|
62
|
-
expect(rendered.queryByText(/must be less than 10/i)).toBeInTheDocument()
|
|
62
|
+
expect(rendered.queryByText(/must be less than 10/i)).toBeInTheDocument(),
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
65
|
});
|
|
@@ -12,7 +12,7 @@ import ScoreStatusDecorator from "./ScoreStatusDecorator";
|
|
|
12
12
|
import ScoreGroupBreadcrumbs from "./ScoreGroupBreadcrumbs";
|
|
13
13
|
|
|
14
14
|
const DynamicFormViewer = lazy(
|
|
15
|
-
() => import("@truedat/df/components/DynamicFormViewer")
|
|
15
|
+
() => import("@truedat/df/components/DynamicFormViewer"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
const QualityControlLink = ({ id, name, version }) => (
|
|
@@ -42,7 +42,7 @@ export default function ScoreGroup() {
|
|
|
42
42
|
const count = _.size(scores);
|
|
43
43
|
const pendingCount = _.flow(
|
|
44
44
|
_.reject(({ status }) => _.contains(status)(["SUCCEEDED", "FAILED"])),
|
|
45
|
-
_.size
|
|
45
|
+
_.size,
|
|
46
46
|
)(scores);
|
|
47
47
|
|
|
48
48
|
return _.isEmpty(scoreGroup) ? null : (
|
|
@@ -74,7 +74,7 @@ export default function ScoreGroupForm({ count, onSubmit, onCancel }) {
|
|
|
74
74
|
? "quality_control.actions.execution.confirmation.content"
|
|
75
75
|
: "quality_controls.actions.execution.confirmation.content",
|
|
76
76
|
},
|
|
77
|
-
{ count }
|
|
77
|
+
{ count },
|
|
78
78
|
)}
|
|
79
79
|
</p>
|
|
80
80
|
<div className="actions">
|
|
@@ -13,7 +13,7 @@ jest.mock("@truedat/core/hooks", () => ({
|
|
|
13
13
|
jest.mock("@truedat/qx/hooks/useScoreGroups", () => {
|
|
14
14
|
const originalModule = jest.requireActual("@truedat/qx/hooks/useScoreGroups");
|
|
15
15
|
const { scoreGroupData } = jest.requireActual(
|
|
16
|
-
"@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper"
|
|
16
|
+
"@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper",
|
|
17
17
|
);
|
|
18
18
|
const data = {
|
|
19
19
|
data: [
|
|
@@ -12,7 +12,7 @@ describe("<QualityBar />", () => {
|
|
|
12
12
|
const rendered = render(
|
|
13
13
|
<ScoreContext value={context}>
|
|
14
14
|
<QualityBar />
|
|
15
|
-
</ScoreContext
|
|
15
|
+
</ScoreContext>,
|
|
16
16
|
);
|
|
17
17
|
await waitForLoad(rendered);
|
|
18
18
|
expect(rendered.container).toMatchSnapshot();
|
|
@@ -26,7 +26,7 @@ describe("<QualityBar />", () => {
|
|
|
26
26
|
const rendered = render(
|
|
27
27
|
<ScoreContext value={context}>
|
|
28
28
|
<QualityBar />
|
|
29
|
-
</ScoreContext
|
|
29
|
+
</ScoreContext>,
|
|
30
30
|
);
|
|
31
31
|
await waitForLoad(rendered);
|
|
32
32
|
expect(rendered.queryByText(/failed/i)).toBeInTheDocument();
|
|
@@ -40,7 +40,7 @@ describe("<QualityBar />", () => {
|
|
|
40
40
|
const rendered = render(
|
|
41
41
|
<ScoreContext value={context}>
|
|
42
42
|
<QualityBar />
|
|
43
|
-
</ScoreContext
|
|
43
|
+
</ScoreContext>,
|
|
44
44
|
);
|
|
45
45
|
await waitForLoad(rendered);
|
|
46
46
|
expect(rendered.queryByText(/quality.result.no.data/i)).toBeInTheDocument();
|
|
@@ -11,7 +11,7 @@ jest.mock("react-router", () => ({
|
|
|
11
11
|
|
|
12
12
|
jest.mock("@truedat/qx/hooks/useScores", () => {
|
|
13
13
|
const { scoreData } = jest.requireActual(
|
|
14
|
-
"@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper"
|
|
14
|
+
"@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper",
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
return {
|
|
@@ -43,12 +43,12 @@ describe("<ScoreContextProvider />", () => {
|
|
|
43
43
|
const rendered = render(
|
|
44
44
|
<ScoreContextProvider qualityControlId={1}>
|
|
45
45
|
<TestComponent />
|
|
46
|
-
</ScoreContextProvider
|
|
46
|
+
</ScoreContextProvider>,
|
|
47
47
|
);
|
|
48
48
|
|
|
49
49
|
await waitFor(() => {
|
|
50
50
|
const contextData = JSON.parse(
|
|
51
|
-
rendered.getByTestId("test-component").textContent
|
|
51
|
+
rendered.getByTestId("test-component").textContent,
|
|
52
52
|
);
|
|
53
53
|
expect(contextData).toMatchObject({
|
|
54
54
|
scores: [score],
|
|
@@ -16,7 +16,7 @@ describe("<ScoreCrumbs />", () => {
|
|
|
16
16
|
<ScoreContext value={context}>
|
|
17
17
|
<ScoreCrumbs />
|
|
18
18
|
</ScoreContext>,
|
|
19
|
-
renderOpts
|
|
19
|
+
renderOpts,
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
expect(container).toMatchSnapshot();
|
|
@@ -30,7 +30,7 @@ describe("<ScoreCrumbs />", () => {
|
|
|
30
30
|
<ScoreContext value={context}>
|
|
31
31
|
<ScoreCrumbs />
|
|
32
32
|
</ScoreContext>,
|
|
33
|
-
renderOpts
|
|
33
|
+
renderOpts,
|
|
34
34
|
);
|
|
35
35
|
|
|
36
36
|
expect(queryByText(/Not executed/i)).toBeInTheDocument();
|
|
@@ -16,7 +16,7 @@ describe("<ScoreDetails />", () => {
|
|
|
16
16
|
<ScoreContext value={context}>
|
|
17
17
|
<ScoreDetails />
|
|
18
18
|
</ScoreContext>,
|
|
19
|
-
renderOpts
|
|
19
|
+
renderOpts,
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
expect(container).toMatchSnapshot();
|
|
@@ -30,7 +30,7 @@ describe("<ScoreDetails />", () => {
|
|
|
30
30
|
<ScoreContext value={context}>
|
|
31
31
|
<ScoreDetails />
|
|
32
32
|
</ScoreContext>,
|
|
33
|
-
renderOpts
|
|
33
|
+
renderOpts,
|
|
34
34
|
);
|
|
35
35
|
expect(queryByText(/Details/i)).not.toBeInTheDocument();
|
|
36
36
|
});
|
|
@@ -10,7 +10,7 @@ jest.mock("react-router", () => ({
|
|
|
10
10
|
|
|
11
11
|
jest.mock("@truedat/qx/hooks/useScoreGroups", () => {
|
|
12
12
|
const { scoreGroup } = jest.requireActual(
|
|
13
|
-
"@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper"
|
|
13
|
+
"@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper",
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
return {
|
|
@@ -8,7 +8,7 @@ describe("<ScoreGroupBreadcrumbs />", () => {
|
|
|
8
8
|
it("matches the latest snapshot", () => {
|
|
9
9
|
const { container } = render(
|
|
10
10
|
<ScoreGroupBreadcrumbs timestamp="2025-01-23T10:10:00Z" />,
|
|
11
|
-
renderOpts
|
|
11
|
+
renderOpts,
|
|
12
12
|
);
|
|
13
13
|
expect(container).toMatchSnapshot();
|
|
14
14
|
});
|
|
@@ -29,7 +29,7 @@ describe("<ScoreGroupForm />", () => {
|
|
|
29
29
|
it("matches the latest snapshot for count 1", async () => {
|
|
30
30
|
const rendered = render(
|
|
31
31
|
<ScoreGroupForm {...props} count={1} />,
|
|
32
|
-
renderOpts
|
|
32
|
+
renderOpts,
|
|
33
33
|
);
|
|
34
34
|
await waitForLoad(rendered);
|
|
35
35
|
expect(rendered.container).toMatchSnapshot();
|
|
@@ -40,7 +40,7 @@ describe("<ScoreGroupForm />", () => {
|
|
|
40
40
|
const onSubmit = jest.fn();
|
|
41
41
|
const rendered = render(
|
|
42
42
|
<ScoreGroupForm {...props} onSubmit={onSubmit} />,
|
|
43
|
-
renderOpts
|
|
43
|
+
renderOpts,
|
|
44
44
|
);
|
|
45
45
|
await waitForLoad(rendered);
|
|
46
46
|
|
|
@@ -56,7 +56,7 @@ describe("<ScoreGroupForm />", () => {
|
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
df_type: "template1",
|
|
59
|
-
})
|
|
59
|
+
}),
|
|
60
60
|
);
|
|
61
61
|
});
|
|
62
62
|
});
|
|
@@ -27,7 +27,7 @@ describe("<ScoreGroupPopup />", () => {
|
|
|
27
27
|
it("should disable the button when disabled is true", () => {
|
|
28
28
|
const { getByRole } = render(
|
|
29
29
|
<ScoreGroupPopup disabled={true} />,
|
|
30
|
-
renderOpts
|
|
30
|
+
renderOpts,
|
|
31
31
|
);
|
|
32
32
|
expect(getByRole("button")).toBeDisabled();
|
|
33
33
|
});
|
|
@@ -35,7 +35,7 @@ describe("<ScoreGroupPopup />", () => {
|
|
|
35
35
|
it("should show loading state when loading is true", () => {
|
|
36
36
|
const { getByRole } = render(
|
|
37
37
|
<ScoreGroupPopup loading={true} />,
|
|
38
|
-
renderOpts
|
|
38
|
+
renderOpts,
|
|
39
39
|
);
|
|
40
40
|
expect(getByRole("button")).toHaveClass("loading");
|
|
41
41
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
|
-
import ScoreGroupsRoutes from "../ScoreGroupsRoutes";
|
|
4
3
|
import { MY_SCORE_GROUPS, SCORE_GROUP } from "@truedat/core/routes";
|
|
4
|
+
import ScoreGroupsRoutes from "../ScoreGroupsRoutes";
|
|
5
5
|
|
|
6
6
|
// Mock child components
|
|
7
7
|
jest.mock("../MyScoreGroups", () => () => <div>MyScoreGroups</div>);
|
|
@@ -22,7 +22,7 @@ describe("<ScoreGroupsTable />", () => {
|
|
|
22
22
|
<SearchContextWrapper props={searchProps}>
|
|
23
23
|
<ScoreGroupsTable />
|
|
24
24
|
</SearchContextWrapper>,
|
|
25
|
-
renderOpts
|
|
25
|
+
renderOpts,
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
expect(container).toMatchSnapshot();
|
|
@@ -34,7 +34,7 @@ describe("<ScoreGroupsTable />", () => {
|
|
|
34
34
|
<SearchContextWrapper props={newSearchProps}>
|
|
35
35
|
<ScoreGroupsTable />
|
|
36
36
|
</SearchContextWrapper>,
|
|
37
|
-
renderOpts
|
|
37
|
+
renderOpts,
|
|
38
38
|
);
|
|
39
39
|
expect(container).toMatchSnapshot();
|
|
40
40
|
});
|
|
@@ -60,7 +60,7 @@ describe("<ScorePagination />", () => {
|
|
|
60
60
|
await waitForLoad(rendered);
|
|
61
61
|
const pagination = rendered.container.querySelector(".ui.pagination");
|
|
62
62
|
expect(
|
|
63
|
-
pagination.querySelector("[aria-label='Last item']")
|
|
63
|
+
pagination.querySelector("[aria-label='Last item']"),
|
|
64
64
|
).toHaveTextContent("»");
|
|
65
65
|
});
|
|
66
66
|
});
|
|
@@ -12,9 +12,9 @@ describe("<ScoreStatusDecorator />", () => {
|
|
|
12
12
|
it(`matches the latest snapshot for status ${status}`, () => {
|
|
13
13
|
const { container } = render(
|
|
14
14
|
<ScoreStatusDecorator id={8} status={status} />,
|
|
15
|
-
renderOpts
|
|
15
|
+
renderOpts,
|
|
16
16
|
);
|
|
17
17
|
expect(container).toMatchSnapshot();
|
|
18
|
-
})
|
|
18
|
+
}),
|
|
19
19
|
);
|
|
20
20
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import { render } from "@truedat/test/render";
|
|
3
|
+
import { scoreGroupData } from "@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper";
|
|
3
4
|
import { defaultMyScoreGroupsColumns } from "../getMyScoreGroupsColumns";
|
|
4
5
|
import { getMyScoreGroupsColumns } from "../getMyScoreGroupsColumns";
|
|
5
|
-
import { scoreGroupData } from "@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper";
|
|
6
6
|
|
|
7
7
|
describe("selectors: getMyScoreGroupsColumns", () => {
|
|
8
8
|
it("should return default columns when no state is provided", () => {
|
|
@@ -11,7 +11,7 @@ describe("selectors: getMyScoreGroupsColumns", () => {
|
|
|
11
11
|
};
|
|
12
12
|
const columns = getMyScoreGroupsColumns({ ...state });
|
|
13
13
|
expect(_.map("name")(columns)).toEqual(
|
|
14
|
-
_.map("name")(defaultMyScoreGroupsColumns)
|
|
14
|
+
_.map("name")(defaultMyScoreGroupsColumns),
|
|
15
15
|
);
|
|
16
16
|
expect(columns).toMatchSnapshot();
|
|
17
17
|
});
|
|
@@ -25,7 +25,7 @@ describe("selectors: getMyScoreGroupsColumns", () => {
|
|
|
25
25
|
|
|
26
26
|
expect(rendered.container.querySelector("a")).toHaveAttribute(
|
|
27
27
|
"href",
|
|
28
|
-
expect.stringContaining(`/scoreGroups/${scoreGroup.id}`)
|
|
28
|
+
expect.stringContaining(`/scoreGroups/${scoreGroup.id}`),
|
|
29
29
|
);
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -39,7 +39,7 @@ describe("selectors: getMyScoreGroupsColumns", () => {
|
|
|
39
39
|
const rendered = render(statusColumn.fieldDecorator(1));
|
|
40
40
|
|
|
41
41
|
expect(
|
|
42
|
-
rendered.container.querySelector(".ui.yellow.circular.label")
|
|
42
|
+
rendered.container.querySelector(".ui.yellow.circular.label"),
|
|
43
43
|
).toHaveTextContent("1");
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -53,7 +53,7 @@ describe("selectors: getMyScoreGroupsColumns", () => {
|
|
|
53
53
|
const rendered = render(statusColumn.fieldDecorator(0));
|
|
54
54
|
|
|
55
55
|
expect(
|
|
56
|
-
rendered.container.querySelector(".ui.label")
|
|
56
|
+
rendered.container.querySelector(".ui.label"),
|
|
57
57
|
).not.toBeInTheDocument();
|
|
58
58
|
});
|
|
59
59
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import { render } from "@truedat/test/render";
|
|
3
|
+
import { scoreData } from "@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper";
|
|
3
4
|
import { defaultQualityControlScoresColumns } from "../getQualityControlScoresColumns";
|
|
4
5
|
import { getQualityControlScoresColumns } from "../getQualityControlScoresColumns";
|
|
5
|
-
import { scoreData } from "@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper";
|
|
6
6
|
|
|
7
7
|
describe("selectors: getQualityControlScoresColumns", () => {
|
|
8
8
|
it("should return default columns when no state is provided", () => {
|
|
9
9
|
const state = { scores: [scoreData()] };
|
|
10
10
|
const columns = getQualityControlScoresColumns({ ...state });
|
|
11
11
|
expect(_.map("name")(columns)).toEqual(
|
|
12
|
-
_.map("name")(defaultQualityControlScoresColumns)
|
|
12
|
+
_.map("name")(defaultQualityControlScoresColumns),
|
|
13
13
|
);
|
|
14
14
|
expect(columns).toMatchSnapshot();
|
|
15
15
|
});
|
|
@@ -25,7 +25,7 @@ describe("selectors: getQualityControlScoresColumns", () => {
|
|
|
25
25
|
|
|
26
26
|
expect(rendered.container.querySelector("a")).toHaveAttribute(
|
|
27
27
|
"href",
|
|
28
|
-
expect.stringContaining(`/scores/${bar.id}`)
|
|
28
|
+
expect.stringContaining(`/scores/${bar.id}`),
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
expect(rendered.container).toHaveTextContent("2024-11-19 16:34");
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
|
|
10
10
|
export const useExecutionGroupsCreate = () => {
|
|
11
11
|
return useSWRMutations(API_QUALITY_CONTROL_EXECUTION_GROUPS, (url, { arg }) =>
|
|
12
|
-
apiJsonPost(url, arg)
|
|
12
|
+
apiJsonPost(url, arg),
|
|
13
13
|
);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export const useExecutionGroupsIndex = () => {
|
|
17
17
|
const { data, error, mutate } = useSWR(
|
|
18
18
|
API_QUALITY_CONTROL_EXECUTION_GROUPS,
|
|
19
|
-
apiJson
|
|
19
|
+
apiJson,
|
|
20
20
|
);
|
|
21
21
|
return { data: data?.data?.data, error, loading: !error && !data, mutate };
|
|
22
22
|
};
|