@thinkwise/testwise 0.2.62 → 0.2.99
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/Testwise.ts +35 -0
- package/artifact-builder/ArtifactManager.ts +25 -2
- package/artifact-builder/ComponentClassModelBuilder.ts +148 -0
- package/artifact-builder/InterfaceGenerator.ts +31 -33
- package/artifact-builder/ModelDataBuilder.ts +18 -20
- package/artifact-builder/ModelDataRefiner.ts +23 -3
- package/artifact-builder/SchemaGenerator.ts +45 -35
- package/artifact-builder/ScreenInterfaceRefiner.ts +25 -10
- package/artifact-builder/SelectorBuilder.ts +30 -24
- package/artifact-builder/SubjectClassModelBuilder.ts +209 -0
- package/artifact-builder/SubjectComponentGenerator.ts +67 -246
- package/artifact-builder/SubjectGenerator.ts +117 -230
- package/artifact-builder/SubjectRegistration.ts +41 -32
- package/artifact-builder/TsFileModel.ts +94 -0
- package/artifact-builder/TsFileSerializer.ts +247 -0
- package/artifact-builder/helpers/DataRetriever.ts +64 -27
- package/artifact-builder/helpers/NamingHandler.ts +23 -78
- package/artifact-builder/helpers/PipelinePaths.ts +123 -0
- package/artifact-builder/helpers/Stopwatch.ts +10 -0
- package/artifact-builder/helpers/index.ts +1 -0
- package/artifact-builder/index.ts +4 -0
- package/components/BaseComponentObjects.ts +17 -0
- package/components/action-bar/ActionBar.ts +35 -47
- package/components/action-bar/ActionBarObjects.ts +2 -0
- package/components/action-bar/CustomActionBar.ts +6 -0
- package/components/cardlist/Cardlist.ts +6 -0
- package/components/chart/Chart.ts +6 -0
- package/components/combined-filter/CombinedFilter.ts +9 -0
- package/components/cube-view-bar/CubeViewBar.ts +6 -0
- package/components/export/ExportComponent.ts +12 -0
- package/components/filter/ExcelStyleFilterPopup.ts +83 -10
- package/components/filter/ExcelStyleFilterPopupObjects.ts +29 -3
- package/components/filter/FilterForm.ts +10 -0
- package/components/filter/FilterPopup.ts +30 -9
- package/components/filter/FilterPopupObjects.ts +10 -3
- package/components/filter/FindForm.ts +7 -0
- package/components/filter/ManagePrefilterPopup.ts +11 -0
- package/components/form/Form.ts +16 -0
- package/components/grid/Grid.ts +50 -14
- package/components/grid/GridObjects.ts +0 -15
- package/components/maps/Maps.ts +6 -0
- package/components/menu/ListBarMenuComponent.ts +10 -0
- package/components/pivot-grid/PivotGrid.ts +6 -0
- package/components/pivot-grid/PivotGridFieldList.ts +7 -0
- package/components/pop-up/AllRowsPopUp.ts +12 -0
- package/components/pop-up/PopUpComponent.ts +11 -0
- package/components/prefilter-list/PrefilterList.ts +9 -0
- package/components/preview/Preview.ts +6 -0
- package/components/report-bar/ReportBar.ts +6 -0
- package/components/report-tiles/ReportTiles.ts +6 -0
- package/components/scheduler/Scheduler.ts +6 -0
- package/components/snackbar/SnackBar.ts +12 -0
- package/components/splitter/Splitter.ts +6 -0
- package/components/tab/BaseTab.ts +5 -0
- package/components/tab/DetailTabPage.ts +11 -0
- package/components/tab/Tab.ts +10 -0
- package/components/task/TaskBar.ts +13 -3
- package/components/task/TaskTiles.ts +12 -3
- package/components/topbar/TopBar.ts +10 -0
- package/components/tree-view/TreeView.ts +9 -0
- package/controls/DateControl.ts +47 -9
- package/controls/DateControlObjects.ts +15 -0
- package/controls/FormComboBox.ts +43 -26
- package/controls/FormComboBoxObjects.ts +27 -0
- package/controls/GridColumnControl.ts +35 -4
- package/controls/GridColumnControlObjects.ts +1 -1
- package/controls/InputFieldControl.ts +61 -15
- package/controls/InputFieldControlObjects.ts +19 -0
- package/controls/LookupDropdown.ts +59 -31
- package/controls/LookupDropdownObjects.ts +19 -0
- package/dist/Testwise.js +35 -0
- package/dist/Testwise.js.map +1 -1
- package/dist/artifact-builder/ArtifactManager.d.ts +18 -1
- package/dist/artifact-builder/ArtifactManager.js +24 -2
- package/dist/artifact-builder/ArtifactManager.js.map +1 -1
- package/dist/artifact-builder/ComponentClassModelBuilder.d.ts +22 -0
- package/dist/artifact-builder/ComponentClassModelBuilder.js +115 -0
- package/dist/artifact-builder/ComponentClassModelBuilder.js.map +1 -0
- package/dist/artifact-builder/InterfaceGenerator.d.ts +15 -6
- package/dist/artifact-builder/InterfaceGenerator.js +27 -26
- package/dist/artifact-builder/InterfaceGenerator.js.map +1 -1
- package/dist/artifact-builder/ModelDataBuilder.d.ts +7 -0
- package/dist/artifact-builder/ModelDataBuilder.js +13 -5
- package/dist/artifact-builder/ModelDataBuilder.js.map +1 -1
- package/dist/artifact-builder/ModelDataRefiner.d.ts +18 -1
- package/dist/artifact-builder/ModelDataRefiner.js +18 -3
- package/dist/artifact-builder/ModelDataRefiner.js.map +1 -1
- package/dist/artifact-builder/SchemaGenerator.d.ts +21 -5
- package/dist/artifact-builder/SchemaGenerator.js +38 -26
- package/dist/artifact-builder/SchemaGenerator.js.map +1 -1
- package/dist/artifact-builder/ScreenInterfaceRefiner.d.ts +18 -1
- package/dist/artifact-builder/ScreenInterfaceRefiner.js +23 -9
- package/dist/artifact-builder/ScreenInterfaceRefiner.js.map +1 -1
- package/dist/artifact-builder/SelectorBuilder.d.ts +18 -5
- package/dist/artifact-builder/SelectorBuilder.js +29 -14
- package/dist/artifact-builder/SelectorBuilder.js.map +1 -1
- package/dist/artifact-builder/SubjectClassModelBuilder.d.ts +38 -0
- package/dist/artifact-builder/SubjectClassModelBuilder.js +158 -0
- package/dist/artifact-builder/SubjectClassModelBuilder.js.map +1 -0
- package/dist/artifact-builder/SubjectComponentGenerator.d.ts +25 -14
- package/dist/artifact-builder/SubjectComponentGenerator.js +65 -189
- package/dist/artifact-builder/SubjectComponentGenerator.js.map +1 -1
- package/dist/artifact-builder/SubjectGenerator.d.ts +32 -13
- package/dist/artifact-builder/SubjectGenerator.js +81 -165
- package/dist/artifact-builder/SubjectGenerator.js.map +1 -1
- package/dist/artifact-builder/SubjectRegistration.d.ts +22 -8
- package/dist/artifact-builder/SubjectRegistration.js +29 -14
- package/dist/artifact-builder/SubjectRegistration.js.map +1 -1
- package/dist/artifact-builder/TsFileModel.d.ts +86 -0
- package/dist/artifact-builder/TsFileModel.js +2 -0
- package/dist/artifact-builder/TsFileModel.js.map +1 -0
- package/dist/artifact-builder/TsFileSerializer.d.ts +19 -0
- package/dist/artifact-builder/TsFileSerializer.js +225 -0
- package/dist/artifact-builder/TsFileSerializer.js.map +1 -0
- package/dist/artifact-builder/helpers/DataRetriever.d.ts +22 -3
- package/dist/artifact-builder/helpers/DataRetriever.js +56 -26
- package/dist/artifact-builder/helpers/DataRetriever.js.map +1 -1
- package/dist/artifact-builder/helpers/NamingHandler.d.ts +18 -6
- package/dist/artifact-builder/helpers/NamingHandler.js +20 -61
- package/dist/artifact-builder/helpers/NamingHandler.js.map +1 -1
- package/dist/artifact-builder/helpers/PipelinePaths.d.ts +52 -0
- package/dist/artifact-builder/helpers/PipelinePaths.js +99 -0
- package/dist/artifact-builder/helpers/PipelinePaths.js.map +1 -0
- package/dist/artifact-builder/helpers/Stopwatch.d.ts +10 -0
- package/dist/artifact-builder/helpers/Stopwatch.js +10 -0
- package/dist/artifact-builder/helpers/Stopwatch.js.map +1 -1
- package/dist/artifact-builder/helpers/index.d.ts +1 -0
- package/dist/artifact-builder/helpers/index.js +1 -0
- package/dist/artifact-builder/helpers/index.js.map +1 -1
- package/dist/artifact-builder/index.d.ts +4 -0
- package/dist/artifact-builder/index.js +4 -0
- package/dist/artifact-builder/index.js.map +1 -1
- package/dist/components/BaseComponentObjects.d.ts +17 -0
- package/dist/components/BaseComponentObjects.js +17 -0
- package/dist/components/BaseComponentObjects.js.map +1 -1
- package/dist/components/action-bar/ActionBar.d.ts +21 -24
- package/dist/components/action-bar/ActionBar.js +31 -24
- package/dist/components/action-bar/ActionBar.js.map +1 -1
- package/dist/components/action-bar/ActionBarObjects.d.ts +1 -0
- package/dist/components/action-bar/ActionBarObjects.js +1 -0
- package/dist/components/action-bar/ActionBarObjects.js.map +1 -1
- package/dist/components/action-bar/CustomActionBar.d.ts +6 -0
- package/dist/components/action-bar/CustomActionBar.js +6 -0
- package/dist/components/action-bar/CustomActionBar.js.map +1 -1
- package/dist/components/cardlist/Cardlist.d.ts +6 -0
- package/dist/components/cardlist/Cardlist.js +6 -0
- package/dist/components/cardlist/Cardlist.js.map +1 -1
- package/dist/components/chart/Chart.d.ts +6 -0
- package/dist/components/chart/Chart.js +6 -0
- package/dist/components/chart/Chart.js.map +1 -1
- package/dist/components/combined-filter/CombinedFilter.d.ts +9 -0
- package/dist/components/combined-filter/CombinedFilter.js +9 -0
- package/dist/components/combined-filter/CombinedFilter.js.map +1 -1
- package/dist/components/cube-view-bar/CubeViewBar.d.ts +6 -0
- package/dist/components/cube-view-bar/CubeViewBar.js +6 -0
- package/dist/components/cube-view-bar/CubeViewBar.js.map +1 -1
- package/dist/components/export/ExportComponent.d.ts +12 -0
- package/dist/components/export/ExportComponent.js +12 -0
- package/dist/components/export/ExportComponent.js.map +1 -1
- package/dist/components/filter/ExcelStyleFilterPopup.d.ts +25 -2
- package/dist/components/filter/ExcelStyleFilterPopup.js +60 -6
- package/dist/components/filter/ExcelStyleFilterPopup.js.map +1 -1
- package/dist/components/filter/ExcelStyleFilterPopupObjects.d.ts +8 -1
- package/dist/components/filter/ExcelStyleFilterPopupObjects.js +15 -2
- package/dist/components/filter/ExcelStyleFilterPopupObjects.js.map +1 -1
- package/dist/components/filter/FilterForm.d.ts +10 -0
- package/dist/components/filter/FilterForm.js +10 -0
- package/dist/components/filter/FilterForm.js.map +1 -1
- package/dist/components/filter/FilterPopup.d.ts +22 -4
- package/dist/components/filter/FilterPopup.js +17 -9
- package/dist/components/filter/FilterPopup.js.map +1 -1
- package/dist/components/filter/FilterPopupObjects.d.ts +5 -2
- package/dist/components/filter/FilterPopupObjects.js +5 -2
- package/dist/components/filter/FilterPopupObjects.js.map +1 -1
- package/dist/components/filter/FindForm.d.ts +7 -0
- package/dist/components/filter/FindForm.js +7 -0
- package/dist/components/filter/FindForm.js.map +1 -1
- package/dist/components/filter/ManagePrefilterPopup.d.ts +11 -0
- package/dist/components/filter/ManagePrefilterPopup.js +11 -0
- package/dist/components/filter/ManagePrefilterPopup.js.map +1 -1
- package/dist/components/form/Form.d.ts +16 -0
- package/dist/components/form/Form.js +16 -0
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/grid/Grid.d.ts +20 -1
- package/dist/components/grid/Grid.js +35 -25
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/GridObjects.d.ts +0 -4
- package/dist/components/grid/GridObjects.js +0 -6
- package/dist/components/grid/GridObjects.js.map +1 -1
- package/dist/components/maps/Maps.d.ts +6 -0
- package/dist/components/maps/Maps.js +6 -0
- package/dist/components/maps/Maps.js.map +1 -1
- package/dist/components/menu/ListBarMenuComponent.d.ts +10 -0
- package/dist/components/menu/ListBarMenuComponent.js +10 -0
- package/dist/components/menu/ListBarMenuComponent.js.map +1 -1
- package/dist/components/pivot-grid/PivotGrid.d.ts +6 -0
- package/dist/components/pivot-grid/PivotGrid.js +6 -0
- package/dist/components/pivot-grid/PivotGrid.js.map +1 -1
- package/dist/components/pivot-grid/PivotGridFieldList.d.ts +7 -0
- package/dist/components/pivot-grid/PivotGridFieldList.js +7 -0
- package/dist/components/pivot-grid/PivotGridFieldList.js.map +1 -1
- package/dist/components/pop-up/AllRowsPopUp.d.ts +12 -0
- package/dist/components/pop-up/AllRowsPopUp.js +12 -0
- package/dist/components/pop-up/AllRowsPopUp.js.map +1 -1
- package/dist/components/pop-up/PopUpComponent.d.ts +11 -0
- package/dist/components/pop-up/PopUpComponent.js +11 -0
- package/dist/components/pop-up/PopUpComponent.js.map +1 -1
- package/dist/components/prefilter-list/PrefilterList.d.ts +9 -0
- package/dist/components/prefilter-list/PrefilterList.js +9 -0
- package/dist/components/prefilter-list/PrefilterList.js.map +1 -1
- package/dist/components/preview/Preview.d.ts +6 -0
- package/dist/components/preview/Preview.js +6 -0
- package/dist/components/preview/Preview.js.map +1 -1
- package/dist/components/report-bar/ReportBar.d.ts +6 -0
- package/dist/components/report-bar/ReportBar.js +6 -0
- package/dist/components/report-bar/ReportBar.js.map +1 -1
- package/dist/components/report-tiles/ReportTiles.d.ts +6 -0
- package/dist/components/report-tiles/ReportTiles.js +6 -0
- package/dist/components/report-tiles/ReportTiles.js.map +1 -1
- package/dist/components/scheduler/Scheduler.d.ts +6 -0
- package/dist/components/scheduler/Scheduler.js +6 -0
- package/dist/components/scheduler/Scheduler.js.map +1 -1
- package/dist/components/snackbar/SnackBar.d.ts +12 -0
- package/dist/components/snackbar/SnackBar.js +12 -0
- package/dist/components/snackbar/SnackBar.js.map +1 -1
- package/dist/components/splitter/Splitter.d.ts +6 -0
- package/dist/components/splitter/Splitter.js +6 -0
- package/dist/components/splitter/Splitter.js.map +1 -1
- package/dist/components/tab/BaseTab.d.ts +5 -0
- package/dist/components/tab/BaseTab.js +5 -0
- package/dist/components/tab/BaseTab.js.map +1 -1
- package/dist/components/tab/DetailTabPage.d.ts +11 -0
- package/dist/components/tab/DetailTabPage.js +11 -0
- package/dist/components/tab/DetailTabPage.js.map +1 -1
- package/dist/components/tab/Tab.d.ts +10 -0
- package/dist/components/tab/Tab.js +10 -0
- package/dist/components/tab/Tab.js.map +1 -1
- package/dist/components/task/TaskBar.d.ts +12 -2
- package/dist/components/task/TaskBar.js +13 -3
- package/dist/components/task/TaskBar.js.map +1 -1
- package/dist/components/task/TaskTiles.d.ts +11 -2
- package/dist/components/task/TaskTiles.js +12 -3
- package/dist/components/task/TaskTiles.js.map +1 -1
- package/dist/components/topbar/TopBar.d.ts +10 -0
- package/dist/components/topbar/TopBar.js +10 -0
- package/dist/components/topbar/TopBar.js.map +1 -1
- package/dist/components/tree-view/TreeView.d.ts +9 -0
- package/dist/components/tree-view/TreeView.js +9 -0
- package/dist/components/tree-view/TreeView.js.map +1 -1
- package/dist/controls/DateControl.d.ts +40 -2
- package/dist/controls/DateControl.js +24 -7
- package/dist/controls/DateControl.js.map +1 -1
- package/dist/controls/DateControlObjects.d.ts +8 -1
- package/dist/controls/DateControlObjects.js +8 -1
- package/dist/controls/DateControlObjects.js.map +1 -1
- package/dist/controls/FormComboBox.d.ts +30 -0
- package/dist/controls/FormComboBox.js +19 -16
- package/dist/controls/FormComboBox.js.map +1 -1
- package/dist/controls/FormComboBoxObjects.d.ts +12 -1
- package/dist/controls/FormComboBoxObjects.js +15 -1
- package/dist/controls/FormComboBoxObjects.js.map +1 -1
- package/dist/controls/GridColumnControl.d.ts +30 -0
- package/dist/controls/GridColumnControl.js +13 -4
- package/dist/controls/GridColumnControl.js.map +1 -1
- package/dist/controls/GridColumnControlObjects.js +1 -1
- package/dist/controls/GridColumnControlObjects.js.map +1 -1
- package/dist/controls/InputFieldControl.d.ts +50 -3
- package/dist/controls/InputFieldControl.js +40 -11
- package/dist/controls/InputFieldControl.js.map +1 -1
- package/dist/controls/InputFieldControlObjects.d.ts +10 -1
- package/dist/controls/InputFieldControlObjects.js +10 -1
- package/dist/controls/InputFieldControlObjects.js.map +1 -1
- package/dist/controls/LookupDropdown.d.ts +29 -0
- package/dist/controls/LookupDropdown.js +36 -25
- package/dist/controls/LookupDropdown.js.map +1 -1
- package/dist/controls/LookupDropdownObjects.d.ts +10 -0
- package/dist/controls/LookupDropdownObjects.js +11 -0
- package/dist/controls/LookupDropdownObjects.js.map +1 -0
- package/dist/enums/ElementTypes.d.ts +18 -0
- package/dist/enums/ElementTypes.js +18 -0
- package/dist/enums/ElementTypes.js.map +1 -1
- package/dist/enums/ExportFormat.d.ts +8 -0
- package/dist/enums/ExportFormat.js +8 -0
- package/dist/enums/ExportFormat.js.map +1 -1
- package/dist/enums/LogLevel.d.ts +17 -0
- package/dist/enums/LogLevel.js +17 -1
- package/dist/enums/LogLevel.js.map +1 -1
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/helpers/ConfigChecker.d.ts +13 -0
- package/dist/helpers/ConfigChecker.js +13 -0
- package/dist/helpers/ConfigChecker.js.map +1 -1
- package/dist/helpers/Ensure.d.ts +13 -0
- package/dist/helpers/Ensure.js +13 -0
- package/dist/helpers/Ensure.js.map +1 -1
- package/dist/helpers/FlightTracker.d.ts +13 -3
- package/dist/helpers/FlightTracker.js +103 -17
- package/dist/helpers/FlightTracker.js.map +1 -1
- package/dist/helpers/GlobalWaitEventHandler.d.ts +13 -0
- package/dist/helpers/GlobalWaitEventHandler.js +13 -0
- package/dist/helpers/GlobalWaitEventHandler.js.map +1 -1
- package/dist/helpers/LoginHelper.d.ts +35 -1
- package/dist/helpers/LoginHelper.js +46 -11
- package/dist/helpers/LoginHelper.js.map +1 -1
- package/dist/helpers/PathResolver.d.ts +22 -0
- package/dist/helpers/PathResolver.js +22 -0
- package/dist/helpers/PathResolver.js.map +1 -1
- package/dist/helpers/Poll.d.ts +13 -1
- package/dist/helpers/Poll.js +12 -0
- package/dist/helpers/Poll.js.map +1 -1
- package/dist/helpers/RegexHelper.d.ts +15 -0
- package/dist/helpers/RegexHelper.js +15 -3
- package/dist/helpers/RegexHelper.js.map +1 -1
- package/dist/helpers/SubjectNavigator.d.ts +26 -0
- package/dist/helpers/SubjectNavigator.js +51 -0
- package/dist/helpers/SubjectNavigator.js.map +1 -0
- package/dist/helpers/UserSimulationHelper.d.ts +14 -0
- package/dist/helpers/UserSimulationHelper.js +14 -0
- package/dist/helpers/UserSimulationHelper.js.map +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.d.ts +6 -20
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/IComponentObjects.d.ts +12 -0
- package/dist/interfaces/IComponentSchemaMeta.d.ts +15 -0
- package/dist/interfaces/IComponentSchemaMeta.js +2 -0
- package/dist/interfaces/IComponentSchemaMeta.js.map +1 -0
- package/dist/interfaces/IProperty.d.ts +13 -0
- package/dist/interfaces/IRegisteredSubjects.d.ts +12 -0
- package/dist/interfaces/ISeedSubjectDraft.d.ts +16 -0
- package/dist/interfaces/ISeedSubjectDraft.js +2 -0
- package/dist/interfaces/ISeedSubjectDraft.js.map +1 -0
- package/dist/interfaces/ISubject.d.ts +13 -0
- package/dist/interfaces/ISubjectDetail.d.ts +11 -0
- package/dist/interfaces/ISubjectDetail.js +2 -0
- package/dist/interfaces/ISubjectDetail.js.map +1 -0
- package/dist/mcp/ArtifactResolver.d.ts +152 -0
- package/dist/mcp/ArtifactResolver.js +232 -0
- package/dist/mcp/ArtifactResolver.js.map +1 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/page-extensions/GlobalComponents.d.ts +30 -0
- package/dist/page-extensions/GlobalComponents.js +30 -0
- package/dist/page-extensions/GlobalComponents.js.map +1 -1
- package/dist/page-extensions/GoToDeepLink.d.ts +9 -0
- package/dist/page-extensions/GoToDeepLink.js +9 -0
- package/dist/page-extensions/GoToDeepLink.js.map +1 -1
- package/dist/page-extensions/LoginFeatures.d.ts +8 -0
- package/dist/page-extensions/LoginFeatures.js +8 -0
- package/dist/page-extensions/LoginFeatures.js.map +1 -1
- package/dist/page-extensions/SubjectRegistry.d.ts +31 -0
- package/dist/page-extensions/SubjectRegistry.js +31 -0
- package/dist/page-extensions/SubjectRegistry.js.map +1 -1
- package/dist/page-extensions/UserSimulation.d.ts +21 -0
- package/dist/page-extensions/UserSimulation.js +21 -0
- package/dist/page-extensions/UserSimulation.js.map +1 -1
- package/dist/page-extensions/WaitEventHandler.d.ts +20 -0
- package/dist/page-extensions/WaitEventHandler.js +20 -0
- package/dist/page-extensions/WaitEventHandler.js.map +1 -1
- package/dist/page-overrides/ClickOverride.d.ts +23 -2
- package/dist/page-overrides/ClickOverride.js +34 -50
- package/dist/page-overrides/ClickOverride.js.map +1 -1
- package/dist/page-overrides/FillOverride.d.ts +23 -0
- package/dist/page-overrides/FillOverride.js +46 -66
- package/dist/page-overrides/FillOverride.js.map +1 -1
- package/dist/services/ConfigBuilder.d.ts +24 -0
- package/dist/services/ConfigBuilder.js +24 -0
- package/dist/services/ConfigBuilder.js.map +1 -1
- package/dist/services/IndiciumApi.service.d.ts +26 -0
- package/dist/services/IndiciumApi.service.js +40 -5
- package/dist/services/IndiciumApi.service.js.map +1 -1
- package/dist/services/Logger.d.ts +13 -0
- package/dist/services/Logger.js +39 -0
- package/dist/services/Logger.js.map +1 -1
- package/dist/types/Components.d.ts +18 -1
- package/dist/types/Components.js +0 -1
- package/dist/types/Components.js.map +1 -1
- package/dist/types/LocatorType.d.ts +5 -0
- package/dist/types/LocatorType.js +2 -0
- package/dist/types/LocatorType.js.map +1 -0
- package/dist/types/PollTypes.d.ts +8 -0
- package/dist/types/Test.d.ts +18 -0
- package/dist/types/Universal.d.ts +12 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/enums/ElementTypes.ts +18 -0
- package/enums/ExportFormat.ts +8 -0
- package/enums/LogLevel.ts +17 -1
- package/enums/index.ts +1 -0
- package/helpers/ConfigChecker.ts +13 -0
- package/helpers/Ensure.ts +13 -0
- package/helpers/FlightTracker.ts +109 -20
- package/helpers/GlobalWaitEventHandler.ts +13 -0
- package/helpers/LoginHelper.ts +49 -12
- package/helpers/PathResolver.ts +22 -0
- package/helpers/Poll.ts +13 -1
- package/helpers/RegexHelper.ts +15 -3
- package/helpers/SubjectNavigator.ts +57 -0
- package/helpers/UserSimulationHelper.ts +14 -0
- package/helpers/index.ts +1 -0
- package/index.ts +1 -0
- package/interfaces/IComponentObjects.ts +12 -0
- package/interfaces/IComponentSchemaMeta.ts +17 -0
- package/interfaces/IProperty.ts +13 -0
- package/interfaces/IRegisteredSubjects.ts +12 -0
- package/interfaces/ISeedSubjectDraft.ts +17 -0
- package/interfaces/ISubject.ts +13 -0
- package/interfaces/ISubjectDetail.ts +12 -0
- package/mcp/ArtifactResolver.ts +296 -0
- package/mcp/index.ts +2 -0
- package/package.json +20 -8
- package/page-extensions/GlobalComponents.ts +30 -0
- package/page-extensions/GoToDeepLink.ts +9 -0
- package/page-extensions/LoginFeatures.ts +8 -0
- package/page-extensions/SubjectRegistry.ts +32 -0
- package/page-extensions/UserSimulation.ts +21 -0
- package/page-extensions/WaitEventHandler.ts +20 -0
- package/page-overrides/ClickOverride.ts +36 -55
- package/page-overrides/FillOverride.ts +59 -73
- package/promptCredentials.js +1 -1
- package/scripts/Testwise.template.json +1 -1
- package/scripts/diagram.js +2267 -0
- package/scripts/main.js +84 -63
- package/scripts/postinstall.js +55 -42
- package/scripts/setup.js +91 -37
- package/scripts/sync.js +767 -748
- package/services/ConfigBuilder.ts +24 -0
- package/services/IndiciumApi.service.ts +44 -6
- package/services/Logger.ts +40 -0
- package/templates/copilot-instructions.md +130 -0
- package/templates/mcp.json +9 -0
- package/templates/testwise-test-expert.agent.md +453 -0
- package/tests/tsconfig.json +12 -0
- package/tsconfig.json +6 -2
- package/types/Components.ts +17 -2
- package/types/LocatorType.ts +5 -0
- package/types/PollTypes.ts +8 -0
- package/types/Test.ts +18 -0
- package/types/Universal.ts +12 -0
- package/types/index.ts +2 -0
- package/dist/interfaces/IStoredTestResults.d.ts +0 -5
- package/dist/interfaces/IStoredTestResults.js +0 -2
- package/dist/interfaces/IStoredTestResults.js.map +0 -1
- package/dist/templates/test-artifacts/SubjectPageBase.d.ts +0 -5
- package/dist/templates/test-artifacts/SubjectPageBase.js +0 -6
- package/dist/templates/test-artifacts/SubjectPageBase.js.map +0 -1
- package/dist/templates/test-artifacts/screens/index.d.ts +0 -1
- package/dist/templates/test-artifacts/screens/index.js +0 -2
- package/dist/templates/test-artifacts/screens/index.js.map +0 -1
- package/dist/templates/test-artifacts/subjects/index.d.ts +0 -1
- package/dist/templates/test-artifacts/subjects/index.js +0 -2
- package/dist/templates/test-artifacts/subjects/index.js.map +0 -1
- package/interfaces/IStoredTestResults.ts +0 -6
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The singleton logger instance. Import this in any file that needs to write
|
|
3
|
+
* structured log entries during test execution or pipeline runs.
|
|
4
|
+
*
|
|
5
|
+
* All methods accept an optional message string followed by any number of
|
|
6
|
+
* extra values (arrays, objects, errors) that will be appended to the entry.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* logger.info('Starting sync pipeline');
|
|
10
|
+
* logger.warn('Subject not found', { subject: name });
|
|
11
|
+
* logger.error('Unexpected failure', err);
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
1
14
|
export declare const logger: {
|
|
2
15
|
error: (msg?: string, ...optionalParams: unknown[]) => void;
|
|
3
16
|
warn: (msg?: string, ...optionalParams: unknown[]) => void;
|
package/dist/services/Logger.js
CHANGED
|
@@ -3,6 +3,32 @@ import path from 'node:path';
|
|
|
3
3
|
import { LogLevel } from '../enums/LogLevel.js';
|
|
4
4
|
import { originalDebug, originalError, originalInfo, originalLog, originalWarn } from '../index.js';
|
|
5
5
|
import { testwiseConfig } from './ConfigBuilder.js';
|
|
6
|
+
/**
|
|
7
|
+
* Buffered, level-filtered logger that writes timestamped entries to a log
|
|
8
|
+
* file AND (optionally) to the console during test runs.
|
|
9
|
+
*
|
|
10
|
+
* **Configuration** — all settings live under `featureSettings.logger` in
|
|
11
|
+
* `Testwise.json`:
|
|
12
|
+
*
|
|
13
|
+
* | Key | Type | Default | Description |
|
|
14
|
+
* |---|---|---|---|
|
|
15
|
+
* | `logDir` | string | `"logs"` | Directory to write log files into, relative to the consumer project root. |
|
|
16
|
+
* | `logLevel` | `"ERROR"\|"WARN"\|"INFO"\|"DEBUG"\|"ALL"` | `"ALL"` | Minimum severity level to record. |
|
|
17
|
+
* | `logByDay` | boolean | `false` | When `true`, creates a new `test-log-YYYY-MM-DD.log` file each day instead of always writing to `test-log.log`. |
|
|
18
|
+
* | `bufferSizeLimit` | number | `1000` | Number of log lines to buffer in memory before flushing to disk. |
|
|
19
|
+
* | `applyLogLevelToConsoleOutput` | boolean | `false` | When `true`, the log-level filter also suppresses console output (not just file output). |
|
|
20
|
+
*
|
|
21
|
+
* **How to use it:**
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { logger } from '../services/Logger.js';
|
|
24
|
+
*
|
|
25
|
+
* logger.info('Navigating to Employee subject');
|
|
26
|
+
* logger.error('Connection failed', error);
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Entries are written in the format:
|
|
30
|
+
* `[ISO-timestamp] [LEVEL] [file:line:col] message`
|
|
31
|
+
*/
|
|
6
32
|
const logDir = path.resolve(process.cwd(), testwiseConfig().get('featureSettings.logger.logDir') ?? 'logs');
|
|
7
33
|
const logLevel = testwiseConfig().get('featureSettings.logger.logLevel')?.toUpperCase() ?? LogLevel.ALL;
|
|
8
34
|
const applyLogLevelToConsoleOutput = testwiseConfig().get('featureSettings.logger.applyLogLevelToConsoleOutput') ?? false;
|
|
@@ -149,6 +175,19 @@ function getCallerInfo() {
|
|
|
149
175
|
}
|
|
150
176
|
return 'unknown origin';
|
|
151
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* The singleton logger instance. Import this in any file that needs to write
|
|
180
|
+
* structured log entries during test execution or pipeline runs.
|
|
181
|
+
*
|
|
182
|
+
* All methods accept an optional message string followed by any number of
|
|
183
|
+
* extra values (arrays, objects, errors) that will be appended to the entry.
|
|
184
|
+
*
|
|
185
|
+
* ```ts
|
|
186
|
+
* logger.info('Starting sync pipeline');
|
|
187
|
+
* logger.warn('Subject not found', { subject: name });
|
|
188
|
+
* logger.error('Unexpected failure', err);
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
152
191
|
export const logger = {
|
|
153
192
|
// Order by severity level
|
|
154
193
|
error: (msg, ...optionalParams) => log(msg, LogLevel.ERROR, ...optionalParams),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../services/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sB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,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,0BAA0B;IAC1B,KAAK,EAAE,CAAC,GAAY,EAAE,GAAG,cAAyB,EAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,cAAc,CAAC;IACxG,IAAI,EAAE,CAAC,GAAY,EAAE,GAAG,cAAyB,EAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,cAAc,CAAC;IACtG,IAAI,EAAE,CAAC,GAAY,EAAE,GAAG,cAAyB,EAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,cAAc,CAAC;IACtG,KAAK,EAAE,CAAC,GAAY,EAAE,GAAG,cAAyB,EAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,cAAc,CAAC;IACxG,GAAG,EAAE,CAAC,GAAY,EAAE,GAAG,cAAyB,EAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC;CACrG,CAAC"}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Enumerates every Thinkwise UI component that the artifact pipeline can
|
|
3
|
+
* generate references to inside subject classes.
|
|
4
|
+
*
|
|
5
|
+
* Components are split into two groups:
|
|
6
|
+
*
|
|
7
|
+
* - **`SubjectAgnosticComponents`** (`coreComponents` array) — components that
|
|
8
|
+
* are identical across all subjects and don't need subject-specific typing.
|
|
9
|
+
* Examples: `ActionBar`, `Tab`, `FilterForm`, `TreeView`.
|
|
10
|
+
*
|
|
11
|
+
* - **`SubjectComponents`** (`subjectComponents` array) — `Form` and `Grid`,
|
|
12
|
+
* which get a fully-typed generated `Components/` subfolder with field/column
|
|
13
|
+
* accessors specific to that subject.
|
|
14
|
+
*
|
|
15
|
+
* The `SelectorBuilder` in the artifact-builder uses these lists to decide
|
|
16
|
+
* which locator strategy to apply when generating subject class properties.
|
|
17
|
+
*/
|
|
18
|
+
export type SubjectAgnosticComponents = 'Chart' | 'PivotGridFieldList' | 'Splitter' | 'ActionBar' | 'CombinedFilter' | 'CustomActionBar' | 'DetailTabPage' | 'Tab' | 'TaskTiles' | 'FilterForm' | 'PrefilterList' | 'TaskBar' | 'Cardlist' | 'TreeView' | 'CubeViewBar' | 'PivotGrid' | 'Maps' | 'ReportBar' | 'ReportTiles' | 'Scheduler' | 'Preview';
|
|
2
19
|
export declare const coreComponents: SubjectAgnosticComponents[];
|
|
3
20
|
export type SubjectComponents = 'Form' | 'Grid';
|
|
4
21
|
export declare const subjectComponents: SubjectComponents[];
|
package/dist/types/Components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Components.js","sourceRoot":"","sources":["../../types/Components.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Components.js","sourceRoot":"","sources":["../../types/Components.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAC,MAAM,cAAc,GAAgC;IACzD,WAAW;IACX,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,KAAK;IACL,eAAe;IACf,SAAS;IACT,UAAU;IACV,YAAY;IACZ,WAAW;IACX,eAAe;IACf,OAAO;IACP,UAAU;IACV,aAAa;IACb,WAAW;IACX,oBAAoB;IACpB,MAAM;IACN,WAAW;IACX,aAAa;IACb,WAAW;IACX,SAAS;CACV,CAAC;AAGF,MAAM,CAAC,MAAM,iBAAiB,GAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAGvE,MAAM,CAAC,MAAM,gBAAgB,GAAuB,CAAC,GAAG,cAAc,EAAE,GAAG,iBAAiB,CAAC,CAAC;AAC9F,MAAM,CAAC,MAAM,wBAAwB,GAAuB,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocatorType.js","sourceRoot":"","sources":["../../types/LocatorType.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for `pollUntil()` — controls how the polling loop behaves.
|
|
3
|
+
*
|
|
4
|
+
* All fields are optional; sensible defaults are used if omitted:
|
|
5
|
+
* - `timeout`: 10 000 ms
|
|
6
|
+
* - `interval`: 200 ms
|
|
7
|
+
* - `predicate`: truthy check on the returned value
|
|
8
|
+
*/
|
|
1
9
|
export type PollOptions<T = unknown> = {
|
|
2
10
|
timeout?: number;
|
|
3
11
|
interval?: number;
|
package/dist/types/Test.d.ts
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
1
|
import type { PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, TestType } from '@playwright/test';
|
|
2
|
+
/**
|
|
3
|
+
* Convenience alias for the fully-typed Playwright `TestType` that includes
|
|
4
|
+
* all built-in test arguments and options (both per-test and per-worker).
|
|
5
|
+
*
|
|
6
|
+
* Used throughout the library instead of the verbose `TestType<...>` generic
|
|
7
|
+
* to keep constructor signatures readable. Every page-extension and
|
|
8
|
+
* page-override receives and returns a `Test` so they can chain
|
|
9
|
+
* `test.extend()` calls cleanly.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import type { Test } from '../types/Test.js';
|
|
13
|
+
*
|
|
14
|
+
* export class MyExtension {
|
|
15
|
+
* constructor(test: Test) {
|
|
16
|
+
* this._test = test.extend({ ... });
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
2
20
|
export type Test = TestType<PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration and login option shapes used by `LoginHelper` and the
|
|
3
|
+
* `LoginFeatures` page extension.
|
|
4
|
+
*
|
|
5
|
+
* - `UniversalConfigOptions` — feature flags and settings applied when
|
|
6
|
+
* configuring the Thinkwise application during login.
|
|
7
|
+
* - `UniversalLoginOptions` — full set of overrides for a single login call
|
|
8
|
+
* (credentials, application ID, config options, etc.).
|
|
9
|
+
*
|
|
10
|
+
* These types are used internally; you typically only interact with them
|
|
11
|
+
* via `page.logInWithOptions(options)`.
|
|
12
|
+
*/
|
|
1
13
|
export type UniversalConfigOptions = {
|
|
2
14
|
barcodeScannerSymbologies?: string;
|
|
3
15
|
cortexEnabledSymbologies?: string[];
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
|
package/enums/ElementTypes.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps Thinkwise model control type identifiers to their string values.
|
|
3
|
+
*
|
|
4
|
+
* The artifact pipeline reads `control_type` values from the Indicium API
|
|
5
|
+
* (via `IProperty.control_type`) and uses these enum members to decide which
|
|
6
|
+
* Testwise control class to generate for each field or column.
|
|
7
|
+
*
|
|
8
|
+
* | Enum member | Generated control |
|
|
9
|
+
* |---|---|
|
|
10
|
+
* | `Field` | `InputFieldControl` |
|
|
11
|
+
* | `Dropdown` | `LookupDropdown` (drop-down variant) |
|
|
12
|
+
* | `Textarea` | `InputFieldControl` (multi-line) |
|
|
13
|
+
* | `Checkbox` | `InputFieldControl` (checkbox) |
|
|
14
|
+
* | `Lookup` | `LookupDropdown` |
|
|
15
|
+
* | `Column` | `GridColumnControl` |
|
|
16
|
+
* | `ComboBox` | `FormComboBox` |
|
|
17
|
+
* | `DatePicker` | `DateControl` |
|
|
18
|
+
*/
|
|
1
19
|
export enum KnownElementTypes {
|
|
2
20
|
Field = 'field',
|
|
3
21
|
Dropdown = 'dropdown',
|
package/enums/ExportFormat.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported file formats for the `ExportComponent` export action.
|
|
3
|
+
* Pass one of these values to `ExportComponent.export(format)` to trigger
|
|
4
|
+
* a grid or list export in the desired format (CSV, XLSX, or XLS).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* await page.components.export.export(ExportFormat.XLSX);
|
|
8
|
+
*/
|
|
1
9
|
export enum ExportFormat {
|
|
2
10
|
CSV = 'csv',
|
|
3
11
|
XLSX = 'xlsx',
|
package/enums/LogLevel.ts
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls how much output the Testwise `Logger` writes, both to the log file
|
|
3
|
+
* and (optionally) to the console.
|
|
4
|
+
*
|
|
5
|
+
* Levels are cumulative — choosing `WARN` includes `ERROR`; choosing `DEBUG`
|
|
6
|
+
* includes `ERROR`, `WARN`, and `INFO`.
|
|
7
|
+
*
|
|
8
|
+
* Configure via `Testwise.json`:
|
|
9
|
+
* ```json
|
|
10
|
+
* { "featureSettings": { "logger": { "logLevel": "INFO" } } }
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
1
13
|
export enum LogLevel {
|
|
2
|
-
|
|
14
|
+
/** Only critical failures. Use in CI environments where log noise must be minimal. */
|
|
3
15
|
ERROR = 'ERROR',
|
|
16
|
+
/** Errors and recoverable warnings. Good default for most pipelines. */
|
|
4
17
|
WARN = 'WARN',
|
|
18
|
+
/** Errors, warnings, and informational messages about what the test is doing. Recommended for local development. */
|
|
5
19
|
INFO = 'INFO',
|
|
20
|
+
/** Full verbose output including internal state changes. Use when diagnosing hard-to-reproduce failures. */
|
|
6
21
|
DEBUG = 'DEBUG',
|
|
22
|
+
/** Everything. Includes low-level log entries that are normally filtered out. */
|
|
7
23
|
ALL = 'ALL'
|
|
8
24
|
}
|
package/enums/index.ts
CHANGED
package/helpers/ConfigChecker.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { indiciumApi } from '../services/IndiciumApi.service.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Verifies that the consuming project's Testwise configuration is valid and
|
|
5
|
+
* reachable before the artifact pipeline is allowed to run.
|
|
6
|
+
*
|
|
7
|
+
* **Why this exists:** The artifact-builder fetches live model data from the
|
|
8
|
+
* Thinkwise Indicium API. If the API URL or credentials in `Testwise.json`
|
|
9
|
+
* are wrong, the pipeline fails mid-way with a cryptic network error.
|
|
10
|
+
* `ConfigChecker` performs a lightweight connectivity probe upfront so the
|
|
11
|
+
* pipeline can give a clear "cannot connect" error message instead.
|
|
12
|
+
*
|
|
13
|
+
* **When it is called:** Automatically by `ArtifactManager` at the start of
|
|
14
|
+
* every `testwise sync` run. You do not need to call it manually.
|
|
15
|
+
*/
|
|
3
16
|
export class ConfigChecker {
|
|
4
17
|
public async hasValidModelBuilderConfig(): Promise<boolean> {
|
|
5
18
|
return await indiciumApi.canConnectToProject();
|
package/helpers/Ensure.ts
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asserts that `condition` is truthy, acting as a TypeScript assertion function.
|
|
3
|
+
* Throws an `Error` with the given message if the condition is falsy.
|
|
4
|
+
* @param condition - The value to assert.
|
|
5
|
+
* @param message - Optional error message (default `'Check failed'`).
|
|
6
|
+
*/
|
|
1
7
|
export function ensure(condition: unknown, message = 'Check failed'): asserts condition {
|
|
2
8
|
if (!condition) throw new Error(message);
|
|
3
9
|
}
|
|
4
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Asserts strict equality between `actual` and `expected`.
|
|
13
|
+
* Throws a descriptive `Error` (optionally prefixed by `label`) if they differ.
|
|
14
|
+
* @param actual - The value produced.
|
|
15
|
+
* @param expected - The value expected.
|
|
16
|
+
* @param label - Optional prefix for the error message.
|
|
17
|
+
*/
|
|
5
18
|
export function ensureEqual<T>(actual: T, expected: T, label?: string) {
|
|
6
19
|
if (actual !== expected) {
|
|
7
20
|
throw new Error(label ? `${label}: expected ${expected}, got ${actual}` : `expected ${expected}, got ${actual}`);
|
package/helpers/FlightTracker.ts
CHANGED
|
@@ -1,22 +1,54 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { testwiseConfig } from '../services/ConfigBuilder.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Tracks in-flight XHR requests made by the Thinkwise application and blocks
|
|
6
|
+
* test execution until the network has been idle for a short stability window.
|
|
7
|
+
*
|
|
8
|
+
* **Why this exists:** The Thinkwise Platform performs fire-and-forget XHR calls
|
|
9
|
+
* for things like navigation, saves, and data loads. Raw Playwright `waitFor*`
|
|
10
|
+
* helpers don't know about these — tests that proceed too early will act on
|
|
11
|
+
* stale data or a half-rendered screen. `FlightTracker` listens to every
|
|
12
|
+
* request/response cycle and exposes `waitToContinue()` which returns only
|
|
13
|
+
* once all tracked requests have finished AND the page has been quiet for at
|
|
14
|
+
* least `stabilityTime` milliseconds.
|
|
15
|
+
*
|
|
16
|
+
* **How to use it in tests:** You don't — it is wired up automatically inside
|
|
17
|
+
* `SubjectNavigator.navigateTo()`, `ClickOverride`, and `FillOverride`. You
|
|
18
|
+
* only need to know it exists if you are writing a new page-extension or
|
|
19
|
+
* override that performs navigation.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // Inside a page-override or page-extension:
|
|
23
|
+
* const tracker = new FlightTracker();
|
|
24
|
+
* page.on('request', req => tracker.handleRequestStarted(req.url(), req.resourceType()));
|
|
25
|
+
* page.on('response', res => tracker.handleRequestFinished(res.request().url()));
|
|
26
|
+
* await myAction();
|
|
27
|
+
* await tracker.waitToContinue();
|
|
28
|
+
*/
|
|
29
|
+
const minTimeout = 30000;
|
|
30
|
+
const timeout = Math.max(testwiseConfig().get<number>('featureSettings.InflightRequests.waitTimeout') ?? 0, minTimeout);
|
|
31
|
+
|
|
5
32
|
const stabilityTime = 150;
|
|
6
33
|
|
|
7
34
|
export class FlightTracker {
|
|
8
35
|
public requestsInFlight: number = 0;
|
|
9
|
-
private activeRequests = new
|
|
36
|
+
private activeRequests = new Map<string, number>();
|
|
10
37
|
public eventEmitter: EventEmitter = new EventEmitter();
|
|
11
38
|
|
|
12
39
|
/**
|
|
13
|
-
*
|
|
40
|
+
* Returns true for XHR requests that should block test execution.
|
|
41
|
+
* Filters out non-XHR traffic and known noise endpoints.
|
|
14
42
|
*/
|
|
15
|
-
public isEssentialRequest(url: string): boolean {
|
|
43
|
+
public isEssentialRequest(url: string, resourceType: string): boolean {
|
|
44
|
+
if (resourceType !== 'xhr') return false;
|
|
45
|
+
|
|
16
46
|
const noisePatterns = [
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
47
|
+
'/detect_change(',
|
|
48
|
+
'/set_gui_start_use_log_session',
|
|
49
|
+
'download_icon',
|
|
50
|
+
'download_list_bar_grp_icon',
|
|
51
|
+
'download_form_next_grp_icon',
|
|
20
52
|
'/badge()',
|
|
21
53
|
'universal_background_picture',
|
|
22
54
|
'i_ui_theme'
|
|
@@ -25,17 +57,44 @@ export class FlightTracker {
|
|
|
25
57
|
return !noisePatterns.some((pattern) => url.includes(pattern));
|
|
26
58
|
}
|
|
27
59
|
|
|
28
|
-
public handleRequestStarted = (url: string) => {
|
|
29
|
-
if (this.isEssentialRequest(url)) {
|
|
30
|
-
this.activeRequests.
|
|
31
|
-
this.
|
|
60
|
+
public handleRequestStarted = (url: string, resourceType: string) => {
|
|
61
|
+
if (this.isEssentialRequest(url, resourceType)) {
|
|
62
|
+
const wasIdle = this.activeRequests.size === 0;
|
|
63
|
+
this.activeRequests.set(url, (this.activeRequests.get(url) ?? 0) + 1);
|
|
64
|
+
this.requestsInFlight++;
|
|
65
|
+
if (wasIdle) this.eventEmitter.emit('active');
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
public reset = (): void => {
|
|
70
|
+
this.activeRequests.clear();
|
|
71
|
+
this.requestsInFlight = 0;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
public handleRequestFailed = (url: string) => {
|
|
75
|
+
const count = this.activeRequests.get(url);
|
|
76
|
+
if (count !== undefined) {
|
|
77
|
+
if (count <= 1) {
|
|
78
|
+
this.activeRequests.delete(url);
|
|
79
|
+
} else {
|
|
80
|
+
this.activeRequests.set(url, count - 1);
|
|
81
|
+
}
|
|
82
|
+
this.requestsInFlight = Math.max(0, this.requestsInFlight - 1);
|
|
83
|
+
if (this.requestsInFlight === 0) {
|
|
84
|
+
this.eventEmitter.emit('idle');
|
|
85
|
+
}
|
|
32
86
|
}
|
|
33
87
|
};
|
|
34
88
|
|
|
35
89
|
public handleRequestFinished = (url: string) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
90
|
+
const count = this.activeRequests.get(url);
|
|
91
|
+
if (count !== undefined) {
|
|
92
|
+
if (count <= 1) {
|
|
93
|
+
this.activeRequests.delete(url);
|
|
94
|
+
} else {
|
|
95
|
+
this.activeRequests.set(url, count - 1);
|
|
96
|
+
}
|
|
97
|
+
this.requestsInFlight = Math.max(0, this.requestsInFlight - 1);
|
|
39
98
|
if (this.requestsInFlight === 0) {
|
|
40
99
|
this.eventEmitter.emit('idle');
|
|
41
100
|
}
|
|
@@ -64,14 +123,14 @@ export class FlightTracker {
|
|
|
64
123
|
this.eventEmitter.on('idle', checkIdle);
|
|
65
124
|
});
|
|
66
125
|
|
|
67
|
-
const timeoutPromise = new Promise<void>((
|
|
126
|
+
const timeoutPromise = new Promise<void>((resolve) => {
|
|
68
127
|
timeoutId = setTimeout(() => {
|
|
69
|
-
const pending = Array.from(this.activeRequests).join('\n -> ');
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
`Timeout waiting for ${this.requestsInFlight} requests to complete (${timeout}ms).\nPending Essential Requests:\n -> ${pending}`
|
|
73
|
-
)
|
|
128
|
+
const pending = Array.from(this.activeRequests.keys()).join('\n -> ');
|
|
129
|
+
console.warn(
|
|
130
|
+
`FlightTracker: timed out after ${timeout}ms waiting for ${this.requestsInFlight} request(s) to complete.\nPending Essential Requests:\n -> ${pending}\nContinuing test execution.`
|
|
74
131
|
);
|
|
132
|
+
this.reset();
|
|
133
|
+
resolve();
|
|
75
134
|
}, timeout);
|
|
76
135
|
});
|
|
77
136
|
|
|
@@ -83,4 +142,34 @@ export class FlightTracker {
|
|
|
83
142
|
this.eventEmitter.removeAllListeners('idle');
|
|
84
143
|
}
|
|
85
144
|
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* For use after hash-based SPA navigation. Waits for the SPA to begin firing
|
|
148
|
+
* XHR requests (within `spaStartupTimeout`), then waits for all of them to
|
|
149
|
+
* settle. If no requests appear within the startup window the page is
|
|
150
|
+
* considered already loaded.
|
|
151
|
+
*/
|
|
152
|
+
public waitForNavigationToSettle = async (spaStartupTimeout = 3000): Promise<void> => {
|
|
153
|
+
if (this.requestsInFlight > 0) {
|
|
154
|
+
return this.waitToContinue();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
await new Promise<void>((resolve) => {
|
|
158
|
+
const timer = setTimeout(() => {
|
|
159
|
+
this.eventEmitter.off('active', onActive);
|
|
160
|
+
resolve();
|
|
161
|
+
}, spaStartupTimeout);
|
|
162
|
+
|
|
163
|
+
const onActive = () => {
|
|
164
|
+
clearTimeout(timer);
|
|
165
|
+
resolve();
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
this.eventEmitter.once('active', onActive);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
if (this.requestsInFlight > 0) {
|
|
172
|
+
await this.waitToContinue();
|
|
173
|
+
}
|
|
174
|
+
};
|
|
86
175
|
}
|
|
@@ -2,6 +2,19 @@ import { EventEmitter } from 'node:events';
|
|
|
2
2
|
import type { Page, Response } from '@playwright/test';
|
|
3
3
|
import { testwiseConfig } from '../services/ConfigBuilder.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Waits for a specific response URL pattern before allowing test execution
|
|
7
|
+
* to continue. Used when you need to block until a known async API response
|
|
8
|
+
* has arrived, as opposed to waiting for XHR idle (which `FlightTracker` does).
|
|
9
|
+
*
|
|
10
|
+
* Attached to the page as `page.waitEventHandler` by the `WaitEventHandler`
|
|
11
|
+
* page extension. Call `page.waitEventHandler.waitForUrl(pattern)` to block
|
|
12
|
+
* until a response matching that URL has been received.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // Wait for a specific background endpoint before asserting:
|
|
16
|
+
* await page.waitEventHandler.waitForUrl('/api/employees/load');
|
|
17
|
+
*/
|
|
5
18
|
export class GlobalWaitEventHandler {
|
|
6
19
|
private _canContinue: boolean = true;
|
|
7
20
|
private _eventEmitter: EventEmitter = new EventEmitter();
|
package/helpers/LoginHelper.ts
CHANGED
|
@@ -9,10 +9,22 @@ import { pollUntil } from './Poll.js';
|
|
|
9
9
|
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
const configFixture = JSON.parse(fs.readFileSync(path.resolve(dirname, '../../config.json'), 'utf-8'));
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Handles authentication against the Thinkwise Indicium API and the
|
|
14
|
+
* web application login screen.
|
|
15
|
+
*
|
|
16
|
+
* Exposed on the page fixture via `LoginFeatures` as `page.logIn()`,
|
|
17
|
+
* `page.logInWithCredentials()`, `page.logInWithOptions()`, and `page.logOut()`.
|
|
18
|
+
* You do not instantiate `LoginHelper` directly in tests.
|
|
19
|
+
*
|
|
20
|
+
* Credentials are read from `Testwise.json` (`environmentSettings.username`
|
|
21
|
+
* and `environmentSettings.password`) by default, and can be overridden
|
|
22
|
+
* per-call via `logInWithCredentials()` or `logInWithOptions()`.
|
|
23
|
+
*/
|
|
12
24
|
export class LoginHelper {
|
|
13
25
|
private _page: Page;
|
|
14
|
-
protected serviceUrl = String(testwiseConfig().get('environmentSettings.serviceUrl'));
|
|
15
|
-
protected metaEndpoint = String(testwiseConfig().get('environmentSettings.metaEndpoint'));
|
|
26
|
+
protected serviceUrl = String(testwiseConfig().get('environmentSettings.serviceUrl')).replace(/\/+$/, '');
|
|
27
|
+
protected metaEndpoint = String(testwiseConfig().get('environmentSettings.metaEndpoint')).replace(/\/+$/, '');
|
|
16
28
|
|
|
17
29
|
constructor(page: Page) {
|
|
18
30
|
if (!this.serviceUrl || this.serviceUrl === 'undefined') throw new Error('Service URL not found');
|
|
@@ -56,20 +68,23 @@ export class LoginHelper {
|
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
/**
|
|
59
|
-
* Navigate to the home page and wait for the menu to load
|
|
71
|
+
* Navigate to the home page and wait for the menu to load.
|
|
60
72
|
*/
|
|
61
73
|
private async navigateHomeAndWaitForMenuToLoad() {
|
|
62
|
-
const baseUrl = testwiseConfig().get<string>('environmentSettings.baseUrl');
|
|
74
|
+
const baseUrl = testwiseConfig().get<string>('environmentSettings.baseUrl')?.replace(/\/+$/, '');
|
|
75
|
+
const minimumTimeout = 60000;
|
|
76
|
+
|
|
63
77
|
if (!baseUrl) {
|
|
64
78
|
throw new Error('Base URL is not defined in the configuration.');
|
|
65
79
|
}
|
|
66
|
-
await this._page.goto(baseUrl);
|
|
67
80
|
|
|
68
|
-
|
|
69
|
-
route.continue();
|
|
70
|
-
});
|
|
81
|
+
let timeout = Number(testwiseConfig().get<string | number>('featureSettings.other.loginTimeout') ?? minimumTimeout);
|
|
71
82
|
|
|
72
|
-
|
|
83
|
+
if (Number.isNaN(timeout) || timeout < minimumTimeout) {
|
|
84
|
+
timeout = minimumTimeout;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
await this._page.goto(baseUrl);
|
|
73
88
|
|
|
74
89
|
await pollUntil(async () => this._page.url().includes('#application='), {
|
|
75
90
|
timeout,
|
|
@@ -93,8 +108,8 @@ export class LoginHelper {
|
|
|
93
108
|
}
|
|
94
109
|
|
|
95
110
|
if (serviceUrl && metaEndpoint) {
|
|
96
|
-
this.serviceUrl = serviceUrl;
|
|
97
|
-
this.metaEndpoint = metaEndpoint;
|
|
111
|
+
this.serviceUrl = serviceUrl.replace(/\/+$/, '');
|
|
112
|
+
this.metaEndpoint = metaEndpoint.replace(/\/+$/, '');
|
|
98
113
|
}
|
|
99
114
|
|
|
100
115
|
const response = await this._page.request.post(`${this.serviceUrl}/account/api/login`, {
|
|
@@ -171,6 +186,10 @@ export class LoginHelper {
|
|
|
171
186
|
});
|
|
172
187
|
}
|
|
173
188
|
|
|
189
|
+
/**
|
|
190
|
+
* Logs out the current session by POSTing to the logout endpoint (accepts 204 or 401
|
|
191
|
+
* as valid responses), then clears all browser cookies.
|
|
192
|
+
*/
|
|
174
193
|
public async logOut() {
|
|
175
194
|
const response = await this._page.request.post(`${this.serviceUrl}/account/api/logout`);
|
|
176
195
|
|
|
@@ -188,6 +207,14 @@ export class UserPreferences {
|
|
|
188
207
|
public readonly guiApplAlias = String(testwiseConfig().get<string>('environmentSettings.guiApplAlias'));
|
|
189
208
|
public readonly url: string;
|
|
190
209
|
|
|
210
|
+
/**
|
|
211
|
+
* Initialises the `UserPreferences` service, resolving the service URL, meta endpoint,
|
|
212
|
+
* and GUI application alias from config (overridable via optional parameters) and
|
|
213
|
+
* constructing the full Indicium endpoint URL.
|
|
214
|
+
* @param requestContext - The Playwright `Page` used to make API requests.
|
|
215
|
+
* @param serviceUrl - Optional override for the service URL from config.
|
|
216
|
+
* @param metaEndpoint - Optional override for the meta endpoint from config.
|
|
217
|
+
*/
|
|
191
218
|
constructor(requestContext: Page, serviceUrl?: string, metaEndpoint?: string) {
|
|
192
219
|
this._page = requestContext;
|
|
193
220
|
|
|
@@ -198,9 +225,14 @@ export class UserPreferences {
|
|
|
198
225
|
if (!metaEndpoint) throw new Error('Meta endpoint not found or is empty');
|
|
199
226
|
if (!this.guiApplAlias) throw new Error('GUI application alias not found or is empty');
|
|
200
227
|
|
|
201
|
-
this.url = `${serviceUrl}/${metaEndpoint}/${this.guiApplAlias}`;
|
|
228
|
+
this.url = `${serviceUrl.replace(/\/+$/, '')}/${metaEndpoint.replace(/\/+$/, '')}/${this.guiApplAlias}`;
|
|
202
229
|
}
|
|
203
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Activates a specific user preference configuration for the current session by POSTing
|
|
233
|
+
* to the `set_up_configuration` endpoint with the given configuration ID.
|
|
234
|
+
* @param upConfigurationId - The ID of the user preference configuration to activate.
|
|
235
|
+
*/
|
|
204
236
|
public async run(upConfigurationId: number) {
|
|
205
237
|
const fullUrl = `${this.url}/set_up_configuration`;
|
|
206
238
|
|
|
@@ -211,6 +243,11 @@ export class UserPreferences {
|
|
|
211
243
|
await this._page.request.post(fullUrl, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, data });
|
|
212
244
|
}
|
|
213
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Disables all active user preferences for the current session by POSTing to the
|
|
248
|
+
* `disable_up` endpoint.
|
|
249
|
+
* @returns The raw Playwright `APIResponse`.
|
|
250
|
+
*/
|
|
214
251
|
public async disable(): Promise<APIResponse> {
|
|
215
252
|
const fullUrl = `${this.url}/disable_up`;
|
|
216
253
|
|