@thinkwise/testwise 0.2.67 → 0.2.103
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 +35 -2
- 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 +18 -1
- 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 +40 -1
- package/controls/FormComboBox.ts +30 -0
- package/controls/GridColumnControl.ts +34 -3
- package/controls/InputFieldControl.ts +49 -0
- package/controls/LookupDropdown.ts +29 -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 +17 -4
- package/dist/components/filter/ExcelStyleFilterPopup.js +35 -23
- package/dist/components/filter/ExcelStyleFilterPopup.js.map +1 -1
- package/dist/components/filter/ExcelStyleFilterPopupObjects.d.ts +1 -1
- package/dist/components/filter/ExcelStyleFilterPopupObjects.js +2 -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 +17 -0
- package/dist/components/grid/Grid.js +18 -1
- package/dist/components/grid/Grid.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 +39 -0
- package/dist/controls/DateControl.js +18 -1
- package/dist/controls/DateControl.js.map +1 -1
- package/dist/controls/FormComboBox.d.ts +30 -0
- package/dist/controls/FormComboBox.js +8 -0
- package/dist/controls/FormComboBox.js.map +1 -1
- package/dist/controls/GridColumnControl.d.ts +30 -0
- package/dist/controls/GridColumnControl.js +12 -3
- package/dist/controls/GridColumnControl.js.map +1 -1
- package/dist/controls/InputFieldControl.d.ts +49 -0
- package/dist/controls/InputFieldControl.js +30 -0
- package/dist/controls/InputFieldControl.js.map +1 -1
- package/dist/controls/LookupDropdown.d.ts +29 -0
- package/dist/controls/LookupDropdown.js +8 -0
- package/dist/controls/LookupDropdown.js.map +1 -1
- 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 +56 -61
- 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
|
@@ -52,6 +52,14 @@ class LookupDropdown {
|
|
|
52
52
|
.waitForFunction((el) => document.activeElement === el, await this._objects.input().elementHandle());
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Creates an `ILookupDropdown` proxy that intercepts named `LookupDropdown` methods from
|
|
57
|
+
* the class prototype and falls back to the base `Locator` for everything else, effectively
|
|
58
|
+
* merging the typed dropdown interface with standard Playwright locator capabilities.
|
|
59
|
+
* @param context - The parent locator to scope the control within.
|
|
60
|
+
* @param id - The field identifier used to build the scoped locator.
|
|
61
|
+
* @returns A proxy combining `ILookupDropdownCore` methods and `Locator` capabilities.
|
|
62
|
+
*/
|
|
55
63
|
export function createLookupDropdown(context, id) {
|
|
56
64
|
const dropdown = new LookupDropdown(context, id);
|
|
57
65
|
const customProps = new Set(Object.getOwnPropertyNames(LookupDropdown.prototype).filter((p) => p !== 'constructor'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LookupDropdown.js","sourceRoot":"","sources":["../../controls/LookupDropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"LookupDropdown.js","sourceRoot":"","sources":["../../controls/LookupDropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE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ACN,eAAe,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,KAAK,EAAE,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,aAAa,EAAE,CAAC,CAAC;IACzG,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAgB,EAAE,EAAU;IAC/D,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,mBAAmB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC;IAErH,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE;QACxB,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;YACxB,IAAI,WAAW,CAAC,GAAG,CAAC,IAAc,CAAC,EAAE,CAAC;gBACpC,MAAM,KAAK,GAAI,QAAgB,CAAC,IAAI,CAAC,CAAC;gBACtC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;oBAChC,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC9B,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC7C,CAAC;KACF,CAA+B,CAAC;AACnC,CAAC"}
|
|
@@ -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 declare enum KnownElementTypes {
|
|
2
20
|
Field = "field",
|
|
3
21
|
Dropdown = "dropdown",
|
|
@@ -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 var KnownElementTypes;
|
|
2
20
|
(function (KnownElementTypes) {
|
|
3
21
|
KnownElementTypes["Field"] = "field";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementTypes.js","sourceRoot":"","sources":["../../enums/ElementTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,2CAAsB,CAAA;IACtB,+CAA0B,CAAA;AAC5B,CAAC,EATW,iBAAiB,KAAjB,iBAAiB,QAS5B"}
|
|
1
|
+
{"version":3,"file":"ElementTypes.js","sourceRoot":"","sources":["../../enums/ElementTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,2CAAsB,CAAA;IACtB,+CAA0B,CAAA;AAC5B,CAAC,EATW,iBAAiB,KAAjB,iBAAiB,QAS5B"}
|
|
@@ -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 declare enum ExportFormat {
|
|
2
10
|
CSV = "csv",
|
|
3
11
|
XLSX = "xlsx",
|
|
@@ -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 var ExportFormat;
|
|
2
10
|
(function (ExportFormat) {
|
|
3
11
|
ExportFormat["CSV"] = "csv";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportFormat.js","sourceRoot":"","sources":["../../enums/ExportFormat.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,2BAAW,CAAA;AACb,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
|
1
|
+
{"version":3,"file":"ExportFormat.js","sourceRoot":"","sources":["../../enums/ExportFormat.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,2BAAW,CAAA;AACb,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
package/dist/enums/LogLevel.d.ts
CHANGED
|
@@ -1,7 +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 declare enum LogLevel {
|
|
14
|
+
/** Only critical failures. Use in CI environments where log noise must be minimal. */
|
|
2
15
|
ERROR = "ERROR",
|
|
16
|
+
/** Errors and recoverable warnings. Good default for most pipelines. */
|
|
3
17
|
WARN = "WARN",
|
|
18
|
+
/** Errors, warnings, and informational messages about what the test is doing. Recommended for local development. */
|
|
4
19
|
INFO = "INFO",
|
|
20
|
+
/** Full verbose output including internal state changes. Use when diagnosing hard-to-reproduce failures. */
|
|
5
21
|
DEBUG = "DEBUG",
|
|
22
|
+
/** Everything. Includes low-level log entries that are normally filtered out. */
|
|
6
23
|
ALL = "ALL"
|
|
7
24
|
}
|
package/dist/enums/LogLevel.js
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
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 var LogLevel;
|
|
2
14
|
(function (LogLevel) {
|
|
3
|
-
|
|
15
|
+
/** Only critical failures. Use in CI environments where log noise must be minimal. */
|
|
4
16
|
LogLevel["ERROR"] = "ERROR";
|
|
17
|
+
/** Errors and recoverable warnings. Good default for most pipelines. */
|
|
5
18
|
LogLevel["WARN"] = "WARN";
|
|
19
|
+
/** Errors, warnings, and informational messages about what the test is doing. Recommended for local development. */
|
|
6
20
|
LogLevel["INFO"] = "INFO";
|
|
21
|
+
/** Full verbose output including internal state changes. Use when diagnosing hard-to-reproduce failures. */
|
|
7
22
|
LogLevel["DEBUG"] = "DEBUG";
|
|
23
|
+
/** Everything. Includes low-level log entries that are normally filtered out. */
|
|
8
24
|
LogLevel["ALL"] = "ALL";
|
|
9
25
|
})(LogLevel || (LogLevel = {}));
|
|
10
26
|
//# sourceMappingURL=LogLevel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogLevel.js","sourceRoot":"","sources":["../../enums/LogLevel.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"LogLevel.js","sourceRoot":"","sources":["../../enums/LogLevel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAN,IAAY,QAWX;AAXD,WAAY,QAAQ;IAClB,sFAAsF;IACtF,2BAAe,CAAA;IACf,wEAAwE;IACxE,yBAAa,CAAA;IACb,oHAAoH;IACpH,yBAAa,CAAA;IACb,4GAA4G;IAC5G,2BAAe,CAAA;IACf,iFAAiF;IACjF,uBAAW,CAAA;AACb,CAAC,EAXW,QAAQ,KAAR,QAAQ,QAWnB"}
|
package/dist/enums/index.d.ts
CHANGED
package/dist/enums/index.js
CHANGED
package/dist/enums/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verifies that the consuming project's Testwise configuration is valid and
|
|
3
|
+
* reachable before the artifact pipeline is allowed to run.
|
|
4
|
+
*
|
|
5
|
+
* **Why this exists:** The artifact-builder fetches live model data from the
|
|
6
|
+
* Thinkwise Indicium API. If the API URL or credentials in `Testwise.json`
|
|
7
|
+
* are wrong, the pipeline fails mid-way with a cryptic network error.
|
|
8
|
+
* `ConfigChecker` performs a lightweight connectivity probe upfront so the
|
|
9
|
+
* pipeline can give a clear "cannot connect" error message instead.
|
|
10
|
+
*
|
|
11
|
+
* **When it is called:** Automatically by `ArtifactManager` at the start of
|
|
12
|
+
* every `testwise sync` run. You do not need to call it manually.
|
|
13
|
+
*/
|
|
1
14
|
export declare class ConfigChecker {
|
|
2
15
|
hasValidModelBuilderConfig(): Promise<boolean>;
|
|
3
16
|
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { indiciumApi } from '../services/IndiciumApi.service.js';
|
|
2
|
+
/**
|
|
3
|
+
* Verifies that the consuming project's Testwise configuration is valid and
|
|
4
|
+
* reachable before the artifact pipeline is allowed to run.
|
|
5
|
+
*
|
|
6
|
+
* **Why this exists:** The artifact-builder fetches live model data from the
|
|
7
|
+
* Thinkwise Indicium API. If the API URL or credentials in `Testwise.json`
|
|
8
|
+
* are wrong, the pipeline fails mid-way with a cryptic network error.
|
|
9
|
+
* `ConfigChecker` performs a lightweight connectivity probe upfront so the
|
|
10
|
+
* pipeline can give a clear "cannot connect" error message instead.
|
|
11
|
+
*
|
|
12
|
+
* **When it is called:** Automatically by `ArtifactManager` at the start of
|
|
13
|
+
* every `testwise sync` run. You do not need to call it manually.
|
|
14
|
+
*/
|
|
2
15
|
export class ConfigChecker {
|
|
3
16
|
async hasValidModelBuilderConfig() {
|
|
4
17
|
return await indiciumApi.canConnectToProject();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigChecker.js","sourceRoot":"","sources":["../../helpers/ConfigChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,MAAM,OAAO,aAAa;IACjB,KAAK,CAAC,0BAA0B;QACrC,OAAO,MAAM,WAAW,CAAC,mBAAmB,EAAE,CAAC;IACjD,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"ConfigChecker.js","sourceRoot":"","sources":["../../helpers/ConfigChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,aAAa;IACjB,KAAK,CAAC,0BAA0B;QACrC,OAAO,MAAM,WAAW,CAAC,mBAAmB,EAAE,CAAC;IACjD,CAAC;CACF"}
|
package/dist/helpers/Ensure.d.ts
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
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 declare function ensure(condition: unknown, message?: string): asserts condition;
|
|
8
|
+
/**
|
|
9
|
+
* Asserts strict equality between `actual` and `expected`.
|
|
10
|
+
* Throws a descriptive `Error` (optionally prefixed by `label`) if they differ.
|
|
11
|
+
* @param actual - The value produced.
|
|
12
|
+
* @param expected - The value expected.
|
|
13
|
+
* @param label - Optional prefix for the error message.
|
|
14
|
+
*/
|
|
2
15
|
export declare function ensureEqual<T>(actual: T, expected: T, label?: string): void;
|
package/dist/helpers/Ensure.js
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, message = 'Check failed') {
|
|
2
8
|
if (!condition)
|
|
3
9
|
throw new Error(message);
|
|
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(actual, expected, label) {
|
|
6
19
|
if (actual !== expected) {
|
|
7
20
|
throw new Error(label ? `${label}: expected ${expected}, got ${actual}` : `expected ${expected}, got ${actual}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ensure.js","sourceRoot":"","sources":["../../helpers/Ensure.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,SAAkB,EAAE,OAAO,GAAG,cAAc;IACjE,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,MAAS,EAAE,QAAW,EAAE,KAAc;IACnE,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,cAAc,QAAQ,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC,YAAY,QAAQ,SAAS,MAAM,EAAE,CAAC,CAAC;IACnH,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"Ensure.js","sourceRoot":"","sources":["../../helpers/Ensure.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,SAAkB,EAAE,OAAO,GAAG,cAAc;IACjE,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAI,MAAS,EAAE,QAAW,EAAE,KAAc;IACnE,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,cAAc,QAAQ,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC,YAAY,QAAQ,SAAS,MAAM,EAAE,CAAC,CAAC;IACnH,CAAC;AACH,CAAC"}
|
|
@@ -4,10 +4,20 @@ export declare class FlightTracker {
|
|
|
4
4
|
private activeRequests;
|
|
5
5
|
eventEmitter: EventEmitter;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Returns true for XHR requests that should block test execution.
|
|
8
|
+
* Filters out non-XHR traffic and known noise endpoints.
|
|
8
9
|
*/
|
|
9
|
-
isEssentialRequest(url: string): boolean;
|
|
10
|
-
handleRequestStarted: (url: string) => void;
|
|
10
|
+
isEssentialRequest(url: string, resourceType: string): boolean;
|
|
11
|
+
handleRequestStarted: (url: string, resourceType: string) => void;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
handleRequestFailed: (url: string) => void;
|
|
11
14
|
handleRequestFinished: (url: string) => void;
|
|
12
15
|
waitToContinue: () => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* For use after hash-based SPA navigation. Waits for the SPA to begin firing
|
|
18
|
+
* XHR requests (within `spaStartupTimeout`), then waits for all of them to
|
|
19
|
+
* settle. If no requests appear within the startup window the page is
|
|
20
|
+
* considered already loaded.
|
|
21
|
+
*/
|
|
22
|
+
waitForNavigationToSettle: (spaStartupTimeout?: number) => Promise<void>;
|
|
13
23
|
}
|
|
@@ -1,22 +1,76 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { testwiseConfig } from '../services/ConfigBuilder.js';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Tracks in-flight XHR requests made by the Thinkwise application and blocks
|
|
5
|
+
* test execution until the network has been idle for a short stability window.
|
|
6
|
+
*
|
|
7
|
+
* **Why this exists:** The Thinkwise Platform performs fire-and-forget XHR calls
|
|
8
|
+
* for things like navigation, saves, and data loads. Raw Playwright `waitFor*`
|
|
9
|
+
* helpers don't know about these — tests that proceed too early will act on
|
|
10
|
+
* stale data or a half-rendered screen. `FlightTracker` listens to every
|
|
11
|
+
* request/response cycle and exposes `waitToContinue()` which returns only
|
|
12
|
+
* once all tracked requests have finished AND the page has been quiet for at
|
|
13
|
+
* least `stabilityTime` milliseconds.
|
|
14
|
+
*
|
|
15
|
+
* **How to use it in tests:** You don't — it is wired up automatically inside
|
|
16
|
+
* `SubjectNavigator.navigateTo()`, `ClickOverride`, and `FillOverride`. You
|
|
17
|
+
* only need to know it exists if you are writing a new page-extension or
|
|
18
|
+
* override that performs navigation.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Inside a page-override or page-extension:
|
|
22
|
+
* const tracker = new FlightTracker();
|
|
23
|
+
* page.on('request', req => tracker.handleRequestStarted(req.url(), req.resourceType()));
|
|
24
|
+
* page.on('response', res => tracker.handleRequestFinished(res.request().url()));
|
|
25
|
+
* await myAction();
|
|
26
|
+
* await tracker.waitToContinue();
|
|
27
|
+
*/
|
|
28
|
+
const minTimeout = 30000;
|
|
29
|
+
const timeout = Math.max(testwiseConfig().get('featureSettings.InflightRequests.waitTimeout') ?? 0, minTimeout);
|
|
4
30
|
const stabilityTime = 150;
|
|
5
31
|
export class FlightTracker {
|
|
6
32
|
constructor() {
|
|
7
33
|
this.requestsInFlight = 0;
|
|
8
|
-
this.activeRequests = new
|
|
34
|
+
this.activeRequests = new Map();
|
|
9
35
|
this.eventEmitter = new EventEmitter();
|
|
10
|
-
this.handleRequestStarted = (url) => {
|
|
11
|
-
if (this.isEssentialRequest(url)) {
|
|
12
|
-
this.activeRequests.
|
|
13
|
-
this.
|
|
36
|
+
this.handleRequestStarted = (url, resourceType) => {
|
|
37
|
+
if (this.isEssentialRequest(url, resourceType)) {
|
|
38
|
+
const wasIdle = this.activeRequests.size === 0;
|
|
39
|
+
this.activeRequests.set(url, (this.activeRequests.get(url) ?? 0) + 1);
|
|
40
|
+
this.requestsInFlight++;
|
|
41
|
+
if (wasIdle)
|
|
42
|
+
this.eventEmitter.emit('active');
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
this.reset = () => {
|
|
46
|
+
this.activeRequests.clear();
|
|
47
|
+
this.requestsInFlight = 0;
|
|
48
|
+
};
|
|
49
|
+
this.handleRequestFailed = (url) => {
|
|
50
|
+
const count = this.activeRequests.get(url);
|
|
51
|
+
if (count !== undefined) {
|
|
52
|
+
if (count <= 1) {
|
|
53
|
+
this.activeRequests.delete(url);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.activeRequests.set(url, count - 1);
|
|
57
|
+
}
|
|
58
|
+
this.requestsInFlight = Math.max(0, this.requestsInFlight - 1);
|
|
59
|
+
if (this.requestsInFlight === 0) {
|
|
60
|
+
this.eventEmitter.emit('idle');
|
|
61
|
+
}
|
|
14
62
|
}
|
|
15
63
|
};
|
|
16
64
|
this.handleRequestFinished = (url) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
65
|
+
const count = this.activeRequests.get(url);
|
|
66
|
+
if (count !== undefined) {
|
|
67
|
+
if (count <= 1) {
|
|
68
|
+
this.activeRequests.delete(url);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.activeRequests.set(url, count - 1);
|
|
72
|
+
}
|
|
73
|
+
this.requestsInFlight = Math.max(0, this.requestsInFlight - 1);
|
|
20
74
|
if (this.requestsInFlight === 0) {
|
|
21
75
|
this.eventEmitter.emit('idle');
|
|
22
76
|
}
|
|
@@ -42,10 +96,12 @@ export class FlightTracker {
|
|
|
42
96
|
};
|
|
43
97
|
this.eventEmitter.on('idle', checkIdle);
|
|
44
98
|
});
|
|
45
|
-
const timeoutPromise = new Promise((
|
|
99
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
46
100
|
timeoutId = setTimeout(() => {
|
|
47
|
-
const pending = Array.from(this.activeRequests).join('\n -> ');
|
|
48
|
-
|
|
101
|
+
const pending = Array.from(this.activeRequests.keys()).join('\n -> ');
|
|
102
|
+
console.warn(`FlightTracker: timed out after ${timeout}ms waiting for ${this.requestsInFlight} request(s) to complete.\nPending Essential Requests:\n -> ${pending}\nContinuing test execution.`);
|
|
103
|
+
this.reset();
|
|
104
|
+
resolve();
|
|
49
105
|
}, timeout);
|
|
50
106
|
});
|
|
51
107
|
try {
|
|
@@ -58,15 +114,45 @@ export class FlightTracker {
|
|
|
58
114
|
this.eventEmitter.removeAllListeners('idle');
|
|
59
115
|
}
|
|
60
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* For use after hash-based SPA navigation. Waits for the SPA to begin firing
|
|
119
|
+
* XHR requests (within `spaStartupTimeout`), then waits for all of them to
|
|
120
|
+
* settle. If no requests appear within the startup window the page is
|
|
121
|
+
* considered already loaded.
|
|
122
|
+
*/
|
|
123
|
+
this.waitForNavigationToSettle = async (spaStartupTimeout = 3000) => {
|
|
124
|
+
if (this.requestsInFlight > 0) {
|
|
125
|
+
return this.waitToContinue();
|
|
126
|
+
}
|
|
127
|
+
await new Promise((resolve) => {
|
|
128
|
+
const timer = setTimeout(() => {
|
|
129
|
+
this.eventEmitter.off('active', onActive);
|
|
130
|
+
resolve();
|
|
131
|
+
}, spaStartupTimeout);
|
|
132
|
+
const onActive = () => {
|
|
133
|
+
clearTimeout(timer);
|
|
134
|
+
resolve();
|
|
135
|
+
};
|
|
136
|
+
this.eventEmitter.once('active', onActive);
|
|
137
|
+
});
|
|
138
|
+
if (this.requestsInFlight > 0) {
|
|
139
|
+
await this.waitToContinue();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
61
142
|
}
|
|
62
143
|
/**
|
|
63
|
-
*
|
|
144
|
+
* Returns true for XHR requests that should block test execution.
|
|
145
|
+
* Filters out non-XHR traffic and known noise endpoints.
|
|
64
146
|
*/
|
|
65
|
-
isEssentialRequest(url) {
|
|
147
|
+
isEssentialRequest(url, resourceType) {
|
|
148
|
+
if (resourceType !== 'xhr')
|
|
149
|
+
return false;
|
|
66
150
|
const noisePatterns = [
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'
|
|
151
|
+
'/detect_change(',
|
|
152
|
+
'/set_gui_start_use_log_session',
|
|
153
|
+
'download_icon',
|
|
154
|
+
'download_list_bar_grp_icon',
|
|
155
|
+
'download_form_next_grp_icon',
|
|
70
156
|
'/badge()',
|
|
71
157
|
'universal_background_picture',
|
|
72
158
|
'i_ui_theme'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlightTracker.js","sourceRoot":"","sources":["../../helpers/FlightTracker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OA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AC,CAAC,CAAC;YAEH,IAAI,IAAI,CAAC,gBAAgB,GAAG,CAAC,EAAE,CAAC;gBAC9B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IAxIC;;;OAGG;IACI,kBAAkB,CAAC,GAAW,EAAE,YAAoB;QACzD,IAAI,YAAY,KAAK,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzC,MAAM,aAAa,GAAG;YACpB,iBAAiB;YACjB,gCAAgC;YAChC,eAAe;YACf,4BAA4B;YAC5B,6BAA6B;YAC7B,UAAU;YACV,8BAA8B;YAC9B,YAAY;SACb,CAAC;QAEF,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IACjE,CAAC;CAqHF"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import type { Page } from '@playwright/test';
|
|
2
|
+
/**
|
|
3
|
+
* Waits for a specific response URL pattern before allowing test execution
|
|
4
|
+
* to continue. Used when you need to block until a known async API response
|
|
5
|
+
* has arrived, as opposed to waiting for XHR idle (which `FlightTracker` does).
|
|
6
|
+
*
|
|
7
|
+
* Attached to the page as `page.waitEventHandler` by the `WaitEventHandler`
|
|
8
|
+
* page extension. Call `page.waitEventHandler.waitForUrl(pattern)` to block
|
|
9
|
+
* until a response matching that URL has been received.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // Wait for a specific background endpoint before asserting:
|
|
13
|
+
* await page.waitEventHandler.waitForUrl('/api/employees/load');
|
|
14
|
+
*/
|
|
2
15
|
export declare class GlobalWaitEventHandler {
|
|
3
16
|
private _canContinue;
|
|
4
17
|
private _eventEmitter;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { testwiseConfig } from '../services/ConfigBuilder.js';
|
|
3
|
+
/**
|
|
4
|
+
* Waits for a specific response URL pattern before allowing test execution
|
|
5
|
+
* to continue. Used when you need to block until a known async API response
|
|
6
|
+
* has arrived, as opposed to waiting for XHR idle (which `FlightTracker` does).
|
|
7
|
+
*
|
|
8
|
+
* Attached to the page as `page.waitEventHandler` by the `WaitEventHandler`
|
|
9
|
+
* page extension. Call `page.waitEventHandler.waitForUrl(pattern)` to block
|
|
10
|
+
* until a response matching that URL has been received.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Wait for a specific background endpoint before asserting:
|
|
14
|
+
* await page.waitEventHandler.waitForUrl('/api/employees/load');
|
|
15
|
+
*/
|
|
3
16
|
export class GlobalWaitEventHandler {
|
|
4
17
|
constructor(page) {
|
|
5
18
|
this._canContinue = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalWaitEventHandler.js","sourceRoot":"","sources":["../../helpers/GlobalWaitEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,OAAO,sBAAsB;IAMjC,YAAY,IAAU;QALd,iBAAY,GAAY,IAAI,CAAC;QAC7B,kBAAa,GAAiB,IAAI,YAAY,EAAE,CAAC;QAEjD,aAAQ,GAAG,cAAc,EAAE,CAAC,GAAG,CAAS,8CAA8C,CAAC,IAAI,IAAI,CAAC;QAGtG,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE;YACrC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAEO,WAAW,CAAC,OAAsB,EAAE,OAAe;QACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC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,CAAC;QAE1B,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { APIResponse, Page } from '@playwright/test';
|
|
2
2
|
import type { UniversalLoginOptions } from '../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles authentication against the Thinkwise Indicium API and the
|
|
5
|
+
* web application login screen.
|
|
6
|
+
*
|
|
7
|
+
* Exposed on the page fixture via `LoginFeatures` as `page.logIn()`,
|
|
8
|
+
* `page.logInWithCredentials()`, `page.logInWithOptions()`, and `page.logOut()`.
|
|
9
|
+
* You do not instantiate `LoginHelper` directly in tests.
|
|
10
|
+
*
|
|
11
|
+
* Credentials are read from `Testwise.json` (`environmentSettings.username`
|
|
12
|
+
* and `environmentSettings.password`) by default, and can be overridden
|
|
13
|
+
* per-call via `logInWithCredentials()` or `logInWithOptions()`.
|
|
14
|
+
*/
|
|
3
15
|
export declare class LoginHelper {
|
|
4
16
|
private _page;
|
|
5
17
|
protected serviceUrl: string;
|
|
@@ -22,7 +34,7 @@ export declare class LoginHelper {
|
|
|
22
34
|
*/
|
|
23
35
|
logInWithOptions(options: UniversalLoginOptions): Promise<void>;
|
|
24
36
|
/**
|
|
25
|
-
* Navigate to the home page and wait for the menu to load
|
|
37
|
+
* Navigate to the home page and wait for the menu to load.
|
|
26
38
|
*/
|
|
27
39
|
private navigateHomeAndWaitForMenuToLoad;
|
|
28
40
|
/**
|
|
@@ -35,13 +47,35 @@ export declare class LoginHelper {
|
|
|
35
47
|
* @param options - The configuration options
|
|
36
48
|
*/
|
|
37
49
|
private configureApplication;
|
|
50
|
+
/**
|
|
51
|
+
* Logs out the current session by POSTing to the logout endpoint (accepts 204 or 401
|
|
52
|
+
* as valid responses), then clears all browser cookies.
|
|
53
|
+
*/
|
|
38
54
|
logOut(): Promise<void>;
|
|
39
55
|
}
|
|
40
56
|
export declare class UserPreferences {
|
|
41
57
|
private _page;
|
|
42
58
|
readonly guiApplAlias: string;
|
|
43
59
|
readonly url: string;
|
|
60
|
+
/**
|
|
61
|
+
* Initialises the `UserPreferences` service, resolving the service URL, meta endpoint,
|
|
62
|
+
* and GUI application alias from config (overridable via optional parameters) and
|
|
63
|
+
* constructing the full Indicium endpoint URL.
|
|
64
|
+
* @param requestContext - The Playwright `Page` used to make API requests.
|
|
65
|
+
* @param serviceUrl - Optional override for the service URL from config.
|
|
66
|
+
* @param metaEndpoint - Optional override for the meta endpoint from config.
|
|
67
|
+
*/
|
|
44
68
|
constructor(requestContext: Page, serviceUrl?: string, metaEndpoint?: string);
|
|
69
|
+
/**
|
|
70
|
+
* Activates a specific user preference configuration for the current session by POSTing
|
|
71
|
+
* to the `set_up_configuration` endpoint with the given configuration ID.
|
|
72
|
+
* @param upConfigurationId - The ID of the user preference configuration to activate.
|
|
73
|
+
*/
|
|
45
74
|
run(upConfigurationId: number): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Disables all active user preferences for the current session by POSTing to the
|
|
77
|
+
* `disable_up` endpoint.
|
|
78
|
+
* @returns The raw Playwright `APIResponse`.
|
|
79
|
+
*/
|
|
46
80
|
disable(): Promise<APIResponse>;
|
|
47
81
|
}
|