@reltio/components 1.4.1944 → 1.4.1946
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/cjs/AttributeListItem/AttributeListItem.spec.js +4 -4
- package/cjs/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
- package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
- package/cjs/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
- package/cjs/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
- package/cjs/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
- package/cjs/AttributesView/AttributesView.d.ts +2 -1
- package/cjs/AttributesView/AttributesView.js +4 -2
- package/cjs/AttributesView/AttributesView.test.js +32 -0
- package/cjs/AutoSizeList/AutoSizeList.test.js +27 -30
- package/cjs/BasicTable/BasicTable.test.js +26 -5
- package/cjs/BasicTable/IntegrationBasicTable.test.js +16 -5
- package/cjs/BasicTable/helpers.test.js +1 -1
- package/cjs/CollapseRowButton/CollapseRowButton.test.js +3 -3
- package/cjs/CommentsContainer/CommentsContainer.test.js +2 -2
- package/cjs/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
- package/cjs/DataTypeValue/DataTypeValue.test.js +2 -25
- package/cjs/DataTypeValueEditor/useEditorContext.test.js +2 -2
- package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
- package/cjs/DropDownEditor/DropDownEditor.test.js +1 -1
- package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -27
- package/cjs/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
- package/cjs/EditModeAttributesList/EditModeAttributesList.js +16 -5
- package/cjs/EditModeAttributesList/EditModeAttributesList.test.js +7 -4
- package/cjs/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
- package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
- package/cjs/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +28 -37
- package/cjs/EntitySelector/EntitySelector.test.js +13 -42
- package/cjs/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
- package/cjs/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
- package/cjs/EntitySelector/components/Group/Group.test.js +1 -1
- package/cjs/EntityUriLink/EntityUriLink.test.js +1 -0
- package/cjs/ErrorBoundary/ErrorBoundary.test.js +2 -0
- package/cjs/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
- package/cjs/FilterButton/FilterButton.test.js +1 -1
- package/cjs/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
- package/cjs/HOCs/withTableContext/withTableContext.test.js +1 -1
- package/cjs/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -27
- package/cjs/HierarchyNodeTitle/useEntityDetails.test.js +18 -32
- package/cjs/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
- package/cjs/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
- package/cjs/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
- package/cjs/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
- package/cjs/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
- package/cjs/ImportButton/ImportButton.test.js +1 -1
- package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
- package/cjs/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
- package/cjs/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
- package/cjs/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +31 -22
- package/cjs/LineChart/LineChart.test.js +1 -1
- package/cjs/Link/Link.test.js +1 -0
- package/cjs/LookupEditor/LookupEditor.test.js +3 -3
- package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
- package/cjs/MapChart/MapChart.test.js +3 -3
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
- package/cjs/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
- package/cjs/MultipleInput/MultipleInput.test.js +11 -11
- package/cjs/MultipliableSelect/MultipliableSelect.test.js +14 -8
- package/cjs/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -27
- package/cjs/NumberEditor/NumberEditor.test.js +4 -4
- package/cjs/PieChart/PieChart.test.js +1 -1
- package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -34
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -30
- package/cjs/PivotingUriLink/PivotingUriLink.spec.js +1 -0
- package/cjs/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
- package/cjs/ProfilesList/ProfilesList.spec.js +1 -1
- package/cjs/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +6 -4
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
- package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +11 -2
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +20 -0
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +5 -0
- package/cjs/ReadOnlyAttributesPager/styles.d.ts +1 -0
- package/cjs/ReadOnlyAttributesPager/styles.js +5 -1
- package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +6 -30
- package/cjs/RelationEditor/IntegrationRelationEditor.test.js +1 -1
- package/cjs/RelationEditor/RelationEditor.test.js +20 -44
- package/cjs/ReltioMap/ReltioMap.spec.js +10 -8
- package/cjs/ReltioMap/components/EntityMarker/EntityMarker.spec.js +2 -26
- package/cjs/ScrollableTabs/ScrollableTabs.test.js +1 -1
- package/cjs/SearchInput/SearchInput.spec.js +2 -2
- package/cjs/SelectionPopup/SelectionPopup.spec.js +9 -12
- package/cjs/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
- package/cjs/ShowLess/ShowLess.test.js +1 -1
- package/cjs/ShowMore/ShowMore.test.js +2 -2
- package/cjs/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
- package/cjs/SimpleAttribute/IntegrationSimpleAttribute.test.js +15 -34
- package/cjs/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
- package/cjs/TableWithBars/TableWithBars.test.js +1 -1
- package/cjs/TreeChart/TreeChart.test.js +1 -1
- package/cjs/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
- package/cjs/UploadFileButton/UploadFileButton.spec.js +103 -69
- package/cjs/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
- package/cjs/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
- package/cjs/constants/attributes.d.ts +1 -1
- package/cjs/constants/attributes.js +2 -2
- package/cjs/constants/index.d.ts +1 -1
- package/cjs/constants/index.js +2 -2
- package/cjs/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
- package/cjs/contexts/AllwaysVisibleAttributesContext/index.js +6 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
- package/cjs/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -25
- package/cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +1 -25
- package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
- package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
- package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
- package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
- package/cjs/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
- package/cjs/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
- package/cjs/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
- package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
- package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +27 -4
- package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
- package/cjs/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
- package/cjs/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
- package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +95 -118
- package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -61
- package/cjs/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
- package/cjs/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
- package/cjs/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -26
- package/cjs/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
- package/cjs/features/history/HistoryRow/HistoryRow.specs.js +2 -26
- package/cjs/features/history/HistoryTree/HistoryTree.specs.js +1 -1
- package/cjs/features/history/HistoryView/HistoryView.specs.js +1 -1
- package/cjs/features/history/helpers/filters.test.js +6 -6
- package/cjs/features/history/hooks/useHistory.test.js +23 -48
- package/cjs/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +24 -8
- package/cjs/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -26
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +4 -30
- package/cjs/features/workflow/hooks/useChangeRequest.specs.js +11 -36
- package/cjs/helpers/attributesView.d.ts +1 -1
- package/cjs/helpers/attributesView.js +2 -2
- package/cjs/helpers/customScript.test.js +19 -19
- package/cjs/hooks/useAPI/useAPI.test.js +12 -12
- package/cjs/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
- package/cjs/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
- package/cjs/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
- package/cjs/hooks/useConfigPermissions/useConfigPermissions.specs.js +5 -29
- package/cjs/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
- package/cjs/hooks/useLayoutResetter/useLayoutResetter.test.js +8 -8
- package/cjs/hooks/useMarkers/helpers.js +1 -2
- package/cjs/hooks/useReadableSearchState/useReadableSearchState.test.js +14 -44
- package/cjs/hooks/useRelationsLoader/useRelationsLoader.specs.js +3 -4
- package/cjs/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
- package/cjs/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
- package/cjs/hooks/useSnackbar/useSnackbar.test.js +24 -17
- package/esm/AttributeListItem/AttributeListItem.spec.js +4 -4
- package/esm/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
- package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
- package/esm/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
- package/esm/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
- package/esm/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
- package/esm/AttributesView/AttributesView.d.ts +2 -1
- package/esm/AttributesView/AttributesView.js +4 -2
- package/esm/AttributesView/AttributesView.test.js +32 -0
- package/esm/AutoSizeList/AutoSizeList.test.js +28 -31
- package/esm/BasicTable/BasicTable.test.js +26 -5
- package/esm/BasicTable/IntegrationBasicTable.test.js +17 -6
- package/esm/BasicTable/helpers.test.js +1 -1
- package/esm/CollapseRowButton/CollapseRowButton.test.js +3 -3
- package/esm/CommentsContainer/CommentsContainer.test.js +2 -2
- package/esm/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
- package/esm/DataTypeValue/DataTypeValue.test.js +2 -2
- package/esm/DataTypeValueEditor/useEditorContext.test.js +2 -2
- package/esm/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
- package/esm/DropDownEditor/DropDownEditor.test.js +1 -1
- package/esm/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -4
- package/esm/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
- package/esm/EditModeAttributesList/EditModeAttributesList.js +17 -6
- package/esm/EditModeAttributesList/EditModeAttributesList.test.js +5 -2
- package/esm/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
- package/esm/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
- package/esm/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +30 -16
- package/esm/EntitySelector/EntitySelector.test.js +13 -19
- package/esm/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
- package/esm/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
- package/esm/EntitySelector/components/Group/Group.test.js +1 -1
- package/esm/EntityUriLink/EntityUriLink.test.js +1 -0
- package/esm/ErrorBoundary/ErrorBoundary.test.js +2 -0
- package/esm/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
- package/esm/FilterButton/FilterButton.test.js +1 -1
- package/esm/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
- package/esm/HOCs/withTableContext/withTableContext.test.js +1 -1
- package/esm/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -4
- package/esm/HierarchyNodeTitle/useEntityDetails.test.js +19 -10
- package/esm/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
- package/esm/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
- package/esm/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
- package/esm/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
- package/esm/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
- package/esm/ImportButton/ImportButton.test.js +1 -1
- package/esm/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
- package/esm/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
- package/esm/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
- package/esm/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +32 -23
- package/esm/LineChart/LineChart.test.js +1 -1
- package/esm/Link/Link.test.js +1 -0
- package/esm/LookupEditor/LookupEditor.test.js +3 -3
- package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
- package/esm/MapChart/MapChart.test.js +3 -3
- package/esm/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
- package/esm/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
- package/esm/MultipleInput/MultipleInput.test.js +11 -11
- package/esm/MultipliableSelect/MultipliableSelect.test.js +14 -8
- package/esm/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -4
- package/esm/NumberEditor/NumberEditor.test.js +4 -4
- package/esm/PieChart/PieChart.test.js +1 -1
- package/esm/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -11
- package/esm/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -7
- package/esm/PivotingUriLink/PivotingUriLink.spec.js +1 -0
- package/esm/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
- package/esm/ProfilesList/ProfilesList.spec.js +1 -1
- package/esm/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
- package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
- package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.js +7 -5
- package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
- package/esm/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +12 -3
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +13 -0
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +1 -0
- package/esm/ReadOnlyAttributesPager/styles.d.ts +1 -0
- package/esm/ReadOnlyAttributesPager/styles.js +4 -0
- package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +7 -8
- package/esm/RelationEditor/IntegrationRelationEditor.test.js +1 -1
- package/esm/RelationEditor/RelationEditor.test.js +21 -22
- package/esm/ReltioMap/ReltioMap.spec.js +11 -9
- package/esm/ReltioMap/components/EntityMarker/EntityMarker.spec.js +3 -4
- package/esm/ScrollableTabs/ScrollableTabs.test.js +1 -1
- package/esm/SearchInput/SearchInput.spec.js +2 -2
- package/esm/SelectionPopup/SelectionPopup.spec.js +9 -12
- package/esm/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
- package/esm/ShowLess/ShowLess.test.js +1 -1
- package/esm/ShowMore/ShowMore.test.js +2 -2
- package/esm/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
- package/esm/SimpleAttribute/IntegrationSimpleAttribute.test.js +16 -12
- package/esm/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
- package/esm/TableWithBars/TableWithBars.test.js +1 -1
- package/esm/TreeChart/TreeChart.test.js +1 -1
- package/esm/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
- package/esm/UploadFileButton/UploadFileButton.spec.js +103 -69
- package/esm/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
- package/esm/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
- package/esm/constants/attributes.d.ts +1 -1
- package/esm/constants/attributes.js +1 -1
- package/esm/constants/index.d.ts +1 -1
- package/esm/constants/index.js +1 -1
- package/esm/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
- package/esm/contexts/AllwaysVisibleAttributesContext/index.js +3 -0
- package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
- package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -2
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +2 -3
- package/esm/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
- package/esm/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
- package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
- package/esm/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
- package/esm/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
- package/esm/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
- package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
- package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +4 -3
- package/esm/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
- package/esm/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
- package/esm/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
- package/esm/features/crosswalks/hooks/useAttributeActions.test.js +95 -95
- package/esm/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -38
- package/esm/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
- package/esm/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
- package/esm/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -3
- package/esm/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
- package/esm/features/history/HistoryRow/HistoryRow.specs.js +2 -3
- package/esm/features/history/HistoryTree/HistoryTree.specs.js +1 -1
- package/esm/features/history/HistoryView/HistoryView.specs.js +1 -1
- package/esm/features/history/helpers/filters.test.js +6 -6
- package/esm/features/history/hooks/useHistory.test.js +23 -25
- package/esm/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +25 -9
- package/esm/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -3
- package/esm/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +5 -8
- package/esm/features/workflow/hooks/useChangeRequest.specs.js +11 -13
- package/esm/helpers/attributesView.d.ts +1 -1
- package/esm/helpers/attributesView.js +2 -2
- package/esm/helpers/customScript.test.js +19 -19
- package/esm/hooks/useAPI/useAPI.test.js +12 -12
- package/esm/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
- package/esm/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
- package/esm/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
- package/esm/hooks/useConfigPermissions/useConfigPermissions.specs.js +6 -7
- package/esm/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
- package/esm/hooks/useLayoutResetter/useLayoutResetter.test.js +9 -9
- package/esm/hooks/useMarkers/helpers.js +1 -2
- package/esm/hooks/useReadableSearchState/useReadableSearchState.test.js +8 -15
- package/esm/hooks/useRelationsLoader/useRelationsLoader.specs.js +1 -2
- package/esm/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
- package/esm/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
- package/esm/hooks/useSnackbar/useSnackbar.test.js +25 -18
- package/package.json +2 -2
|
@@ -200,8 +200,8 @@ describe('AttributesTable tests', function () {
|
|
|
200
200
|
rowsData: ROWS_DATA_MOCK,
|
|
201
201
|
columnsData: COLUMNS_DATA_MOCK
|
|
202
202
|
});
|
|
203
|
-
expect(helpers.getBasicTableRowsData).
|
|
204
|
-
expect(helpers.getBasicTableColumnsData).
|
|
203
|
+
expect(helpers.getBasicTableRowsData).toHaveBeenCalledWith(metadata, 'configuration/entityTypes/HCP', props.selectedAttributeTypes, helpers_1.DEFAULT_VISIBLE_COLUMNS, props.crosswalksMap, props.entity.attributes, props.activeSurvivorshipGroupUri);
|
|
204
|
+
expect(helpers.getBasicTableColumnsData).toHaveBeenCalledWith(helpers_1.DEFAULT_VISIBLE_COLUMNS.map(function (columnId) { return helpers_1.COLUMNS_DATA.find(function (_a) {
|
|
205
205
|
var id = _a.id;
|
|
206
206
|
return id === columnId;
|
|
207
207
|
}); }));
|
|
@@ -215,10 +215,10 @@ describe('AttributesTable tests', function () {
|
|
|
215
215
|
});
|
|
216
216
|
it('should select initial attribute types when props.selectedAttributeTypes is nil', function () {
|
|
217
217
|
var wrapper = (0, enzyme_1.mount)(react_1.default.createElement(AttributesTable_1.default, __assign({}, props)));
|
|
218
|
-
expect(props.onSelectAttributeTypes).not.
|
|
218
|
+
expect(props.onSelectAttributeTypes).not.toHaveBeenCalled();
|
|
219
219
|
wrapper.setProps({ selectedAttributeTypes: undefined });
|
|
220
|
-
expect(props.onSelectAttributeTypes).
|
|
221
|
-
expect(props.onSelectAttributeTypes).
|
|
220
|
+
expect(props.onSelectAttributeTypes).toHaveBeenCalledTimes(1);
|
|
221
|
+
expect(props.onSelectAttributeTypes).toHaveBeenCalledWith([
|
|
222
222
|
{
|
|
223
223
|
label: 'Country Code',
|
|
224
224
|
name: 'CountryCode',
|
|
@@ -292,7 +292,7 @@ describe('AttributesTable tests', function () {
|
|
|
292
292
|
});
|
|
293
293
|
wrapper.update();
|
|
294
294
|
expect(wrapper.find('ConfirmDeleteDialog').prop('open')).toBe(false);
|
|
295
|
-
expect(props.onDelete).
|
|
295
|
+
expect(props.onDelete).toHaveBeenCalledWith(deleteEvent);
|
|
296
296
|
});
|
|
297
297
|
it('should not call props.onDelete without confirmation on attribute delete', function () {
|
|
298
298
|
var _a, _b;
|
|
@@ -319,7 +319,7 @@ describe('AttributesTable tests', function () {
|
|
|
319
319
|
});
|
|
320
320
|
wrapper.update();
|
|
321
321
|
expect(wrapper.find('ConfirmDeleteDialog').prop('open')).toBe(false);
|
|
322
|
-
expect(props.onDelete).not.
|
|
322
|
+
expect(props.onDelete).not.toHaveBeenCalled();
|
|
323
323
|
});
|
|
324
324
|
it('should call props.onEdit on not ignored attribute edit', function () {
|
|
325
325
|
var _a, _b;
|
|
@@ -337,7 +337,7 @@ describe('AttributesTable tests', function () {
|
|
|
337
337
|
(0, test_utils_1.act)(function () {
|
|
338
338
|
onEdit(editEvent);
|
|
339
339
|
});
|
|
340
|
-
expect(props.onEdit).
|
|
340
|
+
expect(props.onEdit).toHaveBeenCalledWith(editEvent);
|
|
341
341
|
});
|
|
342
342
|
it('should show confirmation dialog on ignored attribute edit', function () {
|
|
343
343
|
var _a, _b;
|
|
@@ -357,7 +357,7 @@ describe('AttributesTable tests', function () {
|
|
|
357
357
|
onEdit(editEvent);
|
|
358
358
|
});
|
|
359
359
|
wrapper.update();
|
|
360
|
-
expect(props.onEdit).not.
|
|
360
|
+
expect(props.onEdit).not.toHaveBeenCalled();
|
|
361
361
|
expect(wrapper.find(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog).prop('open')).toBe(true);
|
|
362
362
|
});
|
|
363
363
|
it('should call props.onEdit if confirmed editing attribute with ignored ', function () {
|
|
@@ -378,8 +378,8 @@ describe('AttributesTable tests', function () {
|
|
|
378
378
|
});
|
|
379
379
|
wrapper.update();
|
|
380
380
|
wrapper.find(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog).prop('onConfirmEditWithIgnore')();
|
|
381
|
-
expect(props.onEdit).
|
|
382
|
-
expect(props.onIgnore).not.
|
|
381
|
+
expect(props.onEdit).toHaveBeenCalledWith(editEvent);
|
|
382
|
+
expect(props.onIgnore).not.toHaveBeenCalled();
|
|
383
383
|
});
|
|
384
384
|
it('should call props.onEdit and props.onIgnore if confirmed editing attribute without ignored ', function () {
|
|
385
385
|
var _a, _b;
|
|
@@ -399,8 +399,8 @@ describe('AttributesTable tests', function () {
|
|
|
399
399
|
});
|
|
400
400
|
wrapper.update();
|
|
401
401
|
wrapper.find(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog).prop('onConfirmEditWithoutIgnore')();
|
|
402
|
-
expect(props.onEdit).
|
|
403
|
-
expect(props.onIgnore).not.
|
|
402
|
+
expect(props.onEdit).toHaveBeenCalledWith(__assign(__assign({}, editEvent), { clearAttributeFlags: true }));
|
|
403
|
+
expect(props.onIgnore).not.toHaveBeenCalled();
|
|
404
404
|
});
|
|
405
405
|
it('should pass props.onAdd to AttributeValuesRenderer', function () {
|
|
406
406
|
var wrapper = (0, enzyme_1.mount)(react_1.default.createElement(AttributesTable_1.default, __assign({}, props)));
|
|
@@ -225,7 +225,7 @@ describe('attribute table tests', function () {
|
|
|
225
225
|
confirmButton = (0, react_2.within)(dialog).getByText('Yes');
|
|
226
226
|
react_2.fireEvent.click(declineButton);
|
|
227
227
|
react_2.fireEvent.click(confirmButton);
|
|
228
|
-
expect(onDelete).not.
|
|
228
|
+
expect(onDelete).not.toHaveBeenCalled();
|
|
229
229
|
unmockTableSizing();
|
|
230
230
|
return [2 /*return*/];
|
|
231
231
|
}
|
|
@@ -261,11 +261,11 @@ describe('attribute table tests', function () {
|
|
|
261
261
|
return [4 /*yield*/, user.click(pinButton)];
|
|
262
262
|
case 2:
|
|
263
263
|
_a.sent();
|
|
264
|
-
expect(onPin).
|
|
264
|
+
expect(onPin).toHaveBeenCalled();
|
|
265
265
|
return [4 /*yield*/, user.click(ignoreButton)];
|
|
266
266
|
case 3:
|
|
267
267
|
_a.sent();
|
|
268
|
-
expect(onIgnore).
|
|
268
|
+
expect(onIgnore).toHaveBeenCalled();
|
|
269
269
|
unmockTableSizing();
|
|
270
270
|
return [2 /*return*/];
|
|
271
271
|
}
|
|
@@ -288,7 +288,7 @@ describe('attribute table tests', function () {
|
|
|
288
288
|
return [4 /*yield*/, user.dblClick(react_2.screen.getByText('Ok'))];
|
|
289
289
|
case 2:
|
|
290
290
|
_a.sent();
|
|
291
|
-
expect(onEdit).
|
|
291
|
+
expect(onEdit).toHaveBeenCalledTimes(1);
|
|
292
292
|
unmockTableSizing();
|
|
293
293
|
return [2 /*return*/];
|
|
294
294
|
}
|
|
@@ -314,7 +314,7 @@ describe('attribute table tests', function () {
|
|
|
314
314
|
return [4 /*yield*/, user.dblClick(react_2.screen.getByText('Ok'))];
|
|
315
315
|
case 3:
|
|
316
316
|
_a.sent();
|
|
317
|
-
expect(onEdit).
|
|
317
|
+
expect(onEdit).toHaveBeenCalledTimes(1);
|
|
318
318
|
unmockTableSizing();
|
|
319
319
|
return [2 /*return*/];
|
|
320
320
|
}
|
|
@@ -119,8 +119,8 @@ describe('AddAttributesButton tests', function () {
|
|
|
119
119
|
uri: 'configuration/entityTypes/HCP/attributes/Date'
|
|
120
120
|
};
|
|
121
121
|
onApply([selectedSimple]);
|
|
122
|
-
expect(onSelectAttributeTypes).
|
|
123
|
-
expect(onAdd).not.
|
|
122
|
+
expect(onSelectAttributeTypes).toHaveBeenCalledWith(__spreadArray([selectedSimple], selectedAttributeTypes, true));
|
|
123
|
+
expect(onAdd).not.toHaveBeenCalled();
|
|
124
124
|
});
|
|
125
125
|
it('should add attribute to beginning on nested attribute select', function () {
|
|
126
126
|
var onSelectAttributeTypes = defaultProps.onSelectAttributeTypes, selectedAttributeTypes = defaultProps.selectedAttributeTypes, onAdd = defaultProps.onAdd, parentUri = defaultProps.parentUri;
|
|
@@ -133,8 +133,8 @@ describe('AddAttributesButton tests', function () {
|
|
|
133
133
|
uri: 'configuration/entityTypes/HCP/attributes/Nested'
|
|
134
134
|
};
|
|
135
135
|
onApply([selectedNested]);
|
|
136
|
-
expect(onSelectAttributeTypes).
|
|
137
|
-
expect(onAdd).
|
|
136
|
+
expect(onSelectAttributeTypes).toHaveBeenCalledWith(__spreadArray([selectedNested], selectedAttributeTypes, true));
|
|
137
|
+
expect(onAdd).toHaveBeenCalledWith({
|
|
138
138
|
attributeType: selectedNested,
|
|
139
139
|
parentUri: parentUri
|
|
140
140
|
});
|
|
@@ -39,20 +39,20 @@ describe('ConfirmEditIgnoredDialog tests', function () {
|
|
|
39
39
|
it('should call props.onClose on Cancel button click', function () {
|
|
40
40
|
var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, __assign({}, props)));
|
|
41
41
|
wrapper.find(Button_1.default).at(0).simulate('click');
|
|
42
|
-
expect(props.onClose).
|
|
42
|
+
expect(props.onClose).toHaveBeenCalled();
|
|
43
43
|
});
|
|
44
44
|
it('should call props.onConfirmEditWithoutIgnore and props.onClose on Ok button click', function () {
|
|
45
45
|
var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, __assign({}, props)));
|
|
46
46
|
wrapper.find(Button_1.default).at(1).simulate('click');
|
|
47
|
-
expect(props.onClose).
|
|
48
|
-
expect(props.onConfirmEditWithoutIgnore).
|
|
47
|
+
expect(props.onClose).toHaveBeenCalled();
|
|
48
|
+
expect(props.onConfirmEditWithoutIgnore).toHaveBeenCalled();
|
|
49
49
|
});
|
|
50
50
|
it('should call props.onConfirmEditWithIgnore and props.onClose on with ignore select and Ok button click', function () {
|
|
51
51
|
var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, __assign({}, props)));
|
|
52
52
|
var value = wrapper.find(RadioGroup_1.default).childAt(1).prop('value');
|
|
53
53
|
wrapper.find(RadioGroup_1.default).simulate('change', { target: { value: value } });
|
|
54
54
|
wrapper.find(Button_1.default).at(1).simulate('click');
|
|
55
|
-
expect(props.onClose).
|
|
56
|
-
expect(props.onConfirmEditWithIgnore).
|
|
55
|
+
expect(props.onClose).toHaveBeenCalled();
|
|
56
|
+
expect(props.onConfirmEditWithIgnore).toHaveBeenCalled();
|
|
57
57
|
});
|
|
58
58
|
});
|
|
@@ -137,11 +137,11 @@ describe('WinnerSourcesRenderer tests', function () {
|
|
|
137
137
|
return [4 /*yield*/, user.hover(item)];
|
|
138
138
|
case 1:
|
|
139
139
|
_a.sent();
|
|
140
|
-
expect(setCrosswalkHighlightedSpy).
|
|
140
|
+
expect(setCrosswalkHighlightedSpy).toHaveBeenCalledWith(value.crosswalks[0], true);
|
|
141
141
|
return [4 /*yield*/, user.unhover(item)];
|
|
142
142
|
case 2:
|
|
143
143
|
_a.sent();
|
|
144
|
-
expect(setCrosswalkHighlightedSpy).
|
|
144
|
+
expect(setCrosswalkHighlightedSpy).toHaveBeenCalledWith(value.crosswalks[0], false);
|
|
145
145
|
return [2 /*return*/];
|
|
146
146
|
}
|
|
147
147
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CrosswalkBase } from '@reltio/mdm-sdk';
|
|
3
3
|
type Props = {
|
|
4
4
|
crosswalk: CrosswalkBase;
|
|
5
5
|
};
|
|
6
|
-
export declare const CrosswalkDragPreview: ({ crosswalk }: Props) => JSX.Element
|
|
6
|
+
export declare const CrosswalkDragPreview: React.MemoExoticComponent<({ crosswalk }: Props) => JSX.Element>;
|
|
7
7
|
export {};
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.CrosswalkDragPreview = void 0;
|
|
7
|
-
var react_1 =
|
|
30
|
+
var react_1 = __importStar(require("react"));
|
|
8
31
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
9
32
|
var Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
10
33
|
var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
|
|
@@ -12,7 +35,7 @@ var CrosswalksDisplayContext_1 = require("../../../../../contexts/CrosswalksDisp
|
|
|
12
35
|
var SourceIcon_1 = require("../../../../../SourceIcon");
|
|
13
36
|
var ColoredBlock_1 = require("../../../ColoredBlock");
|
|
14
37
|
var styles_1 = require("./styles");
|
|
15
|
-
|
|
38
|
+
exports.CrosswalkDragPreview = (0, react_1.memo)(function (_a) {
|
|
16
39
|
var crosswalk = _a.crosswalk;
|
|
17
40
|
var styles = (0, styles_1.useStyles)();
|
|
18
41
|
var metadata = (0, MdmModuleContext_1.useMdmMetadata)();
|
|
@@ -21,5 +44,5 @@ var CrosswalkDragPreview = function (_a) {
|
|
|
21
44
|
return (react_1.default.createElement(ColoredBlock_1.ColoredBlock, { color: color, className: styles.crosswalkPreview },
|
|
22
45
|
react_1.default.createElement(SourceIcon_1.SourceIcon, { className: styles.sourceIcon, sourceType: crosswalk.type }),
|
|
23
46
|
react_1.default.createElement(Typography_1.default, { className: styles.sourceLabel, variant: 'body2' }, sourceSystemLabel)));
|
|
24
|
-
};
|
|
25
|
-
exports.CrosswalkDragPreview = CrosswalkDragPreview;
|
|
47
|
+
});
|
|
48
|
+
exports.CrosswalkDragPreview.displayName = 'CrosswalkDragPreview';
|
|
@@ -42,7 +42,7 @@ var enzyme_1 = require("enzyme");
|
|
|
42
42
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
43
43
|
var reactDnd = __importStar(require("react-dnd"));
|
|
44
44
|
var react_dnd_html5_backend_1 = require("react-dnd-html5-backend");
|
|
45
|
-
var
|
|
45
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
46
46
|
var Visibility_1 = __importDefault(require("@mui/icons-material/Visibility"));
|
|
47
47
|
var Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
48
48
|
var Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
@@ -76,7 +76,7 @@ var metadata = {
|
|
|
76
76
|
}
|
|
77
77
|
]
|
|
78
78
|
};
|
|
79
|
-
var attributesSortingStrategy =
|
|
79
|
+
var attributesSortingStrategy = mdm_sdk_1.SortingStrategy.ASC_BY_NAME;
|
|
80
80
|
var crosswalk = {
|
|
81
81
|
uri: 'entities/j8K1vc9/crosswalks/1kQ5cap2n',
|
|
82
82
|
type: 'configuration/sources/Reltio',
|
|
@@ -109,10 +109,9 @@ describe('CrosswalkRow tests', function () {
|
|
|
109
109
|
var toggleCrosswalkFocus = jest.fn();
|
|
110
110
|
var preview = jest.fn();
|
|
111
111
|
var useDragMock = jest.spyOn(reactDnd, 'useDrag').mockReturnValue([undefined, function () { return null; }, preview]);
|
|
112
|
-
var isCrosswalkDisabledSpy = jest.spyOn(mdmSdk, 'isCrosswalkDisabled');
|
|
113
112
|
var useHighlightedCrosswalksMock = jest.spyOn(CrosswalksDisplay, 'useHighlightedCrosswalks').mockReturnValue([]);
|
|
114
113
|
beforeEach(function () {
|
|
115
|
-
|
|
114
|
+
mdm_sdk_1.isCrosswalkDisabled.mockReturnValue(false);
|
|
116
115
|
jest.clearAllMocks();
|
|
117
116
|
});
|
|
118
117
|
beforeAll(function () {
|
|
@@ -151,9 +150,9 @@ describe('CrosswalkRow tests', function () {
|
|
|
151
150
|
var wrapper = setUp();
|
|
152
151
|
var coloredBlock = wrapper.find(ColoredBlock_1.ColoredBlock);
|
|
153
152
|
coloredBlock.simulate('mouseenter');
|
|
154
|
-
expect(highlightCrosswalk).
|
|
153
|
+
expect(highlightCrosswalk).toHaveBeenCalledTimes(1);
|
|
155
154
|
coloredBlock.simulate('mouseleave');
|
|
156
|
-
expect(removeHighlight).
|
|
155
|
+
expect(removeHighlight).toHaveBeenCalledTimes(1);
|
|
157
156
|
});
|
|
158
157
|
it('should render disabled button without icon if focusable === false', function () {
|
|
159
158
|
var wrapper = setUp(__assign(__assign({}, defaultProps), { focusable: false }));
|
|
@@ -170,14 +169,14 @@ describe('CrosswalkRow tests', function () {
|
|
|
170
169
|
expect(wrapper.find(ColoredBlock_1.ColoredBlock).prop('color')).toBe('#CACCD1');
|
|
171
170
|
});
|
|
172
171
|
it('should pass disabled variant prop for disabled crosswalk', function () {
|
|
173
|
-
|
|
172
|
+
mdm_sdk_1.isCrosswalkDisabled.mockReturnValue(true);
|
|
174
173
|
var wrapper = setUp();
|
|
175
174
|
expect(wrapper.find(ColoredBlock_1.ColoredBlock).prop('variant')).toBe('disabled');
|
|
176
175
|
});
|
|
177
176
|
it('should call onToggleFocus when click on eye icon', function () {
|
|
178
177
|
var wrapper = setUp();
|
|
179
178
|
wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).find('button').simulate('click');
|
|
180
|
-
expect(toggleCrosswalkFocus).
|
|
179
|
+
expect(toggleCrosswalkFocus).toHaveBeenCalledTimes(1);
|
|
181
180
|
});
|
|
182
181
|
it('should render dependent icon if isDependent prop is true ', function () {
|
|
183
182
|
var dependentProps = {
|
|
@@ -253,7 +252,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
253
252
|
expect(deleteButton).toHaveLength(0);
|
|
254
253
|
});
|
|
255
254
|
it('should not render delete button for disabled crosswalk', function () {
|
|
256
|
-
|
|
255
|
+
mdm_sdk_1.isCrosswalkDisabled.mockReturnValue(true);
|
|
257
256
|
var wrapper = setUp();
|
|
258
257
|
(0, react_hooks_1.act)(function () {
|
|
259
258
|
wrapper.find(ArrowExpandButton_1.ArrowExpandButton).find('button').simulate('click');
|
|
@@ -285,7 +284,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
285
284
|
});
|
|
286
285
|
wrapper.update();
|
|
287
286
|
expect(defaultProps.onDelete).toHaveBeenCalledWith('1kQ5cap2n');
|
|
288
|
-
expect(toggleCrosswalkFocus).
|
|
287
|
+
expect(toggleCrosswalkFocus).toHaveBeenCalledTimes(0);
|
|
289
288
|
});
|
|
290
289
|
it('should call props.onDelete and call toggleCrosswalkFocus if isFocused === true after confirmation on crosswalk delete', function () {
|
|
291
290
|
jest.spyOn(CrosswalksDisplay, 'useCrosswalkFocus').mockReturnValue({
|
|
@@ -312,7 +311,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
312
311
|
});
|
|
313
312
|
(0, test_utils_1.rerenderWrapper)(wrapper);
|
|
314
313
|
expect(defaultProps.onDelete).toHaveBeenCalledWith('1kQ5cap2n');
|
|
315
|
-
expect(toggleCrosswalkFocus).
|
|
314
|
+
expect(toggleCrosswalkFocus).toHaveBeenCalledTimes(1);
|
|
316
315
|
});
|
|
317
316
|
it('should not call props.onDelete without confirmation on crosswalk delete', function () {
|
|
318
317
|
var wrapper = setUp();
|
|
@@ -335,7 +334,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
335
334
|
});
|
|
336
335
|
(0, test_utils_1.rerenderWrapper)(wrapper);
|
|
337
336
|
expect(wrapper.find(ConfirmDeleteDialog_1.ConfirmDeleteDialog).at(0).prop('open')).toBe(false);
|
|
338
|
-
expect(defaultProps.onDelete).not.
|
|
337
|
+
expect(defaultProps.onDelete).not.toHaveBeenCalled();
|
|
339
338
|
});
|
|
340
339
|
it('should call props.onEdit when calling CrosswalkAttributes onEditAttribute prop', function () {
|
|
341
340
|
var wrapper = setUp();
|
|
@@ -365,7 +364,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
365
364
|
var wrapper = setUp(__assign(__assign({}, defaultProps), { focusable: true }));
|
|
366
365
|
var node = wrapper.find('.root').getDOMNode();
|
|
367
366
|
node.scrollIntoView = jest.fn();
|
|
368
|
-
expect(node.scrollIntoView).not.
|
|
367
|
+
expect(node.scrollIntoView).not.toHaveBeenCalled();
|
|
369
368
|
useHighlightedCrosswalksMock.mockReturnValueOnce([
|
|
370
369
|
{
|
|
371
370
|
uri: 'entities/j8K1vc9/crosswalks/1kQ5cap2n',
|
|
@@ -374,7 +373,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
374
373
|
}
|
|
375
374
|
]);
|
|
376
375
|
wrapper.setProps({ crosswalk: __assign({}, crosswalk) });
|
|
377
|
-
expect(node.scrollIntoView).
|
|
376
|
+
expect(node.scrollIntoView).toHaveBeenCalled();
|
|
378
377
|
});
|
|
379
378
|
describe('dnd', function () {
|
|
380
379
|
afterEach(function () {
|
|
@@ -391,10 +390,10 @@ describe('CrosswalkRow tests', function () {
|
|
|
391
390
|
});
|
|
392
391
|
it('should use empty image preview', function () {
|
|
393
392
|
setUp();
|
|
394
|
-
expect(preview).
|
|
393
|
+
expect(preview).toHaveBeenCalledWith((0, react_dnd_html5_backend_1.getEmptyImage)(), { captureDraggingState: true });
|
|
395
394
|
});
|
|
396
395
|
it('should not allow drag if crosswalk is disabled', function () {
|
|
397
|
-
|
|
396
|
+
mdm_sdk_1.isCrosswalkDisabled.mockReturnValue(true);
|
|
398
397
|
setUp();
|
|
399
398
|
var canDrag = useDragMock.mock.calls[0][0].canDrag;
|
|
400
399
|
expect(canDrag).toBe(false);
|
|
@@ -20,6 +20,6 @@ describe('ShowDependentLink tests', function () {
|
|
|
20
20
|
var onClick = jest.fn();
|
|
21
21
|
var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ShowDependentLink_1.ShowDependentLink, { showMore: true, onClick: onClick }));
|
|
22
22
|
wrapper.find(Link_1.default).simulate('click');
|
|
23
|
-
expect(onClick).
|
|
23
|
+
expect(onClick).toHaveBeenCalled();
|
|
24
24
|
});
|
|
25
25
|
});
|
|
@@ -256,9 +256,9 @@ describe('SourceCrosswalksRow tests', function () {
|
|
|
256
256
|
dependent: [dependentCrosswalk]
|
|
257
257
|
};
|
|
258
258
|
var wrapper = (0, enzyme_1.mount)(react_1.default.createElement(SourceCrosswalksRow_1.SourceCrosswalksRow, __assign({}, props, { crosswalksByTypes: crosswalksByTypes, crosswalksFocusEnabled: true })));
|
|
259
|
-
expect(props.onToggleExpanded).not.
|
|
259
|
+
expect(props.onToggleExpanded).not.toHaveBeenCalled();
|
|
260
260
|
useHighlightedCrosswalksMock.mockReturnValueOnce([dependentCrosswalk]);
|
|
261
261
|
wrapper.setProps({ expanded: false });
|
|
262
|
-
expect(props.onToggleExpanded).
|
|
262
|
+
expect(props.onToggleExpanded).toHaveBeenCalled();
|
|
263
263
|
});
|
|
264
264
|
});
|