@itwin/reports-config-widget-react 0.4.0 → 0.6.0
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/CHANGELOG.json +61 -0
- package/CHANGELOG.md +23 -2
- package/LICENSE.md +9 -9
- package/README.md +38 -38
- package/__mocks__/fileMock.js +4 -4
- package/api/reports-config-widget-react.api.md +130 -0
- package/api/reports-config-widget-react.exports.csv +14 -0
- package/api/temp/reports-config-widget-react.api.md +130 -0
- package/coverage/clover.xml +524 -514
- package/coverage/coverage-final.json +32 -32
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +26 -26
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/src/ReportsConfigWidget.ts.html +15 -15
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/test/index.html +15 -15
- package/coverage/lcov-report/src/test/test-utils.tsx.html +233 -20
- package/coverage/lcov-report/src/widget/ReportsConfigUiProvider.tsx.html +22 -64
- package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +5 -38
- package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +23 -119
- package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +117 -90
- package/coverage/lcov-report/src/widget/components/Constants.ts.html +16 -10
- package/coverage/lcov-report/src/widget/components/DeleteModal.tsx.html +16 -106
- package/coverage/lcov-report/src/widget/components/ExtractionStates/FailedExtractionState.tsx.html +6 -21
- package/coverage/lcov-report/src/widget/components/ExtractionStates/QueuedExtractionState.tsx.html +6 -21
- package/coverage/lcov-report/src/widget/components/ExtractionStates/RunningExtractionState.tsx.html +7 -22
- package/coverage/lcov-report/src/widget/components/ExtractionStates/StartingExtractionState.tsx.html +7 -28
- package/coverage/lcov-report/src/widget/components/ExtractionStates/SucceededExtractionState.tsx.html +6 -21
- package/coverage/lcov-report/src/widget/components/ExtractionStates/index.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStatus.tsx.html +20 -47
- package/coverage/lcov-report/src/widget/components/ExtractionToast.tsx.html +20 -11
- package/coverage/lcov-report/src/widget/components/HorizontalTile.tsx.html +16 -79
- package/coverage/lcov-report/src/widget/components/LocalizedTablePaginator.tsx.html +15 -108
- package/coverage/lcov-report/src/widget/components/ReportAction.tsx.html +36 -75
- package/coverage/lcov-report/src/widget/components/ReportHorizontalTile.tsx.html +62 -92
- package/coverage/lcov-report/src/widget/components/ReportMappingHorizontalTile.tsx.html +104 -128
- package/coverage/lcov-report/src/widget/components/ReportMappings.tsx.html +86 -299
- package/coverage/lcov-report/src/widget/components/Reports.tsx.html +64 -226
- package/coverage/lcov-report/src/widget/components/ReportsConfigContext.tsx.html +63 -45
- package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +10 -49
- package/coverage/lcov-report/src/widget/components/ReportsHeader.tsx.html +8 -47
- package/coverage/lcov-report/src/widget/components/ReportsRouter.tsx.html +6 -12
- package/coverage/lcov-report/src/widget/components/SearchBar.tsx.html +15 -27
- package/coverage/lcov-report/src/widget/components/SelectIModel.tsx.html +12 -57
- package/coverage/lcov-report/src/widget/components/index.html +56 -56
- package/coverage/lcov-report/src/widget/components/utils.tsx.html +32 -176
- package/coverage/lcov-report/src/widget/context/BulkExtractorContext.tsx.html +9 -15
- package/coverage/lcov-report/src/widget/context/ReportsConfigApiContext.tsx.html +9 -15
- package/coverage/lcov-report/src/widget/context/index.html +1 -1
- package/coverage/lcov-report/src/widget/hooks/index.html +1 -1
- package/coverage/lcov-report/src/widget/hooks/useValidator.ts.html +12 -54
- package/coverage/lcov-report/src/widget/index.html +1 -1
- package/coverage/lcov.info +959 -922
- package/jest.config.js +14 -17
- package/lib/cjs/ReportsConfigWidget.d.ts +4 -0
- package/lib/cjs/ReportsConfigWidget.d.ts.map +1 -1
- package/lib/cjs/ReportsConfigWidget.js +4 -0
- package/lib/cjs/ReportsConfigWidget.js.map +1 -1
- package/lib/cjs/reports-config-widget-react.js +8 -4
- package/lib/cjs/reports-config-widget-react.js.map +1 -1
- package/lib/cjs/test/AddMappingModal.test.js +24 -72
- package/lib/cjs/test/AddMappingModal.test.js.map +1 -1
- package/lib/cjs/test/BulkExtractor.test.js +73 -44
- package/lib/cjs/test/BulkExtractor.test.js.map +1 -1
- package/lib/cjs/test/DeleteModal.test.js +3 -3
- package/lib/cjs/test/DeleteModal.test.js.map +1 -1
- package/lib/cjs/test/ReportAction.test.js +6 -4
- package/lib/cjs/test/ReportAction.test.js.map +1 -1
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js +76 -86
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/cjs/test/ReportMappings.test.js +53 -80
- package/lib/cjs/test/ReportMappings.test.js.map +1 -1
- package/lib/cjs/test/Reports.test.js +54 -50
- package/lib/cjs/test/Reports.test.js.map +1 -1
- package/lib/cjs/test/WidgetHeader.test.js +3 -3
- package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
- package/lib/cjs/test/test-utils.d.ts +38 -0
- package/lib/cjs/test/test-utils.d.ts.map +1 -1
- package/lib/cjs/test/test-utils.js +79 -5
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/widget/ReportsConfigUiProvider.d.ts +7 -0
- package/lib/cjs/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/cjs/widget/ReportsConfigUiProvider.js +13 -4
- package/lib/cjs/widget/ReportsConfigUiProvider.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.js +5 -1
- package/lib/cjs/widget/components/ActionPanel.js.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.d.ts +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.js +12 -8
- package/lib/cjs/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.scss +1 -1
- package/lib/cjs/widget/components/BulkExtractor.d.ts +7 -4
- package/lib/cjs/widget/components/BulkExtractor.d.ts.map +1 -1
- package/lib/cjs/widget/components/BulkExtractor.js +52 -35
- package/lib/cjs/widget/components/BulkExtractor.js.map +1 -1
- package/lib/cjs/widget/components/Constants.d.ts +1 -0
- package/lib/cjs/widget/components/Constants.d.ts.map +1 -1
- package/lib/cjs/widget/components/Constants.js +5 -4
- package/lib/cjs/widget/components/Constants.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.d.ts +1 -1
- package/lib/cjs/widget/components/DeleteModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.js +10 -6
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.scss +2 -2
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.d.ts +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.js +14 -10
- package/lib/cjs/widget/components/ExtractionStatus.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.scss +1 -1
- package/lib/cjs/widget/components/ExtractionToast.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionToast.js +3 -3
- package/lib/cjs/widget/components/ExtractionToast.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.js +1 -2
- package/lib/cjs/widget/components/HorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +1 -4
- package/lib/cjs/widget/components/LocalizedTablePaginator.d.ts.map +1 -1
- package/lib/cjs/widget/components/LocalizedTablePaginator.js +6 -2
- package/lib/cjs/widget/components/LocalizedTablePaginator.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.d.ts +8 -0
- package/lib/cjs/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportAction.js +14 -8
- package/lib/cjs/widget/components/ReportAction.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.scss +1 -1
- package/lib/cjs/widget/components/ReportHorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportHorizontalTile.js +9 -5
- package/lib/cjs/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js +51 -46
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.d.ts +8 -0
- package/lib/cjs/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.js +30 -12
- package/lib/cjs/widget/components/ReportMappings.js.map +1 -1
- package/lib/cjs/widget/components/Reports.d.ts +9 -1
- package/lib/cjs/widget/components/Reports.d.ts.map +1 -1
- package/lib/cjs/widget/components/Reports.js +12 -9
- package/lib/cjs/widget/components/Reports.js.map +1 -1
- package/lib/cjs/widget/components/Reports.scss +0 -1
- package/lib/cjs/widget/components/ReportsConfigContext.d.ts +8 -0
- package/lib/cjs/widget/components/ReportsConfigContext.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsConfigContext.js +20 -7
- package/lib/cjs/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.d.ts +1 -1
- package/lib/cjs/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.js +7 -5
- package/lib/cjs/widget/components/ReportsContainer.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.scss +1 -1
- package/lib/cjs/widget/components/ReportsHeader.d.ts +1 -1
- package/lib/cjs/widget/components/ReportsHeader.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsHeader.js +6 -7
- package/lib/cjs/widget/components/ReportsHeader.js.map +1 -1
- package/lib/cjs/widget/components/ReportsRouter.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsRouter.js +3 -3
- package/lib/cjs/widget/components/ReportsRouter.js.map +1 -1
- package/lib/cjs/widget/components/SearchBar.d.ts +1 -1
- package/lib/cjs/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/cjs/widget/components/SearchBar.js +9 -5
- package/lib/cjs/widget/components/SearchBar.js.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.d.ts +1 -1
- package/lib/cjs/widget/components/SelectIModel.d.ts.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.js +7 -3
- package/lib/cjs/widget/components/SelectIModel.js.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.scss +1 -1
- package/lib/cjs/widget/components/utils.d.ts +1 -1
- package/lib/cjs/widget/components/utils.d.ts.map +1 -1
- package/lib/cjs/widget/components/utils.js +5 -5
- package/lib/cjs/widget/components/utils.js.map +1 -1
- package/lib/cjs/widget/components/utils.scss +1 -1
- package/lib/cjs/widget/context/BulkExtractorContext.d.ts.map +1 -1
- package/lib/cjs/widget/context/BulkExtractorContext.js +5 -1
- package/lib/cjs/widget/context/BulkExtractorContext.js.map +1 -1
- package/lib/cjs/widget/context/ReportsConfigApiContext.d.ts.map +1 -1
- package/lib/cjs/widget/context/ReportsConfigApiContext.js +5 -1
- package/lib/cjs/widget/context/ReportsConfigApiContext.js.map +1 -1
- package/lib/cjs/widget/hooks/useValidator.d.ts +1 -4
- package/lib/cjs/widget/hooks/useValidator.d.ts.map +1 -1
- package/lib/cjs/widget/hooks/useValidator.js +3 -3
- package/lib/cjs/widget/hooks/useValidator.js.map +1 -1
- package/lib/esm/ReportsConfigWidget.d.ts +4 -0
- package/lib/esm/ReportsConfigWidget.d.ts.map +1 -1
- package/lib/esm/ReportsConfigWidget.js +4 -0
- package/lib/esm/ReportsConfigWidget.js.map +1 -1
- package/lib/esm/reports-config-widget-react.js +3 -3
- package/lib/esm/reports-config-widget-react.js.map +1 -1
- package/lib/esm/test/AddMappingModal.test.js +12 -64
- package/lib/esm/test/AddMappingModal.test.js.map +1 -1
- package/lib/esm/test/BulkExtractor.test.js +69 -44
- package/lib/esm/test/BulkExtractor.test.js.map +1 -1
- package/lib/esm/test/DeleteModal.test.js +4 -4
- package/lib/esm/test/DeleteModal.test.js.map +1 -1
- package/lib/esm/test/ReportAction.test.js +7 -5
- package/lib/esm/test/ReportAction.test.js.map +1 -1
- package/lib/esm/test/ReportMappingHorizontalTile.test.js +66 -80
- package/lib/esm/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/esm/test/ReportMappings.test.js +42 -73
- package/lib/esm/test/ReportMappings.test.js.map +1 -1
- package/lib/esm/test/Reports.test.js +32 -51
- package/lib/esm/test/Reports.test.js.map +1 -1
- package/lib/esm/test/WidgetHeader.test.js +3 -3
- package/lib/esm/test/WidgetHeader.test.js.map +1 -1
- package/lib/esm/test/test-utils.d.ts +38 -0
- package/lib/esm/test/test-utils.d.ts.map +1 -1
- package/lib/esm/test/test-utils.js +73 -3
- package/lib/esm/test/test-utils.js.map +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/widget/ReportsConfigUiProvider.d.ts +7 -0
- package/lib/esm/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/esm/widget/ReportsConfigUiProvider.js +9 -4
- package/lib/esm/widget/ReportsConfigUiProvider.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/esm/widget/components/ActionPanel.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.d.ts +1 -1
- package/lib/esm/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.js +7 -7
- package/lib/esm/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.scss +1 -1
- package/lib/esm/widget/components/BulkExtractor.d.ts +7 -4
- package/lib/esm/widget/components/BulkExtractor.d.ts.map +1 -1
- package/lib/esm/widget/components/BulkExtractor.js +53 -36
- package/lib/esm/widget/components/BulkExtractor.js.map +1 -1
- package/lib/esm/widget/components/Constants.d.ts +1 -0
- package/lib/esm/widget/components/Constants.d.ts.map +1 -1
- package/lib/esm/widget/components/Constants.js +4 -3
- package/lib/esm/widget/components/Constants.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.d.ts +1 -1
- package/lib/esm/widget/components/DeleteModal.d.ts.map +1 -1
- package/lib/esm/widget/components/DeleteModal.js +6 -6
- package/lib/esm/widget/components/DeleteModal.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.scss +2 -2
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStatus.d.ts +1 -1
- package/lib/esm/widget/components/ExtractionStatus.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStatus.js +9 -9
- package/lib/esm/widget/components/ExtractionStatus.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStatus.scss +1 -1
- package/lib/esm/widget/components/ExtractionToast.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionToast.js +3 -3
- package/lib/esm/widget/components/ExtractionToast.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.js +1 -2
- package/lib/esm/widget/components/HorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.scss +1 -4
- package/lib/esm/widget/components/LocalizedTablePaginator.d.ts.map +1 -1
- package/lib/esm/widget/components/LocalizedTablePaginator.js +1 -1
- package/lib/esm/widget/components/LocalizedTablePaginator.js.map +1 -1
- package/lib/esm/widget/components/ReportAction.d.ts +8 -0
- package/lib/esm/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportAction.js +10 -8
- package/lib/esm/widget/components/ReportAction.js.map +1 -1
- package/lib/esm/widget/components/ReportAction.scss +1 -1
- package/lib/esm/widget/components/ReportHorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportHorizontalTile.js +6 -6
- package/lib/esm/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js +47 -46
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.d.ts +8 -0
- package/lib/esm/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappings.js +28 -14
- package/lib/esm/widget/components/ReportMappings.js.map +1 -1
- package/lib/esm/widget/components/Reports.d.ts +9 -1
- package/lib/esm/widget/components/Reports.d.ts.map +1 -1
- package/lib/esm/widget/components/Reports.js +8 -9
- package/lib/esm/widget/components/Reports.js.map +1 -1
- package/lib/esm/widget/components/Reports.scss +0 -1
- package/lib/esm/widget/components/ReportsConfigContext.d.ts +8 -0
- package/lib/esm/widget/components/ReportsConfigContext.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsConfigContext.js +17 -8
- package/lib/esm/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.d.ts +1 -1
- package/lib/esm/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.js +2 -4
- package/lib/esm/widget/components/ReportsContainer.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.scss +1 -1
- package/lib/esm/widget/components/ReportsHeader.d.ts +1 -1
- package/lib/esm/widget/components/ReportsHeader.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsHeader.js +6 -7
- package/lib/esm/widget/components/ReportsHeader.js.map +1 -1
- package/lib/esm/widget/components/ReportsRouter.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsRouter.js +3 -3
- package/lib/esm/widget/components/ReportsRouter.js.map +1 -1
- package/lib/esm/widget/components/SearchBar.d.ts +1 -1
- package/lib/esm/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/esm/widget/components/SearchBar.js +4 -4
- package/lib/esm/widget/components/SearchBar.js.map +1 -1
- package/lib/esm/widget/components/SelectIModel.d.ts +1 -1
- package/lib/esm/widget/components/SelectIModel.d.ts.map +1 -1
- package/lib/esm/widget/components/SelectIModel.js +3 -3
- package/lib/esm/widget/components/SelectIModel.js.map +1 -1
- package/lib/esm/widget/components/SelectIModel.scss +1 -1
- package/lib/esm/widget/components/utils.d.ts +1 -1
- package/lib/esm/widget/components/utils.d.ts.map +1 -1
- package/lib/esm/widget/components/utils.js +6 -6
- package/lib/esm/widget/components/utils.js.map +1 -1
- package/lib/esm/widget/components/utils.scss +1 -1
- package/lib/esm/widget/context/BulkExtractorContext.d.ts.map +1 -1
- package/lib/esm/widget/context/BulkExtractorContext.js.map +1 -1
- package/lib/esm/widget/context/ReportsConfigApiContext.d.ts.map +1 -1
- package/lib/esm/widget/context/ReportsConfigApiContext.js.map +1 -1
- package/lib/esm/widget/hooks/useValidator.d.ts +1 -4
- package/lib/esm/widget/hooks/useValidator.d.ts.map +1 -1
- package/lib/esm/widget/hooks/useValidator.js +3 -3
- package/lib/esm/widget/hooks/useValidator.js.map +1 -1
- package/package.json +37 -31
- package/src/ReportsConfigWidget.ts +9 -9
- package/src/reports-config-widget-react.ts +3 -3
- package/src/test/AddMappingModal.test.tsx +47 -122
- package/src/test/BulkExtractor.test.ts +73 -118
- package/src/test/DeleteModal.test.tsx +6 -23
- package/src/test/ReportAction.test.tsx +20 -38
- package/src/test/ReportMappingHorizontalTile.test.tsx +140 -161
- package/src/test/ReportMappings.test.tsx +80 -146
- package/src/test/Reports.test.tsx +57 -169
- package/src/test/WidgetHeader.test.tsx +3 -3
- package/src/test/test-utils.tsx +80 -9
- package/src/widget/ReportsConfigUiProvider.tsx +16 -30
- package/src/widget/components/ActionPanel.tsx +3 -14
- package/src/widget/components/AddMappingsModal.scss +1 -1
- package/src/widget/components/AddMappingsModal.tsx +19 -51
- package/src/widget/components/BulkExtractor.ts +63 -54
- package/src/widget/components/Constants.ts +5 -3
- package/src/widget/components/DeleteModal.scss +2 -2
- package/src/widget/components/DeleteModal.tsx +11 -41
- package/src/widget/components/ExtractionStates/FailedExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStates/QueuedExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStates/RunningExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStates/StartingExtractionState.tsx +4 -11
- package/src/widget/components/ExtractionStates/SucceededExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStatus.scss +1 -1
- package/src/widget/components/ExtractionStatus.tsx +9 -18
- package/src/widget/components/ExtractionToast.tsx +12 -9
- package/src/widget/components/HorizontalTile.scss +1 -4
- package/src/widget/components/HorizontalTile.tsx +12 -33
- package/src/widget/components/LocalizedTablePaginator.tsx +13 -44
- package/src/widget/components/ReportAction.scss +1 -1
- package/src/widget/components/ReportAction.tsx +26 -39
- package/src/widget/components/ReportHorizontalTile.tsx +45 -55
- package/src/widget/components/ReportMappingHorizontalTile.tsx +70 -78
- package/src/widget/components/ReportMappings.tsx +59 -130
- package/src/widget/components/Reports.scss +0 -1
- package/src/widget/components/Reports.tsx +28 -82
- package/src/widget/components/ReportsConfigContext.tsx +32 -26
- package/src/widget/components/ReportsContainer.scss +1 -1
- package/src/widget/components/ReportsContainer.tsx +8 -21
- package/src/widget/components/ReportsHeader.tsx +6 -19
- package/src/widget/components/ReportsRouter.tsx +4 -6
- package/src/widget/components/SearchBar.tsx +9 -13
- package/src/widget/components/SelectIModel.scss +1 -1
- package/src/widget/components/SelectIModel.tsx +10 -25
- package/src/widget/components/utils.scss +1 -1
- package/src/widget/components/utils.tsx +21 -69
- package/src/widget/context/BulkExtractorContext.tsx +4 -6
- package/src/widget/context/ReportsConfigApiContext.tsx +4 -6
- package/src/widget/hooks/useValidator.ts +10 -24
- package/tsconfig.json +11 -11
- package/.rush/temp/operation/rebuild/all.log +0 -9
- package/.rush/temp/operation/rebuild/state.json +0 -3
- package/.rush/temp/package-deps_rebuild.json +0 -68
- package/.rush/temp/shrinkwrap-deps.json +0 -898
- package/reports-config-widget-react.build.error.log +0 -14
- package/reports-config-widget-react.build.log +0 -63
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import "@testing-library/jest-dom";
|
|
7
7
|
import { ReportsConfigWidget } from "../ReportsConfigWidget";
|
|
8
8
|
import {
|
|
9
9
|
act,
|
|
10
|
-
|
|
10
|
+
mockExtractionRequestDetails,
|
|
11
|
+
mockIModelId1,
|
|
12
|
+
mockIModelId2,
|
|
13
|
+
mockIModelsResponse,
|
|
14
|
+
mockReportId,
|
|
11
15
|
render,
|
|
12
16
|
screen,
|
|
13
17
|
waitFor,
|
|
@@ -15,79 +19,16 @@ import {
|
|
|
15
19
|
within,
|
|
16
20
|
} from "./test-utils";
|
|
17
21
|
import * as moq from "typemoq";
|
|
18
|
-
import type {
|
|
19
|
-
|
|
20
|
-
MappingSingle,
|
|
21
|
-
Report,
|
|
22
|
-
ReportMappingCollection,
|
|
23
|
-
} from "@itwin/insights-client";
|
|
24
|
-
import {
|
|
25
|
-
ExtractionClient,
|
|
26
|
-
ReportsClient,
|
|
27
|
-
} from "@itwin/insights-client";
|
|
22
|
+
import type { MappingContainer, MappingsClient, Report, ReportMappingCollection } from "@itwin/insights-client";
|
|
23
|
+
import { ExtractionClient, ReportsClient } from "@itwin/insights-client";
|
|
28
24
|
import { ReportMappings } from "../widget/components/ReportMappings";
|
|
29
|
-
import type { GetSingleIModelParams,
|
|
30
|
-
import { IModelState } from "@itwin/imodels-client-management";
|
|
25
|
+
import type { GetSingleIModelParams, IModelsClient } from "@itwin/imodels-client-management";
|
|
31
26
|
import { BulkExtractor } from "../widget/components/BulkExtractor";
|
|
32
27
|
import type { ReportMappingHorizontalTileProps } from "../widget/components/ReportMappingHorizontalTile";
|
|
33
28
|
import { Text } from "@itwin/itwinui-react";
|
|
34
29
|
import { EmptyLocalization } from "@itwin/core-common";
|
|
35
30
|
import type { AddMappingsModalProps } from "../widget/components/AddMappingsModal";
|
|
36
|
-
|
|
37
|
-
// Lets work with two iModels for now.
|
|
38
|
-
const mockIModelId1 = "mockIModelId1";
|
|
39
|
-
const mockIModelId2 = "mockIModelId2";
|
|
40
|
-
|
|
41
|
-
const mockReportId = "mockReportId";
|
|
42
|
-
|
|
43
|
-
const mockIModelsResponse = [
|
|
44
|
-
{
|
|
45
|
-
iModel: {
|
|
46
|
-
id: mockIModelId1,
|
|
47
|
-
displayName: "rAnDoMdIsPlAynAmE1",
|
|
48
|
-
name: "rAnDomName1",
|
|
49
|
-
description: "rAnDoMDeScRiPtIoN1",
|
|
50
|
-
createdDateTime: "2021-10-04T22:13:50.397Z",
|
|
51
|
-
state: IModelState.Initialized,
|
|
52
|
-
projectId: mockITwinId,
|
|
53
|
-
extent: null,
|
|
54
|
-
_links: {
|
|
55
|
-
creator: {
|
|
56
|
-
href: "",
|
|
57
|
-
},
|
|
58
|
-
namedVersions: {
|
|
59
|
-
href: "",
|
|
60
|
-
},
|
|
61
|
-
changesets: {
|
|
62
|
-
href: "",
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
iModel: {
|
|
69
|
-
id: mockIModelId2,
|
|
70
|
-
displayName: "rAnDoMdIsPlAynAmE2",
|
|
71
|
-
name: "rAnDomName2",
|
|
72
|
-
description: "rAnDoMDeScRiPtIoN2",
|
|
73
|
-
createdDateTime: "2021-10-04T22:13:50.397Z",
|
|
74
|
-
state: IModelState.Initialized,
|
|
75
|
-
projectId: mockITwinId,
|
|
76
|
-
extent: null,
|
|
77
|
-
_links: {
|
|
78
|
-
creator: {
|
|
79
|
-
href: "",
|
|
80
|
-
},
|
|
81
|
-
namedVersions: {
|
|
82
|
-
href: "",
|
|
83
|
-
},
|
|
84
|
-
changesets: {
|
|
85
|
-
href: "",
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
];
|
|
31
|
+
import type { IModelOperations, OperationOptions } from "@itwin/imodels-client-management/lib/operations";
|
|
91
32
|
|
|
92
33
|
const mockProjectIModels = {
|
|
93
34
|
iModels: mockIModelsResponse.map((iModel) => ({
|
|
@@ -160,43 +101,42 @@ const mockReportMappingsFactory = (): ReportMappingCollection => {
|
|
|
160
101
|
};
|
|
161
102
|
};
|
|
162
103
|
|
|
163
|
-
const mockMappingsFactory = (
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
imodel: {
|
|
179
|
-
// Tie the mapping to to the iModel Id
|
|
180
|
-
href: mapping.imodelId,
|
|
181
|
-
},
|
|
104
|
+
const mockMappingsFactory = (mockReportMappings: ReportMappingCollection): MappingContainer[] => {
|
|
105
|
+
const mockMappings: MappingContainer[] = mockReportMappings.mappings.map((mapping, index) => ({
|
|
106
|
+
mapping: {
|
|
107
|
+
id: mapping.mappingId,
|
|
108
|
+
mappingName: `mOcKMaPpIngNaMe${index}`,
|
|
109
|
+
description: `mOcKmApPInGDeScRiPtIoN${index}`,
|
|
110
|
+
extractionEnabled: false,
|
|
111
|
+
createdOn: "",
|
|
112
|
+
createdBy: "",
|
|
113
|
+
modifiedOn: "",
|
|
114
|
+
modifiedBy: "",
|
|
115
|
+
_links: {
|
|
116
|
+
iModel: {
|
|
117
|
+
// Tie the mapping to to the iModel Id
|
|
118
|
+
href: mapping.imodelId,
|
|
182
119
|
},
|
|
183
120
|
},
|
|
184
|
-
}
|
|
185
|
-
);
|
|
121
|
+
},
|
|
122
|
+
}));
|
|
186
123
|
|
|
187
124
|
return mockMappings;
|
|
188
125
|
};
|
|
189
126
|
|
|
190
127
|
jest.mock("../widget/components/Constants.ts", () => ({
|
|
128
|
+
...jest.requireActual("../widget/components/Constants.ts"),
|
|
191
129
|
STATUS_CHECK_INTERVAL: 10,
|
|
192
130
|
}));
|
|
193
131
|
|
|
194
132
|
jest.mock("../widget/components/ReportMappingHorizontalTile", () => ({
|
|
195
133
|
ReportMappingHorizontalTile: (props: ReportMappingHorizontalTileProps) => {
|
|
196
|
-
return (
|
|
197
|
-
<
|
|
198
|
-
|
|
199
|
-
|
|
134
|
+
return (
|
|
135
|
+
<div data-testid="horizontal-tile">
|
|
136
|
+
<Text>{props.mapping.mappingName}</Text>
|
|
137
|
+
<Text title={props.mapping.mappingDescription}>{props.mapping.iModelName}</Text>
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
200
140
|
},
|
|
201
141
|
}));
|
|
202
142
|
|
|
@@ -229,15 +169,16 @@ const mockMappingsClient = moq.Mock.ofType<MappingsClient>();
|
|
|
229
169
|
beforeAll(async () => {
|
|
230
170
|
const localization = new EmptyLocalization();
|
|
231
171
|
await ReportsConfigWidget.initialize(localization);
|
|
232
|
-
mockIModelsClientOperations
|
|
172
|
+
mockIModelsClientOperations
|
|
173
|
+
.setup(async (x) => x.getSingle(moq.It.isObjectWith<GetSingleIModelParams>({ iModelId: mockIModelId1 })))
|
|
233
174
|
.returns(async () => mockIModelsResponse[0].iModel);
|
|
234
|
-
mockIModelsClientOperations
|
|
175
|
+
mockIModelsClientOperations
|
|
176
|
+
.setup(async (x) => x.getSingle(moq.It.isObjectWith<GetSingleIModelParams>({ iModelId: mockIModelId2 })))
|
|
235
177
|
.returns(async () => mockIModelsResponse[1].iModel);
|
|
236
|
-
mockIModelsClient.setup((x) => x.iModels)
|
|
237
|
-
.returns(() => mockIModelsClientOperations.object);
|
|
178
|
+
mockIModelsClient.setup((x) => x.iModels).returns(() => mockIModelsClientOperations.object);
|
|
238
179
|
mockReportsClient.setup(async (x) => x.getReportMappings(moq.It.isAny(), moq.It.isAny())).returns(mockGetReportMappings);
|
|
239
180
|
mockMappingsClient.setup(async (x) => x.getMappings(moq.It.isAny(), moq.It.isAny())).returns(mockGetMappings);
|
|
240
|
-
mockMappingsClient.setup(async (x) => x.getMapping(moq.It.isAny(), moq.It.isAny()
|
|
181
|
+
mockMappingsClient.setup(async (x) => x.getMapping(moq.It.isAny(), moq.It.isAny())).returns(mockGetMapping);
|
|
241
182
|
});
|
|
242
183
|
|
|
243
184
|
afterEach(() => {
|
|
@@ -254,7 +195,11 @@ describe("Report Mappings View", () => {
|
|
|
254
195
|
mockGetMapping.mockReturnValueOnce(mockMappings[0].mapping).mockReturnValueOnce(mockMappings[1].mapping);
|
|
255
196
|
mockGetReportMappings.mockReturnValueOnce(mockReportMappings.mappings);
|
|
256
197
|
|
|
257
|
-
render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
198
|
+
render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
199
|
+
reportsClient: mockReportsClient.object,
|
|
200
|
+
mappingsClient: mockMappingsClient.object,
|
|
201
|
+
iModelsClient: mockIModelsClient.object,
|
|
202
|
+
});
|
|
258
203
|
|
|
259
204
|
await waitForElementToBeRemoved(() => screen.getByText(/loading/i));
|
|
260
205
|
|
|
@@ -269,7 +214,11 @@ describe("Report Mappings View", () => {
|
|
|
269
214
|
mockGetMapping.mockReturnValueOnce(mockMappings[0].mapping).mockReturnValueOnce(mockMappings[1].mapping);
|
|
270
215
|
mockGetReportMappings.mockReturnValueOnce(mockReportMappings.mappings);
|
|
271
216
|
|
|
272
|
-
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
217
|
+
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
218
|
+
reportsClient: mockReportsClient.object,
|
|
219
|
+
mappingsClient: mockMappingsClient.object,
|
|
220
|
+
iModelsClient: mockIModelsClient.object,
|
|
221
|
+
});
|
|
273
222
|
|
|
274
223
|
await waitForElementToBeRemoved(() => screen.getByText(/loading/i));
|
|
275
224
|
|
|
@@ -283,29 +232,20 @@ describe("Report Mappings View", () => {
|
|
|
283
232
|
// Be an exact match on display name.
|
|
284
233
|
await user.type(searchInput, mockMappings[0].mapping.mappingName);
|
|
285
234
|
expect(screen.getAllByTestId("horizontal-tile")).toHaveLength(1);
|
|
286
|
-
expect(
|
|
287
|
-
screen.getByText(mockMappings[0].mapping.mappingName)
|
|
288
|
-
).toBeInTheDocument();
|
|
235
|
+
expect(screen.getByText(mockMappings[0].mapping.mappingName)).toBeInTheDocument();
|
|
289
236
|
|
|
290
237
|
// Be an exact match on description.
|
|
291
238
|
await user.clear(searchInput);
|
|
292
239
|
await user.type(searchInput, mockMappings[0].mapping.description ?? "");
|
|
293
240
|
expect(screen.getAllByTestId("horizontal-tile")).toHaveLength(1);
|
|
294
|
-
expect(
|
|
295
|
-
screen.getByTitle(mockMappings[0].mapping.description ?? "")
|
|
296
|
-
).toBeInTheDocument();
|
|
241
|
+
expect(screen.getByTitle(mockMappings[0].mapping.description ?? "")).toBeInTheDocument();
|
|
297
242
|
|
|
298
243
|
// Be an exact match on iModel Name.
|
|
299
|
-
const iModel = mockIModelsResponse.find(
|
|
300
|
-
(mockIModel) =>
|
|
301
|
-
mockIModel.iModel.id === mockMappings[0].mapping._links.imodel.href
|
|
302
|
-
);
|
|
244
|
+
const iModel = mockIModelsResponse.find((mockIModel) => mockIModel.iModel.id === mockMappings[0].mapping._links.iModel.href);
|
|
303
245
|
await user.clear(searchInput);
|
|
304
246
|
await user.type(searchInput, iModel?.iModel.displayName ?? "");
|
|
305
247
|
expect(screen.getAllByTestId("horizontal-tile")).toHaveLength(1);
|
|
306
|
-
expect(
|
|
307
|
-
screen.getByText(iModel?.iModel.displayName ?? "")
|
|
308
|
-
).toBeInTheDocument();
|
|
248
|
+
expect(screen.getByText(iModel?.iModel.displayName ?? "")).toBeInTheDocument();
|
|
309
249
|
});
|
|
310
250
|
|
|
311
251
|
it("add mapping", async () => {
|
|
@@ -315,11 +255,15 @@ describe("Report Mappings View", () => {
|
|
|
315
255
|
mockGetMapping.mockReturnValueOnce(mockMappings[0].mapping).mockReturnValueOnce(mockMappings[1].mapping);
|
|
316
256
|
mockGetReportMappings.mockReturnValueOnce(mockReportMappings.mappings);
|
|
317
257
|
|
|
318
|
-
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
258
|
+
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
259
|
+
reportsClient: mockReportsClient.object,
|
|
260
|
+
mappingsClient: mockMappingsClient.object,
|
|
261
|
+
iModelsClient: mockIModelsClient.object,
|
|
262
|
+
});
|
|
319
263
|
|
|
320
264
|
await waitForElementToBeRemoved(() => screen.getByText(/loading/i));
|
|
321
265
|
|
|
322
|
-
mockGetMappings.mockReturnValueOnce(mockMappings.map((m:
|
|
266
|
+
mockGetMappings.mockReturnValueOnce(mockMappings.map((m: MappingContainer) => m.mapping));
|
|
323
267
|
|
|
324
268
|
const addMappingButton = screen.getByRole("button", {
|
|
325
269
|
name: /addmapping/i,
|
|
@@ -341,7 +285,11 @@ describe("Report Mappings View", () => {
|
|
|
341
285
|
});
|
|
342
286
|
|
|
343
287
|
it("odata feed url", async () => {
|
|
344
|
-
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
288
|
+
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
289
|
+
reportsClient: mockReportsClient.object,
|
|
290
|
+
mappingsClient: mockMappingsClient.object,
|
|
291
|
+
iModelsClient: mockIModelsClient.object,
|
|
292
|
+
});
|
|
345
293
|
|
|
346
294
|
await waitForElementToBeRemoved(() => screen.getByText(/loading/i));
|
|
347
295
|
|
|
@@ -349,11 +297,7 @@ describe("Report Mappings View", () => {
|
|
|
349
297
|
name: /odatafeedurl/i,
|
|
350
298
|
});
|
|
351
299
|
expect(urlTextbox).toBeInTheDocument();
|
|
352
|
-
expect(
|
|
353
|
-
screen.getByDisplayValue(
|
|
354
|
-
`https://api.bentley.com/insights/reporting/odata/${mockReport.id}`
|
|
355
|
-
)
|
|
356
|
-
).toBeInTheDocument();
|
|
300
|
+
expect(screen.getByDisplayValue(`https://api.bentley.com/insights/reporting/odata/${mockReport.id}`)).toBeInTheDocument();
|
|
357
301
|
|
|
358
302
|
const copyButton = screen.getByRole("button", {
|
|
359
303
|
name: /copy/i,
|
|
@@ -370,13 +314,16 @@ describe("Report Mappings View", () => {
|
|
|
370
314
|
mockGetMapping.mockReturnValueOnce(mockMappings[0].mapping).mockReturnValueOnce(mockMappings[1].mapping);
|
|
371
315
|
mockGetReportMappings.mockReturnValueOnce(mockReportMappings.mappings);
|
|
372
316
|
|
|
373
|
-
const iModels = mockIModelsResponse.map((iModel) => iModel.iModel.id);
|
|
374
|
-
|
|
375
317
|
const bulkExtractor = new BulkExtractor(new ReportsClient(), new ExtractionClient(), jest.fn().mockResolvedValue("mockAccessToken"), jest.fn, jest.fn);
|
|
376
318
|
|
|
377
319
|
const runIModelExtractionsMock = jest.spyOn(bulkExtractor, "runIModelExtractions").mockImplementation(async () => Promise.resolve());
|
|
378
320
|
|
|
379
|
-
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
321
|
+
const { user } = render(<ReportMappings report={mockReport} onClickClose={jest.fn()} />, {
|
|
322
|
+
reportsClient: mockReportsClient.object,
|
|
323
|
+
mappingsClient: mockMappingsClient.object,
|
|
324
|
+
iModelsClient: mockIModelsClient.object,
|
|
325
|
+
bulkExtractor,
|
|
326
|
+
});
|
|
380
327
|
|
|
381
328
|
await waitForElementToBeRemoved(() => screen.getByText(/loading/i));
|
|
382
329
|
|
|
@@ -387,31 +334,18 @@ describe("Report Mappings View", () => {
|
|
|
387
334
|
await waitFor(() => expect(extractAllButton).toBeEnabled());
|
|
388
335
|
|
|
389
336
|
// Check that the mocked method was called with the expected arguments
|
|
390
|
-
expect(runIModelExtractionsMock).toHaveBeenCalledWith(
|
|
337
|
+
expect(runIModelExtractionsMock).toHaveBeenCalledWith(mockExtractionRequestDetails);
|
|
391
338
|
});
|
|
392
339
|
|
|
393
|
-
const assertHorizontalTiles = (horizontalTiles: HTMLElement[], mockMappings:
|
|
340
|
+
const assertHorizontalTiles = (horizontalTiles: HTMLElement[], mockMappings: MappingContainer[]) => {
|
|
394
341
|
expect(horizontalTiles).toHaveLength(mockMappings.length);
|
|
395
342
|
|
|
396
343
|
for (const [index, horizontalTile] of horizontalTiles.entries()) {
|
|
397
344
|
const reportMappingTile = within(horizontalTile);
|
|
398
|
-
const mockiModel = mockIModelsResponse.find(
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
);
|
|
402
|
-
expect(
|
|
403
|
-
reportMappingTile.getByText(
|
|
404
|
-
mockMappings[index].mapping.mappingName
|
|
405
|
-
)
|
|
406
|
-
).toBeInTheDocument();
|
|
407
|
-
expect(
|
|
408
|
-
reportMappingTile.getByTitle(
|
|
409
|
-
mockMappings[index].mapping.description ?? ""
|
|
410
|
-
)
|
|
411
|
-
).toBeInTheDocument();
|
|
412
|
-
expect(
|
|
413
|
-
reportMappingTile.getByText(mockiModel?.iModel.displayName ?? "")
|
|
414
|
-
).toBeInTheDocument();
|
|
345
|
+
const mockiModel = mockIModelsResponse.find((iModel) => iModel.iModel.id === mockMappings[index].mapping._links.iModel.href);
|
|
346
|
+
expect(reportMappingTile.getByText(mockMappings[index].mapping.mappingName)).toBeInTheDocument();
|
|
347
|
+
expect(reportMappingTile.getByTitle(mockMappings[index].mapping.description ?? "")).toBeInTheDocument();
|
|
348
|
+
expect(reportMappingTile.getByText(mockiModel?.iModel.displayName ?? "")).toBeInTheDocument();
|
|
415
349
|
}
|
|
416
350
|
};
|
|
417
351
|
});
|