@truedat/dq 8.7.0 → 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/ConceptRules.js +2 -3
- package/src/components/ConditionCell.js +9 -9
- package/src/components/ExecutionForm.js +1 -1
- package/src/components/ExecutionGroup.js +2 -2
- package/src/components/ExecutionGroupContent.js +4 -4
- package/src/components/ImplementationExecutionFilters.js +1 -1
- package/src/components/ImplementationFiltersLoader.js +2 -2
- package/src/components/ImplementationResultBar.js +1 -1
- package/src/components/ImplementationSearchResults.js +7 -7
- package/src/components/ImplementationStructureDelete.js +1 -1
- package/src/components/ImplementationStructuresNew.js +6 -3
- package/src/components/ImplementationSummary.js +2 -2
- package/src/components/Implementations.js +18 -11
- package/src/components/ImplementationsHeader.js +16 -21
- package/src/components/ImplementationsRoutes.js +7 -7
- package/src/components/MoveImplementation.js +1 -1
- package/src/components/NewBasicRuleImplementation.js +1 -1
- package/src/components/NewRuleImplementation.js +44 -44
- package/src/components/QualityEventError.js +11 -7
- package/src/components/RawContent.js +1 -1
- package/src/components/RemediationForm.js +1 -1
- package/src/components/RemediationPlan.js +2 -2
- package/src/components/Rule.js +1 -1
- package/src/components/RuleActions.js +1 -1
- package/src/components/RuleEventDecorator.js +1 -1
- package/src/components/RuleEventRow.js +1 -1
- package/src/components/RuleFilters.js +1 -1
- package/src/components/RuleFiltersLoader.js +1 -1
- package/src/components/RuleFormImplementations.js +1 -1
- package/src/components/RuleImplementationEventRow.js +1 -1
- package/src/components/RuleImplementationHistory.js +1 -1
- package/src/components/RuleImplementationProperties.js +2 -2
- package/src/components/RuleImplementationResults.js +2 -2
- package/src/components/RuleImplementationTabs.js +5 -5
- package/src/components/RuleImplementationsDownload.js +4 -4
- package/src/components/RuleImplementationsDownloadXlsx.js +6 -6
- package/src/components/RuleImplementationsLoader.js +1 -2
- package/src/components/RuleImplementationsTable.js +1 -1
- package/src/components/RuleResultDecorator.js +3 -3
- package/src/components/RuleResultDetails.js +1 -1
- package/src/components/RuleResultRemediationLoader.js +1 -1
- package/src/components/RuleResultSegments.js +3 -3
- package/src/components/RuleResultsTable.js +7 -7
- package/src/components/RuleRoutes.js +3 -3
- package/src/components/RuleSelectedFilters.js +3 -3
- package/src/components/RuleSelector.js +1 -1
- package/src/components/RuleSummary.js +3 -3
- package/src/components/Rules.js +4 -4
- package/src/components/RulesLoader.js +2 -2
- package/src/components/RulesRoutes.js +1 -1
- package/src/components/SimpleRuleImplementationsTable.js +1 -1
- package/src/components/Subscription.js +1 -1
- package/src/components/TaxonomySummary.js +1 -1
- package/src/components/__tests__/ConceptRules.spec.js +2 -2
- package/src/components/__tests__/ExecutionGroup.spec.js +3 -3
- package/src/components/__tests__/ExecutionGroupContent.spec.js +1 -1
- package/src/components/__tests__/ExecutionGroups.spec.js +1 -1
- package/src/components/__tests__/ExecutionGroupsTable.spec.js +1 -1
- package/src/components/__tests__/ImplementationExecutionFilters.spec.js +1 -1
- package/src/components/__tests__/ImplementationExecutions.spec.js +1 -1
- package/src/components/__tests__/ImplementationResultBar.spec.js +6 -6
- package/src/components/__tests__/ImplementationSearchResults.spec.js +3 -3
- package/src/components/__tests__/ImplementationStructureDelete.spec.js +1 -1
- package/src/components/__tests__/ImplementationStructureLink.spec.js +1 -1
- package/src/components/__tests__/ImplementationStructureLinksActions.spec.js +31 -27
- package/src/components/__tests__/ImplementationStructures.spec.js +6 -6
- package/src/components/__tests__/ImplementationStructuresNew.spec.js +2 -2
- package/src/components/__tests__/ImplementationSummary.spec.js +2 -2
- package/src/components/__tests__/Implementations.spec.js +1 -1
- package/src/components/__tests__/ImplementationsRoutes.spec.js +1 -1
- package/src/components/__tests__/ImplementationsUploadButton.spec.js +8 -8
- package/src/components/__tests__/MoveImplementation.spec.js +5 -5
- package/src/components/__tests__/NewBasicRuleImplementation.spec.js +4 -4
- package/src/components/__tests__/NewRuleImplementation.spec.js +14 -14
- package/src/components/__tests__/QualityRoutes.spec.js +1 -1
- package/src/components/__tests__/RemediationForm.spec.js +9 -3
- package/src/components/__tests__/RemediationPlan.spec.js +2 -2
- package/src/components/__tests__/RuleActions.spec.js +1 -1
- package/src/components/__tests__/RuleForm.spec.js +2 -2
- package/src/components/__tests__/RuleFormImplementations.spec.js +3 -3
- package/src/components/__tests__/RuleImplementation.spec.js +2 -2
- package/src/components/__tests__/RuleImplementationProperties.spec.js +3 -3
- package/src/components/__tests__/RuleImplementationResults.spec.js +2 -2
- package/src/components/__tests__/RuleImplementationsActions.spec.js +4 -4
- package/src/components/__tests__/RuleImplementationsLoader.spec.js +1 -1
- package/src/components/__tests__/RuleImplementationsOptions.spec.js +1 -1
- package/src/components/__tests__/RuleImplementationsTable.spec.js +3 -3
- package/src/components/__tests__/RuleResultDecorator.spec.js +15 -6
- package/src/components/__tests__/RuleResultDetails.spec.js +1 -1
- package/src/components/__tests__/RuleResultRemediations.spec.js +1 -1
- package/src/components/__tests__/RuleResultRoutes.spec.js +4 -4
- package/src/components/__tests__/RuleResultRow.spec.js +13 -13
- package/src/components/__tests__/RuleResultSegments.spec.js +1 -1
- package/src/components/__tests__/RuleRoutes.spec.js +1 -1
- package/src/components/__tests__/RuleRow.spec.js +4 -4
- package/src/components/__tests__/RuleSelectionForm.spec.js +5 -5
- package/src/components/__tests__/RuleSummary.spec.js +3 -3
- package/src/components/__tests__/Rules.spec.js +1 -1
- package/src/components/__tests__/RulesActions.spec.js +1 -1
- package/src/components/__tests__/RulesRoutes.spec.js +1 -1
- package/src/components/__tests__/Subscription.spec.js +11 -11
- package/src/components/ruleImplementationForm/DatasetForm.js +7 -7
- package/src/components/ruleImplementationForm/FieldModifier.js +5 -5
- package/src/components/ruleImplementationForm/FieldsGrid.js +2 -2
- package/src/components/ruleImplementationForm/FieldsGroup.js +1 -1
- package/src/components/ruleImplementationForm/FiltersField.js +4 -4
- package/src/components/ruleImplementationForm/FiltersFormGroup.js +3 -3
- package/src/components/ruleImplementationForm/FiltersGrid.js +3 -3
- package/src/components/ruleImplementationForm/FiltersGroup.js +2 -2
- package/src/components/ruleImplementationForm/InformationForm.js +1 -1
- package/src/components/ruleImplementationForm/RuleImplementationBasicForm.js +3 -3
- package/src/components/ruleImplementationForm/RuleImplementationForm.js +15 -11
- package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +5 -5
- package/src/components/ruleImplementationForm/__tests__/FiltersFormGroup.spec.js +1 -1
- package/src/components/ruleImplementationForm/__tests__/FiltersGroup.spec.js +1 -1
- package/src/components/ruleImplementationForm/__tests__/InformationForm.spec.js +2 -2
- package/src/components/ruleImplementationForm/__tests__/LimitsForm.spec.js +12 -12
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationBasicForm.spec.js +13 -13
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationForm.spec.js +2 -2
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +25 -25
- package/src/components/ruleImplementationForm/__tests__/ValueConditions.spec.js +1 -1
- package/src/components/ruleImplementationForm/operators.js +7 -7
- package/src/hooks/__tests__/useImplementations.spec.js +0 -1
- package/src/hooks/useImplementations.js +5 -5
- package/src/messages/en.js +0 -1
- package/src/messages/es.js +0 -1
- package/src/messages/index.js +1 -1
- package/src/reducers/__tests__/conceptRules.spec.js +3 -3
- package/src/reducers/__tests__/conceptRulesActions.spec.js +6 -6
- package/src/reducers/__tests__/implementationActions.spec.js +2 -2
- package/src/reducers/__tests__/implementationLinks.spec.js +4 -4
- package/src/reducers/__tests__/implementationsActions.spec.js +2 -2
- package/src/reducers/__tests__/previousRuleImplementationQuery.spec.js +6 -6
- package/src/reducers/__tests__/remediation.spec.js +7 -7
- package/src/reducers/__tests__/remediationActions.spec.js +3 -3
- package/src/reducers/__tests__/remediationLoading.spec.js +6 -6
- package/src/reducers/__tests__/resultsUploading.spec.js +2 -2
- package/src/reducers/__tests__/rule.spec.js +1 -1
- package/src/reducers/__tests__/ruleActiveFilters.spec.js +8 -8
- package/src/reducers/__tests__/ruleCount.spec.js +3 -3
- package/src/reducers/__tests__/ruleFiltersLoading.spec.js +2 -2
- package/src/reducers/__tests__/ruleImplementation.spec.js +2 -2
- package/src/reducers/__tests__/ruleImplementationActiveFilters.spec.js +11 -11
- package/src/reducers/__tests__/ruleImplementationCount.spec.js +5 -5
- package/src/reducers/__tests__/ruleImplementationCreating.spec.js +5 -5
- package/src/reducers/__tests__/ruleImplementationFilters.spec.js +4 -4
- package/src/reducers/__tests__/ruleImplementationLoading.spec.js +5 -3
- package/src/reducers/__tests__/ruleImplementationQuery.spec.js +7 -7
- package/src/reducers/__tests__/ruleImplementationRedirect.spec.js +13 -13
- package/src/reducers/__tests__/ruleImplementationSaving.spec.js +4 -2
- package/src/reducers/__tests__/ruleImplementationSelectedFilter.spec.js +7 -7
- package/src/reducers/__tests__/ruleImplementations.spec.js +4 -4
- package/src/reducers/__tests__/ruleImplementationsDownloading.spec.js +4 -4
- package/src/reducers/__tests__/ruleImplementationsLoading.spec.js +5 -5
- package/src/reducers/__tests__/ruleImplementationsPageSize.spec.js +4 -4
- package/src/reducers/__tests__/ruleQuery.spec.js +6 -6
- package/src/reducers/__tests__/ruleRedirect.spec.js +10 -10
- package/src/reducers/__tests__/rules.spec.js +2 -2
- package/src/reducers/__tests__/segmentResult.spec.js +3 -3
- package/src/reducers/__tests__/uploadImplementationsFile.spec.js +2 -2
- package/src/reducers/__tests__/uploadRulesFile.spec.js +2 -2
- package/src/reducers/conceptRulesActions.js +2 -2
- package/src/reducers/dqMessage.js +2 -2
- package/src/reducers/implementationsActions.js +1 -1
- package/src/reducers/previousRuleImplementationQuery.js +2 -2
- package/src/reducers/ruleFilters.js +1 -1
- package/src/reducers/ruleImplementationActiveFilters.js +1 -1
- package/src/reducers/ruleImplementationCount.js +1 -1
- package/src/reducers/ruleImplementationFilters.js +2 -2
- package/src/reducers/ruleImplementationRaw.js +1 -1
- package/src/reducers/ruleImplementationRedirect.js +3 -3
- package/src/reducers/ruleImplementationSelectedFilter.js +1 -1
- package/src/reducers/ruleImplementationsLoading.js +1 -1
- package/src/reducers/ruleImplementationsPageSize.js +1 -1
- package/src/reducers/ruleSelectedFilter.js +1 -1
- package/src/reducers/uploadingImplementationsFile.js +1 -1
- package/src/routines.js +23 -23
- package/src/sagas/__tests__/createExecutionGroup.spec.js +1 -1
- package/src/sagas/__tests__/createImplementationStructure.spec.js +1 -1
- package/src/sagas/__tests__/createRuleImplementation.spec.js +1 -1
- package/src/sagas/__tests__/deleteImplementationStructure.spec.js +1 -1
- package/src/sagas/__tests__/deleteRule.spec.js +1 -3
- package/src/sagas/__tests__/downloadRuleImplementations.spec.js +1 -1
- package/src/sagas/__tests__/fetchConceptRules.spec.js +1 -1
- package/src/sagas/__tests__/fetchRule.spec.js +1 -3
- package/src/sagas/__tests__/fetchRuleFilters.spec.js +5 -5
- package/src/sagas/__tests__/fetchRuleImplementation.spec.js +1 -1
- package/src/sagas/__tests__/fetchRuleImplementations.spec.js +1 -1
- package/src/sagas/__tests__/fetchRules.spec.js +4 -6
- package/src/sagas/__tests__/searchRuleImplementations.spec.js +3 -3
- package/src/sagas/__tests__/updateRule.spec.js +1 -3
- package/src/sagas/__tests__/updateRuleImplementation.spec.js +1 -1
- package/src/sagas/__tests__/uploadImplementations.spec.js +2 -2
- package/src/sagas/createExecutionGroup.js +1 -1
- package/src/sagas/createImplementationStructure.js +1 -1
- package/src/sagas/createRuleImplementation.js +2 -2
- package/src/sagas/deleteImplementationStructure.js +1 -1
- package/src/sagas/downloadRuleImplementations.js +1 -1
- package/src/sagas/downloadRuleImplementationsXlsx.js +1 -1
- package/src/sagas/fetchRuleImplementation.js +1 -1
- package/src/sagas/fetchRuleImplementationFilters.js +1 -1
- package/src/sagas/fetchRuleImplementations.js +2 -2
- package/src/sagas/searchRuleImplementations.js +2 -2
- package/src/sagas/updateRuleImplementation.js +1 -1
- package/src/sagas/uploadImplementations.js +1 -1
- package/src/sagas/uploadResults.js +1 -1
- package/src/sagas/uploadRules.js +1 -1
- package/src/selectors/__tests__/executionGroupsColumnsSelector.spec.js +2 -2
- package/src/selectors/__tests__/getImplementationStructureLinksColumns.spec.js +1 -1
- package/src/selectors/__tests__/getRuleImplementationSelectedFilterValues.spec.js +1 -1
- package/src/selectors/__tests__/ruleColumnsSelector.spec.js +1 -1
- package/src/selectors/datasetDefaultFiltersSelector.js +1 -1
- package/src/selectors/executionGroupsColumnsSelector.js +1 -1
- package/src/selectors/getExecutionGroupColumns.js +1 -1
- package/src/selectors/getExecutionQuery.js +1 -1
- package/src/selectors/getImplementationStructureLinksColumns.js +10 -10
- package/src/selectors/getImplementationStructures.js +10 -8
- package/src/selectors/getImplementationsExecution.js +1 -1
- package/src/selectors/getLinkedImplementationsToRulesColumns.js +1 -1
- package/src/selectors/getRuleAvailableFilters.js +2 -2
- package/src/selectors/getRuleFilterTypes.js +1 -1
- package/src/selectors/getRuleImplementationAvailableFilters.js +3 -3
- package/src/selectors/getRuleImplementationColumns.js +1 -1
- package/src/selectors/getRuleImplementationFilterTypes.js +1 -1
- package/src/selectors/getRuleImplementationForm.js +11 -11
- package/src/selectors/getRuleImplementationSelectedFilterActiveValues.js +2 -2
- package/src/selectors/getRuleImplementationSelectedFilterValues.js +2 -2
- package/src/selectors/getRuleImplementationSelectedFilters.js +1 -1
- package/src/selectors/getRuleSelectedFilterActiveValues.js +1 -1
- package/src/selectors/getRuleSelectedFilterValues.js +2 -2
- package/src/selectors/getRuleSelectedFilters.js +1 -1
- package/src/selectors/getSegmentResultsColumns.js +1 -1
- package/src/selectors/getStructureFields.js +3 -3
- package/src/selectors/ruleColumnsSelector.js +3 -3
- package/src/selectors/ruleResultsColumnsSelector.js +1 -1
- package/src/services/__tests__/encodeRawContent.spec.js +1 -1
- package/src/services/encodeRawContent.js +1 -1
|
@@ -25,7 +25,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
25
25
|
|
|
26
26
|
it("should be true after receiving the clearRedirect.TRIGGER action", () => {
|
|
27
27
|
expect(
|
|
28
|
-
ruleImplementationRedirect(fooState, { type: clearRedirect.TRIGGER })
|
|
28
|
+
ruleImplementationRedirect(fooState, { type: clearRedirect.TRIGGER }),
|
|
29
29
|
).toBe(initialState);
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -36,7 +36,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
36
36
|
ruleImplementationRedirect(fooState, {
|
|
37
37
|
type: updateRuleImplementation.SUCCESS,
|
|
38
38
|
payload,
|
|
39
|
-
})
|
|
39
|
+
}),
|
|
40
40
|
).toBe("/implementations/2");
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
47
47
|
ruleImplementationRedirect(fooState, {
|
|
48
48
|
type: createRuleImplementation.SUCCESS,
|
|
49
49
|
payload,
|
|
50
|
-
})
|
|
50
|
+
}),
|
|
51
51
|
).toBe("/implementations/1");
|
|
52
52
|
});
|
|
53
53
|
|
|
@@ -58,7 +58,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
58
58
|
ruleImplementationRedirect(fooState, {
|
|
59
59
|
type: deleteRuleResult.SUCCESS,
|
|
60
60
|
payload,
|
|
61
|
-
})
|
|
61
|
+
}),
|
|
62
62
|
).toBe("/implementations/2/results");
|
|
63
63
|
});
|
|
64
64
|
|
|
@@ -69,7 +69,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
69
69
|
ruleImplementationRedirect(fooState, {
|
|
70
70
|
type: createSubscription.SUCCESS,
|
|
71
71
|
payload,
|
|
72
|
-
})
|
|
72
|
+
}),
|
|
73
73
|
).toBe(fooState);
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -80,7 +80,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
80
80
|
ruleImplementationRedirect(fooState, {
|
|
81
81
|
type: updateSubscription.SUCCESS,
|
|
82
82
|
payload,
|
|
83
|
-
})
|
|
83
|
+
}),
|
|
84
84
|
).toBe(fooState);
|
|
85
85
|
});
|
|
86
86
|
|
|
@@ -91,7 +91,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
91
91
|
ruleImplementationRedirect(fooState, {
|
|
92
92
|
type: deleteSubscription.SUCCESS,
|
|
93
93
|
payload,
|
|
94
|
-
})
|
|
94
|
+
}),
|
|
95
95
|
).toBe(fooState);
|
|
96
96
|
});
|
|
97
97
|
|
|
@@ -102,11 +102,11 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
102
102
|
ruleImplementationRedirect(fooState, {
|
|
103
103
|
type: createRuleImplementation.FAILURE,
|
|
104
104
|
payload,
|
|
105
|
-
})
|
|
105
|
+
}),
|
|
106
106
|
).toBe(
|
|
107
107
|
linkTo.IMPLEMENTATION_CONCEPT_LINKS({
|
|
108
108
|
implementation_id: payload.implementation_id,
|
|
109
|
-
})
|
|
109
|
+
}),
|
|
110
110
|
);
|
|
111
111
|
});
|
|
112
112
|
|
|
@@ -115,7 +115,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
115
115
|
ruleImplementationRedirect(fooState, {
|
|
116
116
|
type: createRuleImplementation.FAILURE,
|
|
117
117
|
payload: {},
|
|
118
|
-
})
|
|
118
|
+
}),
|
|
119
119
|
).toBe(fooState);
|
|
120
120
|
});
|
|
121
121
|
|
|
@@ -126,7 +126,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
126
126
|
ruleImplementationRedirect(fooState, {
|
|
127
127
|
type: createImplementationStructure.SUCCESS,
|
|
128
128
|
payload,
|
|
129
|
-
})
|
|
129
|
+
}),
|
|
130
130
|
).toBe("/custom/redirect");
|
|
131
131
|
});
|
|
132
132
|
|
|
@@ -137,7 +137,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
137
137
|
ruleImplementationRedirect(fooState, {
|
|
138
138
|
type: createExecutionGroup.SUCCESS,
|
|
139
139
|
payload,
|
|
140
|
-
})
|
|
140
|
+
}),
|
|
141
141
|
).toBe(linkTo.EXECUTION_GROUP({ id: 10 }));
|
|
142
142
|
});
|
|
143
143
|
|
|
@@ -146,7 +146,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
146
146
|
ruleImplementationRedirect(fooState, {
|
|
147
147
|
type: uploadImplementations.SUCCESS,
|
|
148
148
|
payload: {},
|
|
149
|
-
})
|
|
149
|
+
}),
|
|
150
150
|
).toBe(IMPLEMENTATIONS);
|
|
151
151
|
});
|
|
152
152
|
});
|
|
@@ -12,13 +12,15 @@ describe("reducers: ruleImplementationSaving", () => {
|
|
|
12
12
|
expect(
|
|
13
13
|
ruleImplementationSaving(false, {
|
|
14
14
|
type: updateRuleImplementation.TRIGGER,
|
|
15
|
-
})
|
|
15
|
+
}),
|
|
16
16
|
).toBe(true);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("should be false after receiving the fetchRule.FULFILL action", () => {
|
|
20
20
|
expect(
|
|
21
|
-
ruleImplementationSaving(true, {
|
|
21
|
+
ruleImplementationSaving(true, {
|
|
22
|
+
type: updateRuleImplementation.FULFILL,
|
|
23
|
+
}),
|
|
22
24
|
).toBe(false);
|
|
23
25
|
});
|
|
24
26
|
|
|
@@ -13,7 +13,7 @@ const fooState = { foo: "bar" };
|
|
|
13
13
|
describe("reducers: ruleImplementationSelectedFilter", () => {
|
|
14
14
|
it("should provide the initial state", () => {
|
|
15
15
|
expect(ruleImplementationSelectedFilter(undefined, {})).toEqual(
|
|
16
|
-
initialState
|
|
16
|
+
initialState,
|
|
17
17
|
);
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -24,7 +24,7 @@ describe("reducers: ruleImplementationSelectedFilter", () => {
|
|
|
24
24
|
ruleImplementationSelectedFilter(fooState, {
|
|
25
25
|
type: addImplementationFilter.TRIGGER,
|
|
26
26
|
payload,
|
|
27
|
-
})
|
|
27
|
+
}),
|
|
28
28
|
).toEqual(filter);
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ describe("reducers: ruleImplementationSelectedFilter", () => {
|
|
|
32
32
|
expect(
|
|
33
33
|
ruleImplementationSelectedFilter(fooState, {
|
|
34
34
|
type: closeImplementationFilter.TRIGGER,
|
|
35
|
-
})
|
|
35
|
+
}),
|
|
36
36
|
).toEqual(initialState);
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -43,7 +43,7 @@ describe("reducers: ruleImplementationSelectedFilter", () => {
|
|
|
43
43
|
ruleImplementationSelectedFilter(fooState, {
|
|
44
44
|
type: openImplementationFilter.TRIGGER,
|
|
45
45
|
payload,
|
|
46
|
-
})
|
|
46
|
+
}),
|
|
47
47
|
).toEqual(filter);
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -54,7 +54,7 @@ describe("reducers: ruleImplementationSelectedFilter", () => {
|
|
|
54
54
|
ruleImplementationSelectedFilter(fooState, {
|
|
55
55
|
type: removeImplementationFilter.TRIGGER,
|
|
56
56
|
payload,
|
|
57
|
-
})
|
|
57
|
+
}),
|
|
58
58
|
).toEqual(initialState);
|
|
59
59
|
});
|
|
60
60
|
|
|
@@ -62,13 +62,13 @@ describe("reducers: ruleImplementationSelectedFilter", () => {
|
|
|
62
62
|
expect(
|
|
63
63
|
ruleImplementationSelectedFilter(fooState, {
|
|
64
64
|
type: resetImplementationFilters.TRIGGER,
|
|
65
|
-
})
|
|
65
|
+
}),
|
|
66
66
|
).toEqual(initialState);
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
it("should ignore unknown actions", () => {
|
|
70
70
|
expect(ruleImplementationSelectedFilter(fooState, { type: "FOO" })).toBe(
|
|
71
|
-
fooState
|
|
71
|
+
fooState,
|
|
72
72
|
);
|
|
73
73
|
});
|
|
74
74
|
});
|
|
@@ -32,7 +32,7 @@ describe("reducers: ruleImplementations", () => {
|
|
|
32
32
|
expect(
|
|
33
33
|
ruleImplementations(fooState, {
|
|
34
34
|
type: fetchRuleImplementations.TRIGGER,
|
|
35
|
-
})
|
|
35
|
+
}),
|
|
36
36
|
).toMatchObject(initialState);
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -43,7 +43,7 @@ describe("reducers: ruleImplementations", () => {
|
|
|
43
43
|
ruleImplementations(fooState, {
|
|
44
44
|
type: fetchRuleImplementations.SUCCESS,
|
|
45
45
|
payload,
|
|
46
|
-
})
|
|
46
|
+
}),
|
|
47
47
|
).toMatchObject(data);
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -54,7 +54,7 @@ describe("reducers: ruleImplementations", () => {
|
|
|
54
54
|
ruleImplementations(fooState, {
|
|
55
55
|
type: searchRuleImplementations.SUCCESS,
|
|
56
56
|
payload,
|
|
57
|
-
})
|
|
57
|
+
}),
|
|
58
58
|
).toMatchObject(data);
|
|
59
59
|
});
|
|
60
60
|
|
|
@@ -62,7 +62,7 @@ describe("reducers: ruleImplementations", () => {
|
|
|
62
62
|
expect(
|
|
63
63
|
ruleImplementations(fooState, {
|
|
64
64
|
type: clearRuleImplementations.TRIGGER,
|
|
65
|
-
})
|
|
65
|
+
}),
|
|
66
66
|
).toMatchObject(initialState);
|
|
67
67
|
});
|
|
68
68
|
|
|
@@ -13,16 +13,16 @@ describe("reducers: previousRuleImplementationQuery", () => {
|
|
|
13
13
|
it("should handle the downloadImplementations.TRIGGER action", () => {
|
|
14
14
|
expect(
|
|
15
15
|
ruleImplementationsDownloading(fooState, {
|
|
16
|
-
type: downloadImplementations.TRIGGER
|
|
17
|
-
})
|
|
16
|
+
type: downloadImplementations.TRIGGER,
|
|
17
|
+
}),
|
|
18
18
|
).toBeTruthy();
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
it("should handle the downloadImplementations.FULFILL action", () => {
|
|
22
22
|
expect(
|
|
23
23
|
ruleImplementationsDownloading(fooState, {
|
|
24
|
-
type: downloadImplementations.FULFILL
|
|
25
|
-
})
|
|
24
|
+
type: downloadImplementations.FULFILL,
|
|
25
|
+
}),
|
|
26
26
|
).toBeFalsy();
|
|
27
27
|
});
|
|
28
28
|
});
|
|
@@ -11,22 +11,22 @@ describe("reducers: ruleImplementationsLoading", () => {
|
|
|
11
11
|
it("should be true after receiving the fetchRuleImplementations.TRIGGER action", () => {
|
|
12
12
|
expect(
|
|
13
13
|
ruleImplementationsLoading(false, {
|
|
14
|
-
type: fetchRuleImplementations.TRIGGER
|
|
15
|
-
})
|
|
14
|
+
type: fetchRuleImplementations.TRIGGER,
|
|
15
|
+
}),
|
|
16
16
|
).toBe(true);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("should be false after receiving the fetchRuleImplementations.FULFILL action", () => {
|
|
20
20
|
expect(
|
|
21
21
|
ruleImplementationsLoading(true, {
|
|
22
|
-
type: fetchRuleImplementations.FULFILL
|
|
23
|
-
})
|
|
22
|
+
type: fetchRuleImplementations.FULFILL,
|
|
23
|
+
}),
|
|
24
24
|
).toBe(false);
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
it("should ignore unhandled actions", () => {
|
|
28
28
|
expect(ruleImplementationsLoading(fooState, { type: "FOO" })).toBe(
|
|
29
|
-
fooState
|
|
29
|
+
fooState,
|
|
30
30
|
);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -16,8 +16,8 @@ describe("reducers: ruleImplementationsPageSize", () => {
|
|
|
16
16
|
expect(
|
|
17
17
|
ruleImplementationsPageSize(fooState, {
|
|
18
18
|
type: searchRuleImplementations.TRIGGER,
|
|
19
|
-
payload
|
|
20
|
-
})
|
|
19
|
+
payload,
|
|
20
|
+
}),
|
|
21
21
|
).toEqual(fooState);
|
|
22
22
|
});
|
|
23
23
|
});
|
|
@@ -28,8 +28,8 @@ describe("reducers: ruleImplementationsPageSize", () => {
|
|
|
28
28
|
expect(
|
|
29
29
|
ruleImplementationsPageSize(fooState, {
|
|
30
30
|
type: searchRuleImplementations.TRIGGER,
|
|
31
|
-
payload: { size }
|
|
32
|
-
})
|
|
31
|
+
payload: { size },
|
|
32
|
+
}),
|
|
33
33
|
).toBe(1234);
|
|
34
34
|
});
|
|
35
35
|
});
|
|
@@ -20,7 +20,7 @@ describe("reducers: ruleQuery", () => {
|
|
|
20
20
|
const activePage = 123;
|
|
21
21
|
const payload = { activePage };
|
|
22
22
|
expect(
|
|
23
|
-
ruleQuery(fooState, { type: selectRulePage.TRIGGER, payload })
|
|
23
|
+
ruleQuery(fooState, { type: selectRulePage.TRIGGER, payload }),
|
|
24
24
|
).toEqual({ ...fooState, page: activePage });
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -40,7 +40,7 @@ describe("reducers: ruleQuery", () => {
|
|
|
40
40
|
|
|
41
41
|
it("should return default page when filter is toggled", () => {
|
|
42
42
|
expect(
|
|
43
|
-
ruleQuery(fooState, { type: toggleRuleFilterValue.TRIGGER })
|
|
43
|
+
ruleQuery(fooState, { type: toggleRuleFilterValue.TRIGGER }),
|
|
44
44
|
).toEqual({
|
|
45
45
|
...fooState,
|
|
46
46
|
page: 1,
|
|
@@ -51,7 +51,7 @@ describe("reducers: ruleQuery", () => {
|
|
|
51
51
|
it("should set sort from payload and set page to 1", () => {
|
|
52
52
|
const payload = [{ name2: "asc" }];
|
|
53
53
|
expect(
|
|
54
|
-
ruleQuery(fooState, { type: sortRules.TRIGGER, payload })
|
|
54
|
+
ruleQuery(fooState, { type: sortRules.TRIGGER, payload }),
|
|
55
55
|
).toMatchObject({ sort: [{ name2: "asc" }] });
|
|
56
56
|
});
|
|
57
57
|
});
|
|
@@ -61,14 +61,14 @@ describe("reducers: ruleQuery", () => {
|
|
|
61
61
|
it("should set the query from the payload", () => {
|
|
62
62
|
const payload = { query };
|
|
63
63
|
expect(
|
|
64
|
-
ruleQuery(fooState, { type: searchRules.TRIGGER, payload })
|
|
64
|
+
ruleQuery(fooState, { type: searchRules.TRIGGER, payload }),
|
|
65
65
|
).toMatchObject({ query });
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
it("when query is not empty it should order by relevance", () => {
|
|
69
69
|
const payload = { query };
|
|
70
70
|
expect(
|
|
71
|
-
ruleQuery(fooState, { type: searchRules.TRIGGER, payload })
|
|
71
|
+
ruleQuery(fooState, { type: searchRules.TRIGGER, payload }),
|
|
72
72
|
).toMatchObject({
|
|
73
73
|
query,
|
|
74
74
|
sort: [{ _score: "desc" }],
|
|
@@ -78,7 +78,7 @@ describe("reducers: ruleQuery", () => {
|
|
|
78
78
|
it("when query is empty it should order by name", () => {
|
|
79
79
|
const payload = { query: "" };
|
|
80
80
|
expect(
|
|
81
|
-
ruleQuery(fooState, { type: searchRules.TRIGGER, payload })
|
|
81
|
+
ruleQuery(fooState, { type: searchRules.TRIGGER, payload }),
|
|
82
82
|
).toMatchObject({
|
|
83
83
|
query: "",
|
|
84
84
|
sort: [{ "name.raw": "asc" }],
|
|
@@ -39,7 +39,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
39
39
|
|
|
40
40
|
it("should be true after receiving the clearRedirect.TRIGGER action", () => {
|
|
41
41
|
expect(ruleRedirect(fooState, { type: clearRedirect.TRIGGER })).toBe(
|
|
42
|
-
initialState
|
|
42
|
+
initialState,
|
|
43
43
|
);
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -63,7 +63,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
63
63
|
const payload = { rule_id };
|
|
64
64
|
|
|
65
65
|
expect(ruleRedirect(fooState, updateSubscription.success(payload))).toBe(
|
|
66
|
-
fooState
|
|
66
|
+
fooState,
|
|
67
67
|
);
|
|
68
68
|
});
|
|
69
69
|
|
|
@@ -72,7 +72,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
72
72
|
const payload = { rule_id };
|
|
73
73
|
|
|
74
74
|
expect(ruleRedirect(fooState, deleteSubscription.success(payload))).toBe(
|
|
75
|
-
fooState
|
|
75
|
+
fooState,
|
|
76
76
|
);
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -81,7 +81,7 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
81
81
|
const payload = { rule_id };
|
|
82
82
|
|
|
83
83
|
expect(ruleRedirect(fooState, createSubscription.success(payload))).toBe(
|
|
84
|
-
fooState
|
|
84
|
+
fooState,
|
|
85
85
|
);
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -89,42 +89,42 @@ describe("reducers: ruleImplementationRedirect", () => {
|
|
|
89
89
|
const redirectUrl = "/foo/bar";
|
|
90
90
|
const payload = { redirectUrl };
|
|
91
91
|
expect(ruleRedirect(fooState, deleteImplementation.success(payload))).toBe(
|
|
92
|
-
redirectUrl
|
|
92
|
+
redirectUrl,
|
|
93
93
|
);
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
it("should return current state on deleteImplementation.SUCCESS action without redirectUrl", () => {
|
|
97
97
|
const payload = {};
|
|
98
98
|
expect(ruleRedirect(fooState, deleteImplementation.success(payload))).toBe(
|
|
99
|
-
fooState
|
|
99
|
+
fooState,
|
|
100
100
|
);
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
it("should return the current state on submitImplementation.SUCCESS action", () => {
|
|
104
104
|
const payload = { data: {} };
|
|
105
105
|
expect(ruleRedirect(fooState, submitImplementation.success(payload))).toBe(
|
|
106
|
-
fooState
|
|
106
|
+
fooState,
|
|
107
107
|
);
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
it("should return the current state on publishImplementation.SUCCESS action", () => {
|
|
111
111
|
const payload = { data: {} };
|
|
112
112
|
expect(ruleRedirect(fooState, publishImplementation.success(payload))).toBe(
|
|
113
|
-
fooState
|
|
113
|
+
fooState,
|
|
114
114
|
);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
it("should return the current state on rejectImplementation.SUCCESS action", () => {
|
|
118
118
|
const payload = { data: {} };
|
|
119
119
|
expect(ruleRedirect(fooState, rejectImplementation.success(payload))).toBe(
|
|
120
|
-
fooState
|
|
120
|
+
fooState,
|
|
121
121
|
);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
it("should return the current state on restoreImplementation.SUCCESS action", () => {
|
|
125
125
|
const payload = { data: {} };
|
|
126
126
|
expect(ruleRedirect(fooState, restoreImplementation.success(payload))).toBe(
|
|
127
|
-
fooState
|
|
127
|
+
fooState,
|
|
128
128
|
);
|
|
129
129
|
});
|
|
130
130
|
});
|
|
@@ -13,13 +13,13 @@ describe("reducers: rules", () => {
|
|
|
13
13
|
it("should handle the SUCCESS action", () => {
|
|
14
14
|
const someRules = [
|
|
15
15
|
{ id: 1, name: "Rules 1", description: "Desc 1" },
|
|
16
|
-
{ id: 2, name: "Rules 2", description: "Desc 2" }
|
|
16
|
+
{ id: 2, name: "Rules 2", description: "Desc 2" },
|
|
17
17
|
];
|
|
18
18
|
|
|
19
19
|
const data = { data: someRules };
|
|
20
20
|
|
|
21
21
|
expect(
|
|
22
|
-
rules(fooState, { type: fetchRules.SUCCESS, payload: { data } })
|
|
22
|
+
rules(fooState, { type: fetchRules.SUCCESS, payload: { data } }),
|
|
23
23
|
).toMatchObject(someRules);
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -12,7 +12,7 @@ describe("reducers: segmentResults", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the fetchSegmentResults.TRIGGER action", () => {
|
|
14
14
|
expect(
|
|
15
|
-
segmentResults(fooState, { type: fetchSegmentResults.TRIGGER })
|
|
15
|
+
segmentResults(fooState, { type: fetchSegmentResults.TRIGGER }),
|
|
16
16
|
).toEqual(initialState);
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -30,13 +30,13 @@ describe("reducers: segmentResults", () => {
|
|
|
30
30
|
segmentResults(fooState, {
|
|
31
31
|
type: fetchSegmentResults.SUCCESS,
|
|
32
32
|
payload,
|
|
33
|
-
})
|
|
33
|
+
}),
|
|
34
34
|
).toMatchObject(segmentResult);
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
it("should handle the clearSegmentResults.TRIGGER action", () => {
|
|
38
38
|
expect(
|
|
39
|
-
segmentResults(fooState, { type: clearSegmentResults.TRIGGER })
|
|
39
|
+
segmentResults(fooState, { type: clearSegmentResults.TRIGGER }),
|
|
40
40
|
).toEqual(initialState);
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -13,7 +13,7 @@ describe("reduces: uploadingImplementationsFile", () => {
|
|
|
13
13
|
expect(
|
|
14
14
|
uploadingImplementationsFile(fooState, {
|
|
15
15
|
type: uploadImplementations.TRIGGER,
|
|
16
|
-
})
|
|
16
|
+
}),
|
|
17
17
|
).toBeTruthy();
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ describe("reduces: uploadingImplementationsFile", () => {
|
|
|
21
21
|
expect(
|
|
22
22
|
uploadingImplementationsFile(fooState, {
|
|
23
23
|
type: uploadImplementations.FULFILL,
|
|
24
|
-
})
|
|
24
|
+
}),
|
|
25
25
|
).toBeFalsy;
|
|
26
26
|
});
|
|
27
27
|
});
|
|
@@ -13,7 +13,7 @@ describe("reduces: uploadingRulesFile", () => {
|
|
|
13
13
|
expect(
|
|
14
14
|
uploadingRulesFile(fooState, {
|
|
15
15
|
type: uploadRules.TRIGGER,
|
|
16
|
-
})
|
|
16
|
+
}),
|
|
17
17
|
).toBeTruthy();
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ describe("reduces: uploadingRulesFile", () => {
|
|
|
21
21
|
expect(
|
|
22
22
|
uploadingRulesFile(fooState, {
|
|
23
23
|
type: uploadRules.FULFILL,
|
|
24
|
-
})
|
|
24
|
+
}),
|
|
25
25
|
).toBeFalsy;
|
|
26
26
|
});
|
|
27
27
|
});
|
|
@@ -5,7 +5,7 @@ const initialState = {};
|
|
|
5
5
|
|
|
6
6
|
export const conceptRulesActions = (
|
|
7
7
|
state = initialState,
|
|
8
|
-
{ type, payload }
|
|
8
|
+
{ type, payload },
|
|
9
9
|
) => {
|
|
10
10
|
switch (type) {
|
|
11
11
|
case clearConceptRules.TRIGGER:
|
|
@@ -23,7 +23,7 @@ export const conceptRulesActions = (
|
|
|
23
23
|
_.pathOr([], "domain_ids"),
|
|
24
24
|
_.map((domain) => {
|
|
25
25
|
return { ...domain, parent_id: parseInt(domain.parent_ids) };
|
|
26
|
-
})
|
|
26
|
+
}),
|
|
27
27
|
)(actions),
|
|
28
28
|
};
|
|
29
29
|
default:
|
|
@@ -38,7 +38,7 @@ const dqMessage = (state = initialState, { type, payload }) => {
|
|
|
38
38
|
message: error.message[Object.keys(error.message)[0]][0],
|
|
39
39
|
},
|
|
40
40
|
defaultMessage: "rules.upload.success.errors.default",
|
|
41
|
-
}))
|
|
41
|
+
})),
|
|
42
42
|
)(payload.data)
|
|
43
43
|
: "";
|
|
44
44
|
return {
|
|
@@ -82,7 +82,7 @@ const dqMessage = (state = initialState, { type, payload }) => {
|
|
|
82
82
|
},
|
|
83
83
|
defaultMessage:
|
|
84
84
|
"ruleImplementations.upload.success.errors.default",
|
|
85
|
-
}))
|
|
85
|
+
})),
|
|
86
86
|
)(payload.data)
|
|
87
87
|
: "";
|
|
88
88
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearRuleImplementations,
|
|
3
|
-
searchRuleImplementations
|
|
3
|
+
searchRuleImplementations,
|
|
4
4
|
} from "../routines";
|
|
5
5
|
import { initialState } from "./ruleImplementationQuery";
|
|
6
6
|
|
|
7
7
|
const previousRuleImplementationQuery = (
|
|
8
8
|
state = initialState,
|
|
9
|
-
{ type, payload }
|
|
9
|
+
{ type, payload },
|
|
10
10
|
) => {
|
|
11
11
|
switch (type) {
|
|
12
12
|
case searchRuleImplementations.TRIGGER:
|
|
@@ -10,7 +10,7 @@ const ruleFilters = (state = initialState, { type, payload }) => {
|
|
|
10
10
|
case fetchRuleFilters.SUCCESS:
|
|
11
11
|
return _.flow(
|
|
12
12
|
_.propOr({}, "data.data"),
|
|
13
|
-
_.omitBy(_.flow(_.getOr([], "values"), _.isEmpty))
|
|
13
|
+
_.omitBy(_.flow(_.getOr([], "values"), _.isEmpty)),
|
|
14
14
|
)(payload);
|
|
15
15
|
default:
|
|
16
16
|
return state;
|
|
@@ -18,8 +18,8 @@ const ruleImplementationFilters = (state = initialState, { type, payload }) => {
|
|
|
18
18
|
[_.matches({ type: "search" }), _.stubFalse],
|
|
19
19
|
[_.flow(_.getOr([], "values"), _.isEmpty), _.stubTrue],
|
|
20
20
|
[_.stubTrue, _.stubFalse],
|
|
21
|
-
])
|
|
22
|
-
)
|
|
21
|
+
]),
|
|
22
|
+
),
|
|
23
23
|
)(payload);
|
|
24
24
|
default:
|
|
25
25
|
return state;
|
|
@@ -18,7 +18,7 @@ const initialState = "";
|
|
|
18
18
|
|
|
19
19
|
export const ruleImplementationRedirect = (
|
|
20
20
|
state = initialState,
|
|
21
|
-
{ type, payload }
|
|
21
|
+
{ type, payload },
|
|
22
22
|
) => {
|
|
23
23
|
switch (type) {
|
|
24
24
|
case clearRedirect.TRIGGER:
|
|
@@ -28,8 +28,8 @@ export const ruleImplementationRedirect = (
|
|
|
28
28
|
return payload?.redirectUrl
|
|
29
29
|
? payload.redirectUrl
|
|
30
30
|
: id
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
? linkTo.IMPLEMENTATION({ implementation_id: id })
|
|
32
|
+
: linkTo.IMPLEMENTATIONS();
|
|
33
33
|
}
|
|
34
34
|
case createRuleImplementation.FAILURE: {
|
|
35
35
|
return payload?.implementation_id
|