@truedat/dq 8.7.0 → 8.7.2
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
|
@@ -11,12 +11,12 @@ const optionalColumns = ["errors", "records", "details"];
|
|
|
11
11
|
|
|
12
12
|
const getOptionalColumnsWithData = (segmentResults) =>
|
|
13
13
|
_.filter((column) =>
|
|
14
|
-
_.any(_.flow(_.prop(column), _.negate(_.isNil)))(segmentResults)
|
|
14
|
+
_.any(_.flow(_.prop(column), _.negate(_.isNil)))(segmentResults),
|
|
15
15
|
)(optionalColumns);
|
|
16
16
|
|
|
17
17
|
export const getCustomColumnsWithData = (segmentResults, columns) =>
|
|
18
18
|
_.filter((column) =>
|
|
19
|
-
_.any(_.flow(columnDecorator(column), _.negate(_.isEmpty)))(segmentResults)
|
|
19
|
+
_.any(_.flow(columnDecorator(column), _.negate(_.isEmpty)))(segmentResults),
|
|
20
20
|
)(columns);
|
|
21
21
|
|
|
22
22
|
export const RuleResultSegments = ({
|
|
@@ -103,7 +103,7 @@ const mapStateToProps = (state) => ({
|
|
|
103
103
|
segmentResults: state.segmentResults,
|
|
104
104
|
customColumns: getCustomColumnsWithData(
|
|
105
105
|
state.segmentResults,
|
|
106
|
-
getSegmentResultsColumns(state)
|
|
106
|
+
getSegmentResultsColumns(state),
|
|
107
107
|
),
|
|
108
108
|
isAdmin: state.authentication.role === "admin",
|
|
109
109
|
});
|
|
@@ -12,12 +12,12 @@ const optionalColumns = ["errors", "records", "details"];
|
|
|
12
12
|
|
|
13
13
|
const getOptionalColumnsWithData = (ruleResults) =>
|
|
14
14
|
_.filter((column) =>
|
|
15
|
-
_.any(_.flow(_.prop(column), _.negate(_.isNil)))(ruleResults)
|
|
15
|
+
_.any(_.flow(_.prop(column), _.negate(_.isNil)))(ruleResults),
|
|
16
16
|
)(optionalColumns);
|
|
17
17
|
|
|
18
18
|
export const getCustomColumnsWithData = (ruleResults, columns) =>
|
|
19
19
|
_.filter((column) =>
|
|
20
|
-
_.any(_.flow(columnDecorator(column), _.negate(_.isEmpty)))(ruleResults)
|
|
20
|
+
_.any(_.flow(columnDecorator(column), _.negate(_.isEmpty)))(ruleResults),
|
|
21
21
|
)(columns);
|
|
22
22
|
|
|
23
23
|
export const RuleResultsTable = ({ columns, implementation, results }) => {
|
|
@@ -75,15 +75,15 @@ export const RuleResultsTable = ({ columns, implementation, results }) => {
|
|
|
75
75
|
_.map(([id, info]) => [parseInt(id), info]),
|
|
76
76
|
_.orderBy(
|
|
77
77
|
(versionAndResultsTuple) => versionAndResultsTuple[0],
|
|
78
|
-
"desc"
|
|
78
|
+
"desc",
|
|
79
79
|
),
|
|
80
80
|
_.mapValues((versionAndResultsTuple) =>
|
|
81
81
|
versionAndResultsTuple[1].map(
|
|
82
82
|
(result, indexWithinVersionGroup) => ({
|
|
83
83
|
indexWithinVersionGroup,
|
|
84
84
|
...result,
|
|
85
|
-
})
|
|
86
|
-
)
|
|
85
|
+
}),
|
|
86
|
+
),
|
|
87
87
|
),
|
|
88
88
|
_.reduce((acc, versionResults) => [...acc, ...versionResults], []),
|
|
89
89
|
_.map((result) => (
|
|
@@ -93,7 +93,7 @@ export const RuleResultsTable = ({ columns, implementation, results }) => {
|
|
|
93
93
|
ruleResult={result}
|
|
94
94
|
customColumns={customColumns}
|
|
95
95
|
ruleImplementation={_.find(
|
|
96
|
-
(version) => version?.id === result?.implementation?.id
|
|
96
|
+
(version) => version?.id === result?.implementation?.id,
|
|
97
97
|
)(implementation?.versions)}
|
|
98
98
|
active={implementation.version === result.implementation.version}
|
|
99
99
|
tagLabel={
|
|
@@ -104,7 +104,7 @@ export const RuleResultsTable = ({ columns, implementation, results }) => {
|
|
|
104
104
|
: null
|
|
105
105
|
}
|
|
106
106
|
/>
|
|
107
|
-
))
|
|
107
|
+
)),
|
|
108
108
|
)(results)}
|
|
109
109
|
</Table.Body>
|
|
110
110
|
</Table>
|
|
@@ -29,13 +29,13 @@ import RuleProperties from "./RuleProperties";
|
|
|
29
29
|
import RuleSubscriptionLoader from "./RuleSubscriptionLoader";
|
|
30
30
|
|
|
31
31
|
const DynamicFormViewer = React.lazy(
|
|
32
|
-
() => import("@truedat/df/components/DynamicFormViewer")
|
|
32
|
+
() => import("@truedat/df/components/DynamicFormViewer"),
|
|
33
33
|
);
|
|
34
34
|
const EventsLoader = React.lazy(
|
|
35
|
-
() => import("@truedat/audit/components/EventsLoader")
|
|
35
|
+
() => import("@truedat/audit/components/EventsLoader"),
|
|
36
36
|
);
|
|
37
37
|
const TemplatesLoader = React.lazy(
|
|
38
|
-
() => import("@truedat/core/components/TemplatesLoader")
|
|
38
|
+
() => import("@truedat/core/components/TemplatesLoader"),
|
|
39
39
|
);
|
|
40
40
|
|
|
41
41
|
const QualityTemplatesLoader = () => <TemplatesLoader scope="dq" />;
|
|
@@ -34,7 +34,7 @@ export const mapStateToProps = (state, ownProps) => {
|
|
|
34
34
|
state;
|
|
35
35
|
const i18nValues = _.flow(
|
|
36
36
|
getRuleSelectedFilterValues,
|
|
37
|
-
_.map(makeOption(translations(formatMessage), selectedFilter))
|
|
37
|
+
_.map(makeOption(translations(formatMessage), selectedFilter)),
|
|
38
38
|
)(state);
|
|
39
39
|
|
|
40
40
|
const {
|
|
@@ -70,10 +70,10 @@ const mapDispatchToProps = (dispatch) =>
|
|
|
70
70
|
toggleFilterValue: toggleRuleFilterValue,
|
|
71
71
|
saveFilters: saveUserSearchFilters,
|
|
72
72
|
},
|
|
73
|
-
dispatch
|
|
73
|
+
dispatch,
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
export default compose(
|
|
77
77
|
injectIntl,
|
|
78
|
-
connect(mapStateToProps, mapDispatchToProps)
|
|
78
|
+
connect(mapStateToProps, mapDispatchToProps),
|
|
79
79
|
)(SelectedFilters);
|
|
@@ -17,7 +17,7 @@ export const RULES = gql`
|
|
|
17
17
|
|
|
18
18
|
export const rulesToOptions = flow(
|
|
19
19
|
sortBy(accentInsensitivePathOrder("name")),
|
|
20
|
-
map(({ id, name }) => ({ key: id, value: id, text: name }))
|
|
20
|
+
map(({ id, name }) => ({ key: id, value: id, text: name })),
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
export const RuleSelector = ({ rules, control, loading }) => {
|
|
@@ -9,14 +9,14 @@ import "../styles/ruleSummary.less";
|
|
|
9
9
|
const mapSummary = (implementations) => {
|
|
10
10
|
const totalImplementations = _.size(implementations);
|
|
11
11
|
const executedImplementations = _.flow(
|
|
12
|
-
_.filter(_.flow(_.propOr(null, "execution_result_info"), _.has("date")))
|
|
12
|
+
_.filter(_.flow(_.propOr(null, "execution_result_info"), _.has("date"))),
|
|
13
13
|
)(implementations);
|
|
14
14
|
|
|
15
15
|
const isFailed = (execution) =>
|
|
16
16
|
_.negate(_.has("result"))(execution) && _.has("date")(execution);
|
|
17
17
|
|
|
18
18
|
const failedImplementations = _.flow(
|
|
19
|
-
_.filter(_.flow(_.propOr(null, "execution_result_info"), isFailed))
|
|
19
|
+
_.filter(_.flow(_.propOr(null, "execution_result_info"), isFailed)),
|
|
20
20
|
)(implementations);
|
|
21
21
|
const notExecuted = totalImplementations - _.size(executedImplementations);
|
|
22
22
|
const failed = _.size(failedImplementations);
|
|
@@ -43,7 +43,7 @@ const mapSummary = (implementations) => {
|
|
|
43
43
|
yellow: 0,
|
|
44
44
|
red: 0,
|
|
45
45
|
grey: 0,
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
47
|
)(executedImplementations);
|
|
48
48
|
return {
|
|
49
49
|
notExecuted,
|
package/src/components/Rules.js
CHANGED
|
@@ -53,7 +53,7 @@ export class Rules extends Component {
|
|
|
53
53
|
componentDidUpdate(prevProps) {
|
|
54
54
|
if (prevProps.rulesSort != this.props.rulesSort) {
|
|
55
55
|
const { column: sortedColumn, direction: direction } = getSortInfo(
|
|
56
|
-
this.props.rulesSort
|
|
56
|
+
this.props.rulesSort,
|
|
57
57
|
);
|
|
58
58
|
this.setState({ sortedColumn, direction });
|
|
59
59
|
}
|
|
@@ -95,7 +95,7 @@ export class Rules extends Component {
|
|
|
95
95
|
this.setDirection,
|
|
96
96
|
this.setColumn,
|
|
97
97
|
direction,
|
|
98
|
-
sortedColumn
|
|
98
|
+
sortedColumn,
|
|
99
99
|
)
|
|
100
100
|
}
|
|
101
101
|
/>
|
|
@@ -125,12 +125,12 @@ const mapStateToProps = (state, ownProps) => ({
|
|
|
125
125
|
rules: state.rules,
|
|
126
126
|
columns: _.propOr(
|
|
127
127
|
ruleColumnsSelector(state, ownProps.intl.locale),
|
|
128
|
-
"columns"
|
|
128
|
+
"columns",
|
|
129
129
|
)(ownProps),
|
|
130
130
|
rulesSort: _.path("ruleQuery.sort")(state),
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
export default compose(
|
|
134
134
|
injectIntl,
|
|
135
|
-
connect(mapStateToProps, { sortRules })
|
|
135
|
+
connect(mapStateToProps, { sortRules }),
|
|
136
136
|
)(Rules);
|
|
@@ -27,7 +27,7 @@ const makeMapStateToProps = () => {
|
|
|
27
27
|
"ruleQuery",
|
|
28
28
|
"ruleActiveFilters",
|
|
29
29
|
undefined,
|
|
30
|
-
{ useDomainSearchFilter: true }
|
|
30
|
+
{ useDomainSearchFilter: true },
|
|
31
31
|
);
|
|
32
32
|
const mapStateToProps = (state, props) => ({
|
|
33
33
|
payload: searchQuerySelector(state, props),
|
|
@@ -36,5 +36,5 @@ const makeMapStateToProps = () => {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export default connect(makeMapStateToProps, { clearRules, fetchRules })(
|
|
39
|
-
RulesLoader
|
|
39
|
+
RulesLoader,
|
|
40
40
|
);
|
|
@@ -9,7 +9,7 @@ import Rules from "./Rules";
|
|
|
9
9
|
import RulesLoader from "./RulesLoader";
|
|
10
10
|
|
|
11
11
|
const UserSearchFiltersLoader = lazy(
|
|
12
|
-
() => import("@truedat/dd/components/UserSearchFiltersLoader")
|
|
12
|
+
() => import("@truedat/dd/components/UserSearchFiltersLoader"),
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
const RulesRoutes = () => (
|
|
@@ -11,7 +11,7 @@ export const SimpleRuleImplementationsTable = ({
|
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
12
|
|
|
13
13
|
const validColumns = _.reject(
|
|
14
|
-
({ hideOn }) => _.isFunction(hideOn) && hideOn(ruleImplementations)
|
|
14
|
+
({ hideOn }) => _.isFunction(hideOn) && hideOn(ruleImplementations),
|
|
15
15
|
)(columns);
|
|
16
16
|
return (
|
|
17
17
|
<>
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@truedat/core/routines";
|
|
12
12
|
|
|
13
13
|
const SubscriptionWatchForm = lazy(
|
|
14
|
-
() => import("@truedat/audit/components/SubscriptionWatchForm")
|
|
14
|
+
() => import("@truedat/audit/components/SubscriptionWatchForm"),
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
export const SubscriptionContent = ({ subscription, setSubscription }) => {
|
|
@@ -21,7 +21,7 @@ export default function TaxonomySummary({ ruleImplementation }) {
|
|
|
21
21
|
_.map((structure) => structure.data_structure.domains),
|
|
22
22
|
_.flatten,
|
|
23
23
|
_.uniqBy("name"),
|
|
24
|
-
_.orderBy(["name"], ["asc"])
|
|
24
|
+
_.orderBy(["name"], ["asc"]),
|
|
25
25
|
)(dataStructures);
|
|
26
26
|
|
|
27
27
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
2
|
-
import { ConceptRules } from "../ConceptRules";
|
|
3
2
|
import { linkTo } from "@truedat/core/routes";
|
|
3
|
+
import { ConceptRules } from "../ConceptRules";
|
|
4
4
|
|
|
5
5
|
describe("<ConceptRules />", () => {
|
|
6
6
|
const createRuleUrl = "/concepts/1/versions/2/rules/new";
|
|
@@ -58,7 +58,7 @@ describe("<ConceptRules />", () => {
|
|
|
58
58
|
it("renders message when not concept rules provided", async () => {
|
|
59
59
|
const { container, queryByText } = render(
|
|
60
60
|
<ConceptRules {...{ ...props, conceptRules: [] }} />,
|
|
61
|
-
renderOpts
|
|
61
|
+
renderOpts,
|
|
62
62
|
);
|
|
63
63
|
expect(container).toMatchSnapshot();
|
|
64
64
|
expect(queryByText(/empty/)).toBeTruthy();
|
|
@@ -75,15 +75,15 @@ describe("<ExecutionGroup />", () => {
|
|
|
75
75
|
});
|
|
76
76
|
await waitForLoad(rendered);
|
|
77
77
|
expect(
|
|
78
|
-
rendered.queryByText(/ruleImplementations.props.implementation_key/i)
|
|
78
|
+
rendered.queryByText(/ruleImplementations.props.implementation_key/i),
|
|
79
79
|
).toBeInTheDocument();
|
|
80
80
|
expect(rendered.queryByText(/foo/i)).toBeInTheDocument();
|
|
81
81
|
|
|
82
82
|
expect(
|
|
83
|
-
rendered.queryByText(/implementation.df_field/i)
|
|
83
|
+
rendered.queryByText(/implementation.df_field/i),
|
|
84
84
|
).toBeInTheDocument();
|
|
85
85
|
expect(
|
|
86
|
-
rendered.queryByText(/implementation_df_value/i)
|
|
86
|
+
rendered.queryByText(/implementation_df_value/i),
|
|
87
87
|
).toBeInTheDocument();
|
|
88
88
|
});
|
|
89
89
|
});
|
|
@@ -14,7 +14,7 @@ describe("<ExecutionGroupContent />", () => {
|
|
|
14
14
|
it("matches the latest snapshot and renders dynamic content", async () => {
|
|
15
15
|
const { container, queryByText } = render(
|
|
16
16
|
<ExecutionGroupContent content={content} />,
|
|
17
|
-
renderOpts
|
|
17
|
+
renderOpts,
|
|
18
18
|
);
|
|
19
19
|
await waitFor(() => {
|
|
20
20
|
expect(queryByText(/lazy/i)).not.toBeInTheDocument();
|
|
@@ -40,7 +40,7 @@ describe("<ExecutionGroups />", () => {
|
|
|
40
40
|
it("matches the latest snapshot with a row per execution group", async () => {
|
|
41
41
|
const { container, queryByText, queryAllByRole } = render(
|
|
42
42
|
<ExecutionGroups />,
|
|
43
|
-
renderOpts
|
|
43
|
+
renderOpts,
|
|
44
44
|
);
|
|
45
45
|
await waitFor(() => expect(queryByText(/pending/i)).toBeInTheDocument());
|
|
46
46
|
|
|
@@ -15,7 +15,7 @@ describe("<ImplementationExecutionFilters />", () => {
|
|
|
15
15
|
it("matches snapshot with filter links", async () => {
|
|
16
16
|
const { container, findAllByRole } = render(
|
|
17
17
|
<ImplementationExecutionFilters />,
|
|
18
|
-
renderOpts
|
|
18
|
+
renderOpts,
|
|
19
19
|
);
|
|
20
20
|
expect(await findAllByRole("link")).toHaveLength(4);
|
|
21
21
|
expect(container).toMatchSnapshot();
|
|
@@ -21,7 +21,7 @@ describe("<ImplementationExecutions />", () => {
|
|
|
21
21
|
it("matches snapshot with executions table", async () => {
|
|
22
22
|
const { container, findByRole, getByRole, getAllByRole } = render(
|
|
23
23
|
<ImplementationExecutions />,
|
|
24
|
-
renderOpts
|
|
24
|
+
renderOpts,
|
|
25
25
|
);
|
|
26
26
|
expect(await findByRole("table")).toBeInTheDocument();
|
|
27
27
|
expect(container).toMatchSnapshot();
|
|
@@ -24,7 +24,7 @@ describe("<ImplementationResultBar />", () => {
|
|
|
24
24
|
expect(rendered.container).toMatchSnapshot();
|
|
25
25
|
expect(rendered.container.querySelector(".over-goal-color")).not.toBeNull();
|
|
26
26
|
expect(rendered.container).toHaveTextContent(
|
|
27
|
-
/quality.result.percentage.date/i
|
|
27
|
+
/quality.result.percentage.date/i,
|
|
28
28
|
);
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -39,10 +39,10 @@ describe("<ImplementationResultBar />", () => {
|
|
|
39
39
|
await waitForLoad(rendered);
|
|
40
40
|
expect(rendered.container).toMatchSnapshot();
|
|
41
41
|
expect(
|
|
42
|
-
rendered.container.querySelector(".under-goal-color")
|
|
42
|
+
rendered.container.querySelector(".under-goal-color"),
|
|
43
43
|
).not.toBeNull();
|
|
44
44
|
expect(rendered.container).toHaveTextContent(
|
|
45
|
-
/quality.result.percentage.date/i
|
|
45
|
+
/quality.result.percentage.date/i,
|
|
46
46
|
);
|
|
47
47
|
});
|
|
48
48
|
|
|
@@ -60,10 +60,10 @@ describe("<ImplementationResultBar />", () => {
|
|
|
60
60
|
expect(rendered.container).toMatchSnapshot();
|
|
61
61
|
|
|
62
62
|
expect(
|
|
63
|
-
rendered.container.querySelector(".under-minimum-color")
|
|
63
|
+
rendered.container.querySelector(".under-minimum-color"),
|
|
64
64
|
).not.toBeNull();
|
|
65
65
|
expect(rendered.container).toHaveTextContent(
|
|
66
|
-
/quality.result.percentage.date/i
|
|
66
|
+
/quality.result.percentage.date/i,
|
|
67
67
|
);
|
|
68
68
|
});
|
|
69
69
|
|
|
@@ -78,7 +78,7 @@ describe("<ImplementationResultBar />", () => {
|
|
|
78
78
|
await waitForLoad(rendered);
|
|
79
79
|
expect(rendered.container).toMatchSnapshot();
|
|
80
80
|
expect(
|
|
81
|
-
rendered.container.querySelector(".not-executed-color")
|
|
81
|
+
rendered.container.querySelector(".not-executed-color"),
|
|
82
82
|
).not.toBeNull();
|
|
83
83
|
expect(rendered.container).toHaveTextContent(/quality.result.no.data/i);
|
|
84
84
|
});
|
|
@@ -6,13 +6,13 @@ import { ImplementationSearchResults } from "../ImplementationSearchResults";
|
|
|
6
6
|
jest.mock("@truedat/core/hooks", () => ({
|
|
7
7
|
useAuthorized: jest.fn(() => true),
|
|
8
8
|
useActiveRoute: jest.fn((param) =>
|
|
9
|
-
param === "/pendingImplementations" ? true : false
|
|
9
|
+
param === "/pendingImplementations" ? true : false,
|
|
10
10
|
),
|
|
11
11
|
}));
|
|
12
12
|
|
|
13
13
|
jest.mock("@truedat/core/search/SearchContext", () => {
|
|
14
14
|
const originalModule = jest.requireActual(
|
|
15
|
-
"@truedat/core/search/SearchContext"
|
|
15
|
+
"@truedat/core/search/SearchContext",
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
return {
|
|
@@ -57,7 +57,7 @@ describe("<ImplementationSearchResults />", () => {
|
|
|
57
57
|
expect(rendered.container).toMatchSnapshot();
|
|
58
58
|
|
|
59
59
|
expect(
|
|
60
|
-
rendered.container.querySelector(".rules-label-results")
|
|
60
|
+
rendered.container.querySelector(".rules-label-results"),
|
|
61
61
|
).toBeInTheDocument();
|
|
62
62
|
});
|
|
63
63
|
});
|
|
@@ -2,33 +2,37 @@ import { render, waitForLoad } from "@truedat/test/render";
|
|
|
2
2
|
import { ImplementationStructureLinksActions } from "../ImplementationStructureLinksActions";
|
|
3
3
|
|
|
4
4
|
describe("<ImplementationStructureLinksActions />", () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
it("renders button when implementation_id is present and canCreateLink is true", async () => {
|
|
6
|
+
const props = {
|
|
7
|
+
implementation_id: 1,
|
|
8
|
+
canCreateLink: true,
|
|
9
|
+
};
|
|
10
|
+
const rendered = render(<ImplementationStructureLinksActions {...props} />);
|
|
11
|
+
await waitForLoad(rendered);
|
|
12
|
+
expect(rendered.getByText("links.actions.create")).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
it("does not render button when canCreateLink is false", async () => {
|
|
16
|
+
const props = {
|
|
17
|
+
implementation_id: 1,
|
|
18
|
+
canCreateLink: false,
|
|
19
|
+
};
|
|
20
|
+
const rendered = render(<ImplementationStructureLinksActions {...props} />);
|
|
21
|
+
await waitForLoad(rendered);
|
|
22
|
+
expect(
|
|
23
|
+
rendered.queryByText("links.actions.create"),
|
|
24
|
+
).not.toBeInTheDocument();
|
|
25
|
+
});
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
it("does not render button when implementation_id is missing", async () => {
|
|
28
|
+
const props = {
|
|
29
|
+
implementation_id: null,
|
|
30
|
+
canCreateLink: true,
|
|
31
|
+
};
|
|
32
|
+
const rendered = render(<ImplementationStructureLinksActions {...props} />);
|
|
33
|
+
await waitForLoad(rendered);
|
|
34
|
+
expect(
|
|
35
|
+
rendered.queryByText("links.actions.create"),
|
|
36
|
+
).not.toBeInTheDocument();
|
|
37
|
+
});
|
|
34
38
|
});
|
|
@@ -70,11 +70,11 @@ describe("<ImplementationStructures />", () => {
|
|
|
70
70
|
<Suspense fallback={null}>
|
|
71
71
|
<ImplementationStructures {...props} />
|
|
72
72
|
</Suspense>,
|
|
73
|
-
renderOpts
|
|
73
|
+
renderOpts,
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
await waitFor(() =>
|
|
77
|
-
expect(queryByText(/AGENCIA RECIBO/i)).toBeInTheDocument()
|
|
77
|
+
expect(queryByText(/AGENCIA RECIBO/i)).toBeInTheDocument(),
|
|
78
78
|
);
|
|
79
79
|
|
|
80
80
|
expect(container).toMatchSnapshot();
|
|
@@ -90,10 +90,10 @@ describe("<ImplementationStructures />", () => {
|
|
|
90
90
|
<Suspense fallback={null}>
|
|
91
91
|
<ImplementationStructures {...props} />
|
|
92
92
|
</Suspense>,
|
|
93
|
-
{ ...renderOpts, state }
|
|
93
|
+
{ ...renderOpts, state },
|
|
94
94
|
);
|
|
95
95
|
await waitFor(() =>
|
|
96
|
-
expect(getByRole("button", { name: /create/i })).toBeEnabled()
|
|
96
|
+
expect(getByRole("button", { name: /create/i })).toBeEnabled(),
|
|
97
97
|
);
|
|
98
98
|
});
|
|
99
99
|
|
|
@@ -107,11 +107,11 @@ describe("<ImplementationStructures />", () => {
|
|
|
107
107
|
<Suspense fallback={null}>
|
|
108
108
|
<ImplementationStructures {...props} />
|
|
109
109
|
</Suspense>,
|
|
110
|
-
{ ...renderOpts, state }
|
|
110
|
+
{ ...renderOpts, state },
|
|
111
111
|
);
|
|
112
112
|
|
|
113
113
|
await waitFor(() =>
|
|
114
|
-
expect(getByRole("button", { name: /create/i })).toBeEnabled()
|
|
114
|
+
expect(getByRole("button", { name: /create/i })).toBeEnabled(),
|
|
115
115
|
);
|
|
116
116
|
|
|
117
117
|
expect(container).toMatchSnapshot();
|
|
@@ -5,7 +5,7 @@ jest.mock("@truedat/core/routes", () => ({
|
|
|
5
5
|
linkTo: {
|
|
6
6
|
IMPLEMENTATION_STRUCTURES: jest.fn(
|
|
7
7
|
({ id, implementation_id }) =>
|
|
8
|
-
`/implementations/${id}/structures/${implementation_id}
|
|
8
|
+
`/implementations/${id}/structures/${implementation_id}`,
|
|
9
9
|
),
|
|
10
10
|
},
|
|
11
11
|
}));
|
|
@@ -88,7 +88,7 @@ describe("<ImplementationStructuresNew />", () => {
|
|
|
88
88
|
const rendered = render(<ImplementationStructuresNew {...props} />);
|
|
89
89
|
|
|
90
90
|
expect(window.location.replace).toHaveBeenCalledWith(
|
|
91
|
-
"/implementations/200/structures/100"
|
|
91
|
+
"/implementations/200/structures/100",
|
|
92
92
|
);
|
|
93
93
|
expect(rendered.container).toBeEmptyDOMElement();
|
|
94
94
|
});
|
|
@@ -129,14 +129,14 @@ describe("<ImplementationSummary />", () => {
|
|
|
129
129
|
undefined,
|
|
130
130
|
],
|
|
131
131
|
operator: { value_type: "field" },
|
|
132
|
-
})
|
|
132
|
+
}),
|
|
133
133
|
).toEqual([{ id: 1, name: "name", path: ["a", "b"] }]);
|
|
134
134
|
|
|
135
135
|
expect(
|
|
136
136
|
getValues({
|
|
137
137
|
value: [{ raw: ["3", "4"] }, undefined],
|
|
138
138
|
operator: { value_type: "any" },
|
|
139
|
-
})
|
|
139
|
+
}),
|
|
140
140
|
).toEqual([{ raw: ["3", "4"] }]);
|
|
141
141
|
});
|
|
142
142
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
|
-
import { ImplementationsRoutes } from "../ImplementationsRoutes";
|
|
4
3
|
import { useAuthorized } from "@truedat/core/hooks/useAuthorized";
|
|
5
4
|
import {
|
|
6
5
|
IMPLEMENTATIONS,
|
|
@@ -24,6 +23,7 @@ import {
|
|
|
24
23
|
IMPLEMENTATION_STRUCTURES,
|
|
25
24
|
IMPLEMENTATION_STRUCTURES_NEW,
|
|
26
25
|
} from "@truedat/core/routes";
|
|
26
|
+
import { ImplementationsRoutes } from "../ImplementationsRoutes";
|
|
27
27
|
|
|
28
28
|
jest.mock("@truedat/core/hooks/useAuthorized", () => ({
|
|
29
29
|
useAuthorized: jest.fn(() => true),
|