@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.
Files changed (301) hide show
  1. package/cjs/AttributeListItem/AttributeListItem.spec.js +4 -4
  2. package/cjs/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
  3. package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
  4. package/cjs/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
  5. package/cjs/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
  6. package/cjs/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
  7. package/cjs/AttributesView/AttributesView.d.ts +2 -1
  8. package/cjs/AttributesView/AttributesView.js +4 -2
  9. package/cjs/AttributesView/AttributesView.test.js +32 -0
  10. package/cjs/AutoSizeList/AutoSizeList.test.js +27 -30
  11. package/cjs/BasicTable/BasicTable.test.js +26 -5
  12. package/cjs/BasicTable/IntegrationBasicTable.test.js +16 -5
  13. package/cjs/BasicTable/helpers.test.js +1 -1
  14. package/cjs/CollapseRowButton/CollapseRowButton.test.js +3 -3
  15. package/cjs/CommentsContainer/CommentsContainer.test.js +2 -2
  16. package/cjs/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
  17. package/cjs/DataTypeValue/DataTypeValue.test.js +2 -25
  18. package/cjs/DataTypeValueEditor/useEditorContext.test.js +2 -2
  19. package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
  20. package/cjs/DropDownEditor/DropDownEditor.test.js +1 -1
  21. package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -27
  22. package/cjs/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
  23. package/cjs/EditModeAttributesList/EditModeAttributesList.js +16 -5
  24. package/cjs/EditModeAttributesList/EditModeAttributesList.test.js +7 -4
  25. package/cjs/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
  26. package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
  27. package/cjs/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +28 -37
  28. package/cjs/EntitySelector/EntitySelector.test.js +13 -42
  29. package/cjs/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
  30. package/cjs/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
  31. package/cjs/EntitySelector/components/Group/Group.test.js +1 -1
  32. package/cjs/EntityUriLink/EntityUriLink.test.js +1 -0
  33. package/cjs/ErrorBoundary/ErrorBoundary.test.js +2 -0
  34. package/cjs/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
  35. package/cjs/FilterButton/FilterButton.test.js +1 -1
  36. package/cjs/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
  37. package/cjs/HOCs/withTableContext/withTableContext.test.js +1 -1
  38. package/cjs/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -27
  39. package/cjs/HierarchyNodeTitle/useEntityDetails.test.js +18 -32
  40. package/cjs/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
  41. package/cjs/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
  42. package/cjs/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
  43. package/cjs/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
  44. package/cjs/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
  45. package/cjs/ImportButton/ImportButton.test.js +1 -1
  46. package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
  47. package/cjs/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
  48. package/cjs/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
  49. package/cjs/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +31 -22
  50. package/cjs/LineChart/LineChart.test.js +1 -1
  51. package/cjs/Link/Link.test.js +1 -0
  52. package/cjs/LookupEditor/LookupEditor.test.js +3 -3
  53. package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
  54. package/cjs/MapChart/MapChart.test.js +3 -3
  55. package/cjs/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
  56. package/cjs/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
  57. package/cjs/MultipleInput/MultipleInput.test.js +11 -11
  58. package/cjs/MultipliableSelect/MultipliableSelect.test.js +14 -8
  59. package/cjs/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -27
  60. package/cjs/NumberEditor/NumberEditor.test.js +4 -4
  61. package/cjs/PieChart/PieChart.test.js +1 -1
  62. package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -34
  63. package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -30
  64. package/cjs/PivotingUriLink/PivotingUriLink.spec.js +1 -0
  65. package/cjs/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
  66. package/cjs/ProfilesList/ProfilesList.spec.js +1 -1
  67. package/cjs/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
  68. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
  69. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +6 -4
  70. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
  71. package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +11 -2
  72. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
  73. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +20 -0
  74. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
  75. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +5 -0
  76. package/cjs/ReadOnlyAttributesPager/styles.d.ts +1 -0
  77. package/cjs/ReadOnlyAttributesPager/styles.js +5 -1
  78. package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +6 -30
  79. package/cjs/RelationEditor/IntegrationRelationEditor.test.js +1 -1
  80. package/cjs/RelationEditor/RelationEditor.test.js +20 -44
  81. package/cjs/ReltioMap/ReltioMap.spec.js +10 -8
  82. package/cjs/ReltioMap/components/EntityMarker/EntityMarker.spec.js +2 -26
  83. package/cjs/ScrollableTabs/ScrollableTabs.test.js +1 -1
  84. package/cjs/SearchInput/SearchInput.spec.js +2 -2
  85. package/cjs/SelectionPopup/SelectionPopup.spec.js +9 -12
  86. package/cjs/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
  87. package/cjs/ShowLess/ShowLess.test.js +1 -1
  88. package/cjs/ShowMore/ShowMore.test.js +2 -2
  89. package/cjs/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
  90. package/cjs/SimpleAttribute/IntegrationSimpleAttribute.test.js +15 -34
  91. package/cjs/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
  92. package/cjs/TableWithBars/TableWithBars.test.js +1 -1
  93. package/cjs/TreeChart/TreeChart.test.js +1 -1
  94. package/cjs/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
  95. package/cjs/UploadFileButton/UploadFileButton.spec.js +103 -69
  96. package/cjs/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
  97. package/cjs/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
  98. package/cjs/constants/attributes.d.ts +1 -1
  99. package/cjs/constants/attributes.js +2 -2
  100. package/cjs/constants/index.d.ts +1 -1
  101. package/cjs/constants/index.js +2 -2
  102. package/cjs/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
  103. package/cjs/contexts/AllwaysVisibleAttributesContext/index.js +6 -0
  104. package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
  105. package/cjs/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -25
  106. package/cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +1 -25
  107. package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
  108. package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
  109. package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
  110. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
  111. package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
  112. package/cjs/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
  113. package/cjs/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
  114. package/cjs/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
  115. package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
  116. package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +27 -4
  117. package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
  118. package/cjs/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
  119. package/cjs/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
  120. package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +95 -118
  121. package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -61
  122. package/cjs/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
  123. package/cjs/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
  124. package/cjs/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -26
  125. package/cjs/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
  126. package/cjs/features/history/HistoryRow/HistoryRow.specs.js +2 -26
  127. package/cjs/features/history/HistoryTree/HistoryTree.specs.js +1 -1
  128. package/cjs/features/history/HistoryView/HistoryView.specs.js +1 -1
  129. package/cjs/features/history/helpers/filters.test.js +6 -6
  130. package/cjs/features/history/hooks/useHistory.test.js +23 -48
  131. package/cjs/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +24 -8
  132. package/cjs/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -26
  133. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +4 -30
  134. package/cjs/features/workflow/hooks/useChangeRequest.specs.js +11 -36
  135. package/cjs/helpers/attributesView.d.ts +1 -1
  136. package/cjs/helpers/attributesView.js +2 -2
  137. package/cjs/helpers/customScript.test.js +19 -19
  138. package/cjs/hooks/useAPI/useAPI.test.js +12 -12
  139. package/cjs/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
  140. package/cjs/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
  141. package/cjs/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
  142. package/cjs/hooks/useConfigPermissions/useConfigPermissions.specs.js +5 -29
  143. package/cjs/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
  144. package/cjs/hooks/useLayoutResetter/useLayoutResetter.test.js +8 -8
  145. package/cjs/hooks/useMarkers/helpers.js +1 -2
  146. package/cjs/hooks/useReadableSearchState/useReadableSearchState.test.js +14 -44
  147. package/cjs/hooks/useRelationsLoader/useRelationsLoader.specs.js +3 -4
  148. package/cjs/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
  149. package/cjs/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
  150. package/cjs/hooks/useSnackbar/useSnackbar.test.js +24 -17
  151. package/esm/AttributeListItem/AttributeListItem.spec.js +4 -4
  152. package/esm/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
  153. package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
  154. package/esm/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
  155. package/esm/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
  156. package/esm/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
  157. package/esm/AttributesView/AttributesView.d.ts +2 -1
  158. package/esm/AttributesView/AttributesView.js +4 -2
  159. package/esm/AttributesView/AttributesView.test.js +32 -0
  160. package/esm/AutoSizeList/AutoSizeList.test.js +28 -31
  161. package/esm/BasicTable/BasicTable.test.js +26 -5
  162. package/esm/BasicTable/IntegrationBasicTable.test.js +17 -6
  163. package/esm/BasicTable/helpers.test.js +1 -1
  164. package/esm/CollapseRowButton/CollapseRowButton.test.js +3 -3
  165. package/esm/CommentsContainer/CommentsContainer.test.js +2 -2
  166. package/esm/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
  167. package/esm/DataTypeValue/DataTypeValue.test.js +2 -2
  168. package/esm/DataTypeValueEditor/useEditorContext.test.js +2 -2
  169. package/esm/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
  170. package/esm/DropDownEditor/DropDownEditor.test.js +1 -1
  171. package/esm/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -4
  172. package/esm/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
  173. package/esm/EditModeAttributesList/EditModeAttributesList.js +17 -6
  174. package/esm/EditModeAttributesList/EditModeAttributesList.test.js +5 -2
  175. package/esm/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
  176. package/esm/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
  177. package/esm/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +30 -16
  178. package/esm/EntitySelector/EntitySelector.test.js +13 -19
  179. package/esm/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
  180. package/esm/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
  181. package/esm/EntitySelector/components/Group/Group.test.js +1 -1
  182. package/esm/EntityUriLink/EntityUriLink.test.js +1 -0
  183. package/esm/ErrorBoundary/ErrorBoundary.test.js +2 -0
  184. package/esm/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
  185. package/esm/FilterButton/FilterButton.test.js +1 -1
  186. package/esm/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
  187. package/esm/HOCs/withTableContext/withTableContext.test.js +1 -1
  188. package/esm/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -4
  189. package/esm/HierarchyNodeTitle/useEntityDetails.test.js +19 -10
  190. package/esm/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
  191. package/esm/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
  192. package/esm/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
  193. package/esm/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
  194. package/esm/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
  195. package/esm/ImportButton/ImportButton.test.js +1 -1
  196. package/esm/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
  197. package/esm/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
  198. package/esm/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
  199. package/esm/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +32 -23
  200. package/esm/LineChart/LineChart.test.js +1 -1
  201. package/esm/Link/Link.test.js +1 -0
  202. package/esm/LookupEditor/LookupEditor.test.js +3 -3
  203. package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
  204. package/esm/MapChart/MapChart.test.js +3 -3
  205. package/esm/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
  206. package/esm/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
  207. package/esm/MultipleInput/MultipleInput.test.js +11 -11
  208. package/esm/MultipliableSelect/MultipliableSelect.test.js +14 -8
  209. package/esm/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -4
  210. package/esm/NumberEditor/NumberEditor.test.js +4 -4
  211. package/esm/PieChart/PieChart.test.js +1 -1
  212. package/esm/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -11
  213. package/esm/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -7
  214. package/esm/PivotingUriLink/PivotingUriLink.spec.js +1 -0
  215. package/esm/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
  216. package/esm/ProfilesList/ProfilesList.spec.js +1 -1
  217. package/esm/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
  218. package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
  219. package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.js +7 -5
  220. package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
  221. package/esm/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +12 -3
  222. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
  223. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +13 -0
  224. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
  225. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +1 -0
  226. package/esm/ReadOnlyAttributesPager/styles.d.ts +1 -0
  227. package/esm/ReadOnlyAttributesPager/styles.js +4 -0
  228. package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +7 -8
  229. package/esm/RelationEditor/IntegrationRelationEditor.test.js +1 -1
  230. package/esm/RelationEditor/RelationEditor.test.js +21 -22
  231. package/esm/ReltioMap/ReltioMap.spec.js +11 -9
  232. package/esm/ReltioMap/components/EntityMarker/EntityMarker.spec.js +3 -4
  233. package/esm/ScrollableTabs/ScrollableTabs.test.js +1 -1
  234. package/esm/SearchInput/SearchInput.spec.js +2 -2
  235. package/esm/SelectionPopup/SelectionPopup.spec.js +9 -12
  236. package/esm/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
  237. package/esm/ShowLess/ShowLess.test.js +1 -1
  238. package/esm/ShowMore/ShowMore.test.js +2 -2
  239. package/esm/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
  240. package/esm/SimpleAttribute/IntegrationSimpleAttribute.test.js +16 -12
  241. package/esm/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
  242. package/esm/TableWithBars/TableWithBars.test.js +1 -1
  243. package/esm/TreeChart/TreeChart.test.js +1 -1
  244. package/esm/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
  245. package/esm/UploadFileButton/UploadFileButton.spec.js +103 -69
  246. package/esm/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
  247. package/esm/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
  248. package/esm/constants/attributes.d.ts +1 -1
  249. package/esm/constants/attributes.js +1 -1
  250. package/esm/constants/index.d.ts +1 -1
  251. package/esm/constants/index.js +1 -1
  252. package/esm/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
  253. package/esm/contexts/AllwaysVisibleAttributesContext/index.js +3 -0
  254. package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
  255. package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -2
  256. package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +2 -3
  257. package/esm/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
  258. package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
  259. package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
  260. package/esm/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
  261. package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
  262. package/esm/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
  263. package/esm/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
  264. package/esm/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
  265. package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
  266. package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +4 -3
  267. package/esm/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
  268. package/esm/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
  269. package/esm/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
  270. package/esm/features/crosswalks/hooks/useAttributeActions.test.js +95 -95
  271. package/esm/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -38
  272. package/esm/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
  273. package/esm/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
  274. package/esm/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -3
  275. package/esm/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
  276. package/esm/features/history/HistoryRow/HistoryRow.specs.js +2 -3
  277. package/esm/features/history/HistoryTree/HistoryTree.specs.js +1 -1
  278. package/esm/features/history/HistoryView/HistoryView.specs.js +1 -1
  279. package/esm/features/history/helpers/filters.test.js +6 -6
  280. package/esm/features/history/hooks/useHistory.test.js +23 -25
  281. package/esm/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +25 -9
  282. package/esm/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -3
  283. package/esm/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +5 -8
  284. package/esm/features/workflow/hooks/useChangeRequest.specs.js +11 -13
  285. package/esm/helpers/attributesView.d.ts +1 -1
  286. package/esm/helpers/attributesView.js +2 -2
  287. package/esm/helpers/customScript.test.js +19 -19
  288. package/esm/hooks/useAPI/useAPI.test.js +12 -12
  289. package/esm/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
  290. package/esm/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
  291. package/esm/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
  292. package/esm/hooks/useConfigPermissions/useConfigPermissions.specs.js +6 -7
  293. package/esm/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
  294. package/esm/hooks/useLayoutResetter/useLayoutResetter.test.js +9 -9
  295. package/esm/hooks/useMarkers/helpers.js +1 -2
  296. package/esm/hooks/useReadableSearchState/useReadableSearchState.test.js +8 -15
  297. package/esm/hooks/useRelationsLoader/useRelationsLoader.specs.js +1 -2
  298. package/esm/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
  299. package/esm/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
  300. package/esm/hooks/useSnackbar/useSnackbar.test.js +25 -18
  301. package/package.json +2 -2
@@ -22,8 +22,7 @@ import React from 'react';
22
22
  import { mount } from 'enzyme';
23
23
  import Button from '@mui/material/Button';
24
24
  import Typography from '@mui/material/Typography';
25
- import { ACTIVENESS_ATTR_TYPES, Directions, ErrorSource, Mode } from '@reltio/mdm-sdk';
26
- import * as mdmSdk from '@reltio/mdm-sdk';
25
+ import { ACTIVENESS_ATTR_TYPES, Directions, ErrorSource, Mode, createTemporaryEntity, getEntityType, getInOutRelations, validateConnection } from '@reltio/mdm-sdk';
27
26
  import RelationEditor from './RelationEditor';
28
27
  import { ConnectionRelationTypeSelector } from '../ConnectionRelationTypeSelector';
29
28
  import { ErrorWrapper } from '../ErrorWrapper';
@@ -184,7 +183,7 @@ describe('RelationEditor', function () {
184
183
  };
185
184
  var props = __assign(__assign({}, defaultProps), { connection: connection, config: config });
186
185
  setUp({ props: props });
187
- expect(mdmSdk.getInOutRelations).toHaveBeenCalledWith({
186
+ expect(getInOutRelations).toHaveBeenCalledWith({
188
187
  content: config.content,
189
188
  direction: Directions.IN,
190
189
  relationType: 'configuration/relationTypes/AccountTeam',
@@ -211,7 +210,7 @@ describe('RelationEditor', function () {
211
210
  };
212
211
  var props = __assign(__assign({}, defaultProps), { connection: connection, config: config });
213
212
  setUp({ props: props });
214
- expect(mdmSdk.getInOutRelations).toHaveBeenCalledWith({
213
+ expect(getInOutRelations).toHaveBeenCalledWith({
215
214
  content: config.contentSecondLevel,
216
215
  direction: Directions.IN,
217
216
  relationType: 'configuration/relationTypes/AccountTeam',
@@ -692,7 +691,7 @@ describe('RelationEditor', function () {
692
691
  expect(mdmActions.closeRelationEditor).not.toHaveBeenCalledWith(config.id, expect.any(String));
693
692
  });
694
693
  it('should evaluate and update connection entity label if modified entity is specified', function () {
695
- jest.spyOn(mdmSdk, 'getEntityType').mockReturnValue({ dataLabelPattern: '{Name}' });
694
+ getEntityType.mockReturnValue({ dataLabelPattern: '{Name}' });
696
695
  var expectedLabel = 'new Label!';
697
696
  var modifiedEntity = {
698
697
  uri: 'entities/uri$$1',
@@ -753,7 +752,7 @@ describe('RelationEditor', function () {
753
752
  expect(mdmActions.closeRelationEditor).toHaveBeenCalledWith(config.id, expectedConnection.relation.relationUri);
754
753
  });
755
754
  it('should not update connection entity label if modified entity is not specified', function () {
756
- jest.spyOn(mdmSdk, 'getEntityType').mockReturnValue({ dataLabelPattern: '{Name}' });
755
+ getEntityType.mockReturnValue({ dataLabelPattern: '{Name}' });
757
756
  var props = __assign(__assign({}, defaultProps), { config: config, metadata: { relationTypes: relationTypes, entityTypes: [] } });
758
757
  var component = setUp({ props: props });
759
758
  var applyButton = findApplyButton(component);
@@ -808,7 +807,7 @@ describe('RelationEditor', function () {
808
807
  expect(mdmActions.closeRelationEditor).toHaveBeenCalledWith(config.id, expectedConnection.relation.relationUri);
809
808
  });
810
809
  it('should clean up outdated temp modified entities', function () {
811
- jest.spyOn(mdmSdk, 'getEntityType').mockReturnValue({});
810
+ getEntityType.mockReturnValue({});
812
811
  var connection = {
813
812
  relation: { relationUri: relationUri },
814
813
  entity: { entityUri: 'entities/uri$$relationEntity' }
@@ -905,8 +904,8 @@ describe('RelationEditor', function () {
905
904
  expect(mdmActions.entityDeleted).toHaveBeenCalledWith('entities/uri$$locationEntity');
906
905
  expect(mdmActions.entityDeleted).not.toHaveBeenCalledWith('entities/uri$$notRelatedEntity');
907
906
  });
908
- it('should call mdmSdk validateConnection with correct params', function () {
909
- jest.spyOn(mdmSdk, 'getEntityType').mockReturnValue({});
907
+ it('should call validateConnection with correct params', function () {
908
+ getEntityType.mockReturnValue({});
910
909
  var connection = {
911
910
  relation: { relationUri: relationUri },
912
911
  entity: { entityUri: 'entities/uri$$relationEntity' }
@@ -937,7 +936,7 @@ describe('RelationEditor', function () {
937
936
  applyButton = findApplyButton(component);
938
937
  expect(applyButton.prop('disabled')).toBe(false);
939
938
  applyButton.find('button').simulate('click');
940
- expect(mdmSdk.validateConnection).toHaveBeenCalledWith(metadata, updatedAllModifiedEntities, updatedConnecton);
939
+ expect(validateConnection).toHaveBeenCalledWith(metadata, updatedAllModifiedEntities, updatedConnecton);
941
940
  });
942
941
  it('should enable Apply button if modified entity was changed', function () {
943
942
  var connection = { relation: { relationUri: relationUri }, entity: { entityUri: 'entities/uri$$123' } };
@@ -1260,8 +1259,8 @@ describe('RelationEditor', function () {
1260
1259
  describe('onCreate behavior', function () {
1261
1260
  it('should create new entity and call events for saving it in relation and in modified entities store slice', function () {
1262
1261
  var mockedNewEntity = { uri: 'entities/uri$$1' };
1263
- jest.spyOn(mdmSdk, 'createTemporaryEntity').mockReturnValue(mockedNewEntity);
1264
- jest.spyOn(mdmSdk, 'getEntityType').mockReturnValue({ dataLabelPattern: '{Name}' });
1262
+ createTemporaryEntity.mockReturnValue(mockedNewEntity);
1263
+ getEntityType.mockReturnValue({ dataLabelPattern: '{Name}' });
1265
1264
  var connection = {
1266
1265
  relation: {
1267
1266
  relationUri: relationUri,
@@ -1276,16 +1275,16 @@ describe('RelationEditor', function () {
1276
1275
  var entitySelector = component.find(EntitySelector);
1277
1276
  expect(entitySelector.length).toBe(1);
1278
1277
  entitySelector.prop('onCreate')(entityTypeUri);
1279
- expect(mdmSdk.getEntityType).toHaveBeenCalledWith(metadata, entityTypeUri);
1280
- expect(mdmSdk.createTemporaryEntity).toHaveBeenCalledWith(expect.objectContaining({ entityTypeUri: entityTypeUri }));
1278
+ expect(getEntityType).toHaveBeenCalledWith(metadata, entityTypeUri);
1279
+ expect(createTemporaryEntity).toHaveBeenCalledWith(expect.objectContaining({ entityTypeUri: entityTypeUri }));
1281
1280
  expect(mdmActions.setRelationEntity).toHaveBeenCalledWith(config.id, connection.relation.relationUri, mockedNewEntity);
1282
1281
  expect(mdmActions.entityCreated).toHaveBeenCalledWith(mockedNewEntity);
1283
1282
  expect(mdmAction).toHaveBeenCalledTimes(2);
1284
1283
  });
1285
1284
  it('should delete previous temp (modified) entity before creating new one', function () {
1286
1285
  var mockedNewEntity = { uri: 'entities/uri$$1' };
1287
- jest.spyOn(mdmSdk, 'createTemporaryEntity').mockReturnValue(mockedNewEntity);
1288
- jest.spyOn(mdmSdk, 'getEntityType').mockReturnValue({ dataLabelPattern: '{Name}' });
1286
+ createTemporaryEntity.mockReturnValue(mockedNewEntity);
1287
+ getEntityType.mockReturnValue({ dataLabelPattern: '{Name}' });
1289
1288
  var connection = {
1290
1289
  relation: {
1291
1290
  relationUri: relationUri,
@@ -1302,8 +1301,8 @@ describe('RelationEditor', function () {
1302
1301
  var entitySelector = component.find(EntitySelector);
1303
1302
  expect(entitySelector.length).toBe(1);
1304
1303
  entitySelector.prop('onCreate')(entityTypeUri);
1305
- expect(mdmSdk.getEntityType).toHaveBeenCalledWith(metadata, entityTypeUri);
1306
- expect(mdmSdk.createTemporaryEntity).toHaveBeenCalledWith(expect.objectContaining({ entityTypeUri: entityTypeUri }));
1304
+ expect(getEntityType).toHaveBeenCalledWith(metadata, entityTypeUri);
1305
+ expect(createTemporaryEntity).toHaveBeenCalledWith(expect.objectContaining({ entityTypeUri: entityTypeUri }));
1307
1306
  expect(mdmActions.setInitialInfo).toHaveBeenCalledWith(config.id, relationUri, modifiedEntity);
1308
1307
  expect(mdmActions.entityDeleted).toHaveBeenCalledWith('entities/uri$$prev');
1309
1308
  expect(mdmActions.setRelationEntity).toHaveBeenCalledWith(config.id, connection.relation.relationUri, mockedNewEntity);
@@ -1365,15 +1364,15 @@ describe('RelationEditor', function () {
1365
1364
  var mockedNewEntity = { uri: 'entities/uri$$1' };
1366
1365
  var initValue = '123';
1367
1366
  var metadata = { relationTypes: [] };
1368
- jest.spyOn(mdmSdk, 'getEntityType').mockReturnValue(entityType);
1369
- jest.spyOn(mdmSdk, 'createTemporaryEntity').mockReturnValue(mockedNewEntity);
1367
+ getEntityType.mockReturnValue(entityType);
1368
+ createTemporaryEntity.mockReturnValue(mockedNewEntity);
1370
1369
  var props = __assign(__assign({}, defaultProps), { connection: connection, config: config, metadata: metadata });
1371
1370
  var component = setUp({ props: props });
1372
1371
  var entitySelector = component.find(EntitySelector);
1373
1372
  expect(entitySelector.length).toBe(1);
1374
1373
  entitySelector.prop('onCreate')(entityTypeUri, initValue);
1375
- expect(mdmSdk.getEntityType).toHaveBeenCalledWith(metadata, entityTypeUri);
1376
- expect(mdmSdk.createTemporaryEntity).toHaveBeenCalledWith({
1374
+ expect(getEntityType).toHaveBeenCalledWith(metadata, entityTypeUri);
1375
+ expect(createTemporaryEntity).toHaveBeenCalledWith({
1377
1376
  entityTypeUri: entityTypeUri,
1378
1377
  initValue: initValue,
1379
1378
  attributeTypes: [
@@ -46,7 +46,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  }
47
47
  };
48
48
  import React from 'react';
49
- import { render, screen } from '@testing-library/react';
49
+ import { act, render, screen } from '@testing-library/react';
50
50
  import userEvent from '@testing-library/user-event';
51
51
  import { findLast, last } from 'ramda';
52
52
  import { OverlayView, initialize, mockInstances, Marker, Map, Polygon } from '@googlemaps/jest-mocks';
@@ -235,7 +235,7 @@ describe('ReltioMap tests', function () {
235
235
  it('should not fit map bounds when markers changed and "Search when I move the map" mode is on', function () {
236
236
  var fitMapBoundsForMarkers = jest.spyOn(helpers, 'fitMapBoundsForMarkers');
237
237
  var fitMapBoundsForOverlay = jest.spyOn(helpers, 'fitMapBoundsForOverlay');
238
- var rerender = setUpRTL(__assign(__assign({}, defaultProps), { markers: [] })).rerender;
238
+ var rerender = setUpRTL(__assign(__assign({}, defaultProps), { isSearchOnMapMove: false, markers: [] })).rerender;
239
239
  var newProps = __assign(__assign({}, defaultProps), { isSearchOnMapMove: true, markers: [
240
240
  {
241
241
  point: { lat: 1, lng: 1 },
@@ -431,7 +431,7 @@ describe('ReltioMap tests', function () {
431
431
  return [4 /*yield*/, user.click(screen.getByLabelText('Draw area'))];
432
432
  case 1:
433
433
  _a.sent();
434
- expect(drawingManagerInstance.setDrawingMode).lastCalledWith(MAP_DRAWING_MODES.POLYGON);
434
+ expect(drawingManagerInstance.setDrawingMode).toHaveBeenLastCalledWith(MAP_DRAWING_MODES.POLYGON);
435
435
  overlay = {
436
436
  setMap: jest.fn(),
437
437
  getPath: function () { return ({
@@ -441,7 +441,9 @@ describe('ReltioMap tests', function () {
441
441
  ]; }
442
442
  }); }
443
443
  };
444
- getEventHandler(drawingManagerInstance, 'polygoncomplete')(overlay);
444
+ act(function () {
445
+ getEventHandler(drawingManagerInstance, 'polygoncomplete')(overlay);
446
+ });
445
447
  expect(onOverlayUpdated).toHaveBeenCalledWith({
446
448
  type: MAP_DRAWING_MODES.POLYGON,
447
449
  data: [
@@ -450,7 +452,7 @@ describe('ReltioMap tests', function () {
450
452
  ]
451
453
  });
452
454
  expect(overlay.setMap).toHaveBeenCalledWith(null);
453
- expect(drawingManagerInstance.setDrawingMode).lastCalledWith(null);
455
+ expect(drawingManagerInstance.setDrawingMode).toHaveBeenLastCalledWith(null);
454
456
  return [2 /*return*/];
455
457
  }
456
458
  });
@@ -472,11 +474,11 @@ describe('ReltioMap tests', function () {
472
474
  return [4 /*yield*/, user.click(screen.getByLabelText('Draw area'))];
473
475
  case 1:
474
476
  _a.sent();
475
- expect(drawingManagerInstance.setDrawingMode).lastCalledWith(MAP_DRAWING_MODES.POLYGON);
477
+ expect(drawingManagerInstance.setDrawingMode).toHaveBeenLastCalledWith(MAP_DRAWING_MODES.POLYGON);
476
478
  return [4 /*yield*/, user.click(screen.getByText('Search as I move the map'))];
477
479
  case 2:
478
480
  _a.sent();
479
- expect(drawingManagerInstance.setDrawingMode).lastCalledWith(null);
481
+ expect(drawingManagerInstance.setDrawingMode).toHaveBeenLastCalledWith(null);
480
482
  expect(onMapBoundsChanged).toHaveBeenCalledWith(mapBoundsPolygon);
481
483
  return [2 /*return*/];
482
484
  }
@@ -492,14 +494,14 @@ describe('ReltioMap tests', function () {
492
494
  return [4 /*yield*/, user.click(screen.getByLabelText('Draw area'))];
493
495
  case 1:
494
496
  _a.sent();
495
- expect(drawingManagerInstance.setDrawingMode).lastCalledWith(MAP_DRAWING_MODES.POLYGON);
497
+ expect(drawingManagerInstance.setDrawingMode).toHaveBeenLastCalledWith(MAP_DRAWING_MODES.POLYGON);
496
498
  return [4 /*yield*/, user.click(screen.getByText('Search as I move the map'))];
497
499
  case 2:
498
500
  _a.sent();
499
501
  return [4 /*yield*/, user.click(screen.getByText('Search as I move the map'))];
500
502
  case 3:
501
503
  _a.sent();
502
- expect(drawingManagerInstance.setDrawingMode).lastCalledWith(null);
504
+ expect(drawingManagerInstance.setDrawingMode).toHaveBeenLastCalledWith(null);
503
505
  expect(onMapBoundsChanged).toHaveBeenCalledWith(null);
504
506
  return [2 /*return*/];
505
507
  }
@@ -14,13 +14,12 @@ import { shallow, mount } from 'enzyme';
14
14
  import { Marker, InfoBox } from '@react-google-maps/api';
15
15
  import { ProfileCard } from '../../../ProfileCard';
16
16
  import { Popper } from '../../../Popper';
17
- import * as mdmSdk from '@reltio/mdm-sdk';
18
17
  import EntityMarker from './EntityMarker';
19
18
  import { MARKER } from './icons/marker.inline.svg';
20
19
  import { HOVERED_MARKER } from './icons/marker-hover.inline.svg';
21
20
  import { setupGoogleMock } from '../../googleMock.test-data';
22
21
  import { EntityMarkerContext } from '../../../contexts/EntityMarkerContext';
23
- import { svg2Url } from '@reltio/mdm-sdk';
22
+ import { svg2Url, debounce } from '@reltio/mdm-sdk';
24
23
  import { rerenderWrapper } from '../../../test-utils';
25
24
  jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { debounce: jest.fn() })); });
26
25
  jest.mock('@react-google-maps/api', function () { return (__assign(__assign({}, jest.requireActual('@react-google-maps/api')), { Marker: jest.fn().mockImplementation(function () { return React.createElement("div", null); }), InfoBox: jest.fn().mockImplementation(function () { return React.createElement("div", null); }) })); });
@@ -52,7 +51,7 @@ describe('EntityMarker tests', function () {
52
51
  expect(infoBox.prop('position')).toEqual(markerProp.point);
53
52
  });
54
53
  it('should show opened popper on marker mouse over and close it on mouse out', function () {
55
- var debounceSpy = jest.spyOn(mdmSdk, 'debounce').mockImplementation(function (cb) { return cb; });
54
+ debounce.mockImplementation(function (cb) { return cb; });
56
55
  var component = shallow(React.createElement(EntityMarker, { marker: markerProp }));
57
56
  expect(component.find(Popper).prop('open')).toBe(false);
58
57
  component.find(Marker).prop('onMouseOver')();
@@ -67,7 +66,7 @@ describe('EntityMarker tests', function () {
67
66
  expect(component.find(Marker).prop('icon')).toMatchObject({
68
67
  url: markerUrl
69
68
  });
70
- expect(debounceSpy).toHaveBeenCalled();
69
+ expect(debounce).toHaveBeenCalled();
71
70
  });
72
71
  it('should call "onClick" prop with marker on marker click', function () {
73
72
  var onClick = jest.fn();
@@ -22,7 +22,7 @@ describe('ScrollableTabs', function () {
22
22
  return range(0, count).map(function (index) { return (__assign({ label: "label".concat(index), value: "value".concat(index) }, (additionalLabel ? { additionalLabel: additionalLabel } : {}))); });
23
23
  };
24
24
  var defaultProps = {
25
- value: 'id1',
25
+ value: 'value0',
26
26
  tabs: generateTabs(3),
27
27
  onChange: jest.fn()
28
28
  };
@@ -82,7 +82,7 @@ describe('SearchInput tests', function () {
82
82
  return [4 /*yield*/, user.type(screen.getByRole('textbox'), searchValue)];
83
83
  case 1:
84
84
  _a.sent();
85
- expect(onSearch).toHaveBeenLastCalledWith(searchValue);
85
+ expect(onSearch).toHaveBeenCalledWith(searchValue);
86
86
  return [2 /*return*/];
87
87
  }
88
88
  });
@@ -96,7 +96,7 @@ describe('SearchInput tests', function () {
96
96
  return [4 /*yield*/, user.click(screen.getByRole('button'))];
97
97
  case 1:
98
98
  _a.sent();
99
- expect(onSearch).toBeCalledWith('');
99
+ expect(onSearch).toHaveBeenCalledWith('');
100
100
  return [2 /*return*/];
101
101
  }
102
102
  });
@@ -15,15 +15,12 @@ import Popover from '@mui/material/Popover';
15
15
  import { SelectionPopup } from './SelectionPopup';
16
16
  import { SearchInput } from '../SearchInput';
17
17
  describe('SelectionPopup tests', function () {
18
+ var defaultProps = {
19
+ anchorEl: document.createElement('div'),
20
+ open: true
21
+ };
18
22
  it('should render main components correctly', function () {
19
- var props = {
20
- children: React.createElement("div", { className: 'testChildren' }),
21
- title: 'Title',
22
- onSearch: jest.fn(),
23
- searchInputOnKeyDown: jest.fn(),
24
- open: true,
25
- onClose: jest.fn()
26
- };
23
+ var props = __assign(__assign({}, defaultProps), { children: React.createElement("div", { className: 'testChildren' }), title: 'Title', onSearch: jest.fn(), searchInputOnKeyDown: jest.fn(), onClose: jest.fn() });
27
24
  var component = shallow(React.createElement(SelectionPopup, __assign({}, props)));
28
25
  var popover = component.find(Popover);
29
26
  expect(popover.props()).toMatchObject({
@@ -38,21 +35,21 @@ describe('SelectionPopup tests', function () {
38
35
  expect(popover.find('.testChildren').length).toBe(1);
39
36
  });
40
37
  it('should hide title if props.hideTitle is true', function () {
41
- var component = shallow(React.createElement(SelectionPopup, { hideTitle: true }));
38
+ var component = shallow(React.createElement(SelectionPopup, __assign({}, defaultProps, { hideTitle: true })));
42
39
  expect(component.find('.header')).toHaveLength(0);
43
40
  });
44
41
  it('should hide search input if props.hideSearchInput is true', function () {
45
- var component = shallow(React.createElement(SelectionPopup, { hideSearchInput: true }));
42
+ var component = shallow(React.createElement(SelectionPopup, __assign({}, defaultProps, { hideSearchInput: true })));
46
43
  expect(component.find(SearchInput)).toHaveLength(0);
47
44
  });
48
45
  it('should render header at the top if props.headerPlacement is "top"', function () {
49
- var component = shallow(React.createElement(SelectionPopup, { headerPlacement: 'top' }));
46
+ var component = shallow(React.createElement(SelectionPopup, __assign({}, defaultProps, { headerPlacement: "top" })));
50
47
  var content = component.find('.container').children();
51
48
  expect(content.at(0).prop('className')).toBe('header');
52
49
  expect(content.at(1).prop('placeholder')).toBe('Search & add attributes');
53
50
  });
54
51
  it('should render header at the bottom if props.headerPlacement is "bottom"', function () {
55
- var component = shallow(React.createElement(SelectionPopup, { headerPlacement: 'bottom' }));
52
+ var component = shallow(React.createElement(SelectionPopup, __assign({}, defaultProps, { headerPlacement: "bottom" })));
56
53
  var content = component.find('.container').children();
57
54
  expect(content.at(content.length - 2).prop('className')).toBe('header');
58
55
  expect(content.at(content.length - 1).prop('placeholder')).toBe('Search & add attributes');
@@ -46,12 +46,12 @@ describe('SelectorWithOnlyOptionAutoSelect tests', function () {
46
46
  });
47
47
  it('should call props.onChange on value change', function () {
48
48
  var wrapper = shallow(React.createElement(SelectorWithOnlyOptionAutoSelect, __assign({}, props)));
49
- expect(props.onChange).not.toBeCalled();
49
+ expect(props.onChange).not.toHaveBeenCalled();
50
50
  var newValue = '2';
51
51
  wrapper.find('DropDownEditor').simulate('change', newValue);
52
- expect(props.onChange).toBeCalledWith(newValue);
52
+ expect(props.onChange).toHaveBeenCalledWith(newValue);
53
53
  wrapper.find('DropDownEditor').simulate('change', '');
54
- expect(props.onChange).toBeCalledWith(null);
54
+ expect(props.onChange).toHaveBeenCalledWith(null);
55
55
  });
56
56
  it('should render empty option if empty label specified', function () {
57
57
  var emptyLabel = 'EMPTY_LABEL';
@@ -79,7 +79,7 @@ describe('SelectorWithOnlyOptionAutoSelect tests', function () {
79
79
  });
80
80
  it('should autoselect value of the only option', function () {
81
81
  mount(React.createElement(SelectorWithOnlyOptionAutoSelect, __assign({}, props)));
82
- expect(props.onChange).toBeCalledWith('1');
82
+ expect(props.onChange).toHaveBeenCalledWith('1');
83
83
  });
84
84
  });
85
85
  });
@@ -50,7 +50,7 @@ describe('ShowLess tests', function () {
50
50
  return [4 /*yield*/, user.click(screen.getByText('Show less'))];
51
51
  case 1:
52
52
  _a.sent();
53
- expect(onClickSpy).toBeCalledTimes(1);
53
+ expect(onClickSpy).toHaveBeenCalledTimes(1);
54
54
  return [2 /*return*/];
55
55
  }
56
56
  });
@@ -67,7 +67,7 @@ describe('ShowMore tests', function () {
67
67
  return [4 /*yield*/, user.click(screen.getByText('Show 5 more of remaining 10 value'))];
68
68
  case 1:
69
69
  _a.sent();
70
- expect(onClickSpy).toBeCalledTimes(1);
70
+ expect(onClickSpy).toHaveBeenCalledTimes(1);
71
71
  return [2 /*return*/];
72
72
  }
73
73
  });
@@ -81,7 +81,7 @@ describe('ShowMore tests', function () {
81
81
  return [4 /*yield*/, user.click(screen.getByText('Show more'))];
82
82
  case 1:
83
83
  _a.sent();
84
- expect(onClickSpy).toBeCalledTimes(1);
84
+ expect(onClickSpy).toHaveBeenCalledTimes(1);
85
85
  return [2 /*return*/];
86
86
  }
87
87
  });
@@ -51,9 +51,9 @@ import userEvent from '@testing-library/user-event';
51
51
  import { SideButtonsPanel } from './SideButtonsPanel';
52
52
  describe('SideButtonsPanel tests', function () {
53
53
  var buttonsProps = [
54
- { icon: function () { return React.createElement("div", { "data-reltio-id": "icon0" }); }, tooltipTitle: 'button0', id: 0 },
55
- { icon: function () { return React.createElement("div", { "data-reltio-id": "icon1" }); }, tooltipTitle: 'button1', id: 1 },
56
- { icon: function () { return React.createElement("div", { "data-reltio-id": "icon2" }); }, tooltipTitle: 'button2', id: 2 }
54
+ { icon: function () { return React.createElement("div", { "data-reltio-id": "icon0" }); }, tooltipTitle: 'button0', id: 0, showForDisabled: true },
55
+ { icon: function () { return React.createElement("div", { "data-reltio-id": "icon1" }); }, tooltipTitle: 'button1', id: 1, showForDisabled: true },
56
+ { icon: function () { return React.createElement("div", { "data-reltio-id": "icon2" }); }, tooltipTitle: 'button2', id: 2, showForDisabled: true }
57
57
  ];
58
58
  var defaultProps = {
59
59
  buttonsProps: buttonsProps,
@@ -45,19 +45,18 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { dissoc } from 'ramda';
49
48
  import React from 'react';
50
- import { render, screen } from '@testing-library/react';
49
+ import { dissoc } from 'ramda';
50
+ import { act, render, screen } from '@testing-library/react';
51
51
  import userEvent from '@testing-library/user-event';
52
- import * as mdmSdk from '@reltio/mdm-sdk';
52
+ import { Mode, getUnmaskedAttributeValue } from '@reltio/mdm-sdk';
53
53
  import { MaskedAttributesProvider } from '../contexts/MaskedAttributesContext';
54
54
  import { MdmModuleProvider } from '../contexts/MdmModuleContext';
55
55
  import { SimpleAttribute } from './SimpleAttribute';
56
56
  jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getUnmaskedAttributeValue: jest.fn() })); });
57
57
  describe('masking/unmasking behaviour', function () {
58
- var getUnmaskedAttributeValueMock = jest.spyOn(mdmSdk, 'getUnmaskedAttributeValue');
59
58
  beforeAll(function () {
60
- getUnmaskedAttributeValueMock.mockResolvedValue({
59
+ getUnmaskedAttributeValue.mockResolvedValue({
61
60
  value: 'Unmasked value',
62
61
  uri: 'entities/16U21B8f/attributes/Name/2sAfjGOIh'
63
62
  });
@@ -69,7 +68,7 @@ describe('masking/unmasking behaviour', function () {
69
68
  var attributeType = isMaskingNeeded ? defaultAttributeType : dissoc('masking', defaultAttributeType);
70
69
  var Providers = function (_a) {
71
70
  var children = _a.children;
72
- return (React.createElement(MdmModuleProvider, { values: { mode: mdmSdk.Mode.Viewing } },
71
+ return (React.createElement(MdmModuleProvider, { values: { mode: Mode.Viewing } },
73
72
  React.createElement(MaskedAttributesProvider, null, children)));
74
73
  };
75
74
  var user = userEvent.setup();
@@ -95,7 +94,7 @@ describe('masking/unmasking behaviour', function () {
95
94
  return [4 /*yield*/, user.click(switcher)];
96
95
  case 1:
97
96
  _b.sent();
98
- expect(getUnmaskedAttributeValueMock).toHaveBeenCalledWith(defaultAttributeValue.uri);
97
+ expect(getUnmaskedAttributeValue).toHaveBeenCalledWith(defaultAttributeValue.uri);
99
98
  return [2 /*return*/];
100
99
  }
101
100
  });
@@ -143,17 +142,22 @@ describe('masking/unmasking behaviour', function () {
143
142
  return __generator(this, function (_b) {
144
143
  switch (_b.label) {
145
144
  case 0:
146
- getUnmaskedAttributeValueMock.mockImplementation(function () { return new Promise(function (resolve) { return (resolveGetUnmaskedAttributeValue = resolve); }); });
145
+ getUnmaskedAttributeValue.mockImplementation(function () { return new Promise(function (resolve) { return (resolveGetUnmaskedAttributeValue = resolve); }); });
147
146
  _a = setUp(), container = _a.container, user = _a.user;
148
147
  switcher = container.querySelector('.switcherWrapper');
149
148
  return [4 /*yield*/, user.click(switcher)];
150
149
  case 1:
151
150
  _b.sent();
152
151
  expect(screen.getByRole('progressbar')).toBeInTheDocument();
153
- return [4 /*yield*/, resolveGetUnmaskedAttributeValue({
154
- value: 'Unmasked value',
155
- uri: 'entities/16U21B8f/attributes/Name/2sAfjGOIh'
156
- })];
152
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
153
+ return __generator(this, function (_a) {
154
+ resolveGetUnmaskedAttributeValue({
155
+ value: 'Unmasked value',
156
+ uri: 'entities/16U21B8f/attributes/Name/2sAfjGOIh'
157
+ });
158
+ return [2 /*return*/];
159
+ });
160
+ }); })];
157
161
  case 2:
158
162
  _b.sent();
159
163
  return [4 /*yield*/, screen.findByText('Unmasked value')];
@@ -6,7 +6,7 @@ import { DropDownPlaceholder } from './components/DropDownPlaceholder';
6
6
  import { DropDownSelector } from '../DropDownSelector';
7
7
  describe('SimpleDropDownSelector tests', function () {
8
8
  it('should render SimpleDropDownSelector with "components" prop', function () {
9
- var component = shallow(React.createElement(SimpleDropDownSelector, null));
9
+ var component = shallow(React.createElement(SimpleDropDownSelector, { label: "test" }));
10
10
  expect(component.find(DropDownSelector).length).toBe(1);
11
11
  expect(component.find(DropDownSelector).prop('components')).toEqual({
12
12
  SingleValue: DropDownValue,
@@ -70,6 +70,6 @@ describe('TableWithBars', function () {
70
70
  var onItemClick = jest.fn();
71
71
  var wrapper = mount(React.createElement(TableWithBars, { width: 600, height: 300, data: data, onItemClick: onItemClick }));
72
72
  wrapper.find('.attribute').first().simulate('click');
73
- expect(onItemClick).toBeCalledWith('attr01');
73
+ expect(onItemClick).toHaveBeenCalledWith('attr01');
74
74
  });
75
75
  });
@@ -78,7 +78,7 @@ describe('TreeChart', function () {
78
78
  return [4 /*yield*/, user.click(screen.getByText('first'))];
79
79
  case 1:
80
80
  _a.sent();
81
- expect(onItemClickSpy).toBeCalledWith('group1');
81
+ expect(onItemClickSpy).toHaveBeenCalledWith('group1');
82
82
  return [2 /*return*/];
83
83
  }
84
84
  });
@@ -49,8 +49,11 @@ import React from 'react';
49
49
  import { render, screen, fireEvent, waitFor, within } from '@testing-library/react';
50
50
  import userEvent from '@testing-library/user-event';
51
51
  import { getMuiIconByName } from '../test-utils';
52
+ import { debounce } from '@reltio/mdm-sdk';
52
53
  import { TypeaheadEditor } from './TypeaheadEditor';
53
- jest.mock('@reltio/mdm-sdk', function () { return (__assign({}, jest.requireActual('@reltio/mdm-sdk'))); });
54
+ jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { debounce: jest.fn() })); });
55
+ var originalDebounce = jest.requireActual('@reltio/mdm-sdk').debounce;
56
+ var fakeDebounce = function (func) { return func; };
54
57
  var setUp = function (props) {
55
58
  var user = userEvent.setup();
56
59
  return __assign(__assign({}, render(React.createElement(TypeaheadEditor, __assign({}, props)))), { user: user });
@@ -83,6 +86,9 @@ describe('TypeaheadEditor', function () {
83
86
  multiple: false,
84
87
  onChange: jest.fn()
85
88
  };
89
+ beforeEach(function () {
90
+ debounce.mockImplementation(fakeDebounce);
91
+ });
86
92
  afterEach(function () {
87
93
  jest.clearAllMocks();
88
94
  });
@@ -191,6 +197,7 @@ describe('TypeaheadEditor', function () {
191
197
  return __generator(this, function (_a) {
192
198
  switch (_a.label) {
193
199
  case 0:
200
+ debounce.mockImplementation(originalDebounce);
194
201
  user = setUp(defaultSingleProps).user;
195
202
  input = screen.getByRole('textbox');
196
203
  return [4 /*yield*/, user.click(input)];