@thinkwise/testwise 0.2.67 → 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 +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 +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,12 +1,27 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
3
|
import { disabledScreenComponents, screenComponents } from '../types/Components.js';
|
|
4
|
+
import { PipelinePaths } from './helpers/PipelinePaths.js';
|
|
5
|
+
/**
|
|
6
|
+
* **Pipeline Step 5** — Post-processes the raw TypeScript interface files
|
|
7
|
+
* emitted by `InterfaceGenerator` (quicktype) to make them usable as
|
|
8
|
+
* Testwise screen contracts.
|
|
9
|
+
*
|
|
10
|
+
* **What it does:**
|
|
11
|
+
* - Removes the `Locator` base interface that quicktype adds (not needed here).
|
|
12
|
+
* - Strips placeholder interfaces for component types that Testwise does not
|
|
13
|
+
* yet support (see `disabledScreenComponents`).
|
|
14
|
+
* - Merges multiple `Tab` component interfaces into one to avoid duplicates.
|
|
15
|
+
* - Adds the generated screen interface as an export to `screens/index.ts`.
|
|
16
|
+
*
|
|
17
|
+
* **When it runs:** Step 5 of `testwise sync`, immediately after
|
|
18
|
+
* `InterfaceGenerator` has written the raw quicktype output.
|
|
19
|
+
*/
|
|
5
20
|
export class ScreenInterfaceRefiner {
|
|
6
|
-
constructor() {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
this.
|
|
21
|
+
constructor(paths) {
|
|
22
|
+
const p = paths ?? new PipelinePaths();
|
|
23
|
+
this._screensDirectory = p.screens;
|
|
24
|
+
this._screensIndexPath = p.screensIndex;
|
|
10
25
|
}
|
|
11
26
|
refine() {
|
|
12
27
|
const screenFiles = this.getAllScreenInterfaceFiles();
|
|
@@ -30,8 +45,7 @@ export class ScreenInterfaceRefiner {
|
|
|
30
45
|
screen.content = screen.content.replace(/^\s*[\r\n]/gm, '');
|
|
31
46
|
}
|
|
32
47
|
indexScreenInterface(screenFile) {
|
|
33
|
-
|
|
34
|
-
let indexContent = fs.readFileSync(indexPath, 'utf-8');
|
|
48
|
+
let indexContent = fs.existsSync(this._screensIndexPath) ? fs.readFileSync(this._screensIndexPath, 'utf-8') : '';
|
|
35
49
|
const fileJS = screenFile.replace('.ts', '.js');
|
|
36
50
|
const exportLine = `export * from './${fileJS}';\n`;
|
|
37
51
|
if (!indexContent.includes(exportLine)) {
|
|
@@ -42,7 +56,7 @@ export class ScreenInterfaceRefiner {
|
|
|
42
56
|
}
|
|
43
57
|
lines.splice(insertPos, 0, exportLine.trim());
|
|
44
58
|
indexContent = lines.join('\n');
|
|
45
|
-
fs.writeFileSync(
|
|
59
|
+
fs.writeFileSync(this._screensIndexPath, indexContent, 'utf-8');
|
|
46
60
|
}
|
|
47
61
|
}
|
|
48
62
|
formatContent(screen) {
|
|
@@ -114,7 +128,7 @@ export class ScreenInterfaceRefiner {
|
|
|
114
128
|
return interfaces;
|
|
115
129
|
}
|
|
116
130
|
getAllScreenInterfaceFiles() {
|
|
117
|
-
return fs.readdirSync(this._screensDirectory).filter((f) => f.endsWith('.ts'));
|
|
131
|
+
return fs.readdirSync(this._screensDirectory).filter((f) => f.endsWith('.ts') && f !== 'index.ts');
|
|
118
132
|
}
|
|
119
133
|
}
|
|
120
134
|
//# sourceMappingURL=ScreenInterfaceRefiner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenInterfaceRefiner.js","sourceRoot":"","sources":["../../artifact-builder/ScreenInterfaceRefiner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAA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AM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAEO,cAAc,CAAC,OAAe;QACpC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAI,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEzC,OAAO,KAAK,KAAK,IAAI,EAAE,CAAC;YACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1B,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAEO,0BAA0B;QAChC,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,CAAC;IACrG,CAAC;CACF"}
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import type { ISubject } from '../interfaces/ISubject.js';
|
|
2
2
|
import type { SubjectComponents } from '../types/Components.js';
|
|
3
|
+
/**
|
|
4
|
+
* Produces the Playwright locator string and locator strategy (`getByTestId`,
|
|
5
|
+
* `locator`, etc.) for each field/column property in a generated subject class.
|
|
6
|
+
*
|
|
7
|
+
* **What it does:** Given a property's `control_type`, component type (Form or
|
|
8
|
+
* Grid), and the field identifier, `SelectorBuilder` returns the correct CSS
|
|
9
|
+
* selector fragment or test-id string that will be used in the generated
|
|
10
|
+
* `<Name>Objects.ts` file.
|
|
11
|
+
*
|
|
12
|
+
* For example:
|
|
13
|
+
* - A `Form` `lookup` field named `country_id` → `getByTestId('form-field__country_id__control__input')`
|
|
14
|
+
* - A `Grid` column named `status` → `locator('[col-id="status"]')`
|
|
15
|
+
*
|
|
16
|
+
* **For contributors:** If you are adding support for a new Thinkwise control
|
|
17
|
+
* type, this is the first place to update after `NamingHandler`.
|
|
18
|
+
*/
|
|
3
19
|
export declare class SelectorBuilder {
|
|
4
|
-
private _namingHandler;
|
|
5
|
-
constructor();
|
|
6
20
|
private determineSelectorSuffix;
|
|
7
21
|
private getDefaultPrefix;
|
|
8
22
|
private getDefaultSuffix;
|
|
9
|
-
getElementId(
|
|
10
|
-
getLocatorString(
|
|
23
|
+
getElementId(colId: string, componentName: SubjectComponents): string;
|
|
24
|
+
getLocatorString(colId: string, elementType: string, componentName: SubjectComponents): string;
|
|
11
25
|
private getLocatorType;
|
|
12
26
|
getPageContext(subject: ISubject): string;
|
|
13
27
|
}
|
|
14
|
-
export type LocatorType = 'locator' | 'getByTestId' | 'getByRole' | 'getByLabel' | 'getByPlaceholder' | 'getByText';
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { KnownElementTypes } from '../enums/ElementTypes.js';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Produces the Playwright locator string and locator strategy (`getByTestId`,
|
|
4
|
+
* `locator`, etc.) for each field/column property in a generated subject class.
|
|
5
|
+
*
|
|
6
|
+
* **What it does:** Given a property's `control_type`, component type (Form or
|
|
7
|
+
* Grid), and the field identifier, `SelectorBuilder` returns the correct CSS
|
|
8
|
+
* selector fragment or test-id string that will be used in the generated
|
|
9
|
+
* `<Name>Objects.ts` file.
|
|
10
|
+
*
|
|
11
|
+
* For example:
|
|
12
|
+
* - A `Form` `lookup` field named `country_id` → `getByTestId('form-field__country_id__control__input')`
|
|
13
|
+
* - A `Grid` column named `status` → `locator('[col-id="status"]')`
|
|
14
|
+
*
|
|
15
|
+
* **For contributors:** If you are adding support for a new Thinkwise control
|
|
16
|
+
* type, this is the first place to update after `NamingHandler`.
|
|
17
|
+
*/
|
|
3
18
|
export class SelectorBuilder {
|
|
4
|
-
|
|
5
|
-
this._namingHandler = new NamingHandler();
|
|
6
|
-
}
|
|
7
|
-
determineSelectorSuffix(property, componentName) {
|
|
19
|
+
determineSelectorSuffix(elementType, componentName) {
|
|
8
20
|
let selectorSuffix = null;
|
|
9
21
|
if (componentName === 'Form') {
|
|
10
|
-
if (
|
|
22
|
+
if (elementType === KnownElementTypes.Lookup) {
|
|
11
23
|
selectorSuffix = '__control__input';
|
|
12
24
|
}
|
|
13
|
-
else if (
|
|
25
|
+
else if (elementType === KnownElementTypes.Dropdown) {
|
|
14
26
|
selectorSuffix = '__select__input';
|
|
15
27
|
}
|
|
16
28
|
}
|
|
@@ -25,6 +37,7 @@ export class SelectorBuilder {
|
|
|
25
37
|
prefix = 'form-field__';
|
|
26
38
|
}
|
|
27
39
|
else {
|
|
40
|
+
/* v8 ignore next -- getDefaultPrefix throws first; getDefaultSuffix/getLocatorType are unreachable for the same input */
|
|
28
41
|
throw new Error(`Unsupported component type: ${componentName}`);
|
|
29
42
|
}
|
|
30
43
|
return prefix;
|
|
@@ -38,20 +51,21 @@ export class SelectorBuilder {
|
|
|
38
51
|
suffix = '__input';
|
|
39
52
|
}
|
|
40
53
|
else {
|
|
54
|
+
/* v8 ignore next -- same guard as getDefaultPrefix; unreachable in practice */
|
|
41
55
|
throw new Error(`Unsupported component type: ${componentName}`);
|
|
42
56
|
}
|
|
43
57
|
return suffix;
|
|
44
58
|
}
|
|
45
|
-
getElementId(
|
|
46
|
-
return this._namingHandler.getIdFromElementName(property, componentName, this._namingHandler.getElementTypeFromElementName(property));
|
|
47
|
-
}
|
|
48
|
-
getLocatorString(property, componentName) {
|
|
49
|
-
let elementId = this.getElementId(property, componentName);
|
|
59
|
+
getElementId(colId, componentName) {
|
|
50
60
|
if (componentName === 'Grid')
|
|
51
|
-
|
|
61
|
+
return colId;
|
|
62
|
+
return colId.replace(/_/g, '-');
|
|
63
|
+
}
|
|
64
|
+
getLocatorString(colId, elementType, componentName) {
|
|
65
|
+
const elementId = this.getElementId(colId, componentName);
|
|
52
66
|
const selectorPrefix = this.getDefaultPrefix(componentName);
|
|
53
67
|
const defaultSuffix = this.getDefaultSuffix(componentName);
|
|
54
|
-
const selectorSuffix = this.determineSelectorSuffix(
|
|
68
|
+
const selectorSuffix = this.determineSelectorSuffix(elementType, componentName) || defaultSuffix;
|
|
55
69
|
return `this._context.${this.getLocatorType(componentName)}('${selectorPrefix}${elementId}${selectorSuffix}')`;
|
|
56
70
|
}
|
|
57
71
|
getLocatorType(componentName) {
|
|
@@ -62,6 +76,7 @@ export class SelectorBuilder {
|
|
|
62
76
|
return 'locator';
|
|
63
77
|
}
|
|
64
78
|
else {
|
|
79
|
+
/* v8 ignore next -- same guard as getDefaultPrefix; unreachable in practice */
|
|
65
80
|
throw new Error(`Unsupported component type: ${componentName}`);
|
|
66
81
|
}
|
|
67
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectorBuilder.js","sourceRoot":"","sources":["../../artifact-builder/SelectorBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectorBuilder.js","sourceRoot":"","sources":["../../artifact-builder/SelectorBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK7D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,eAAe;IAClB,uBAAuB,CAAC,WAAmB,EAAE,aAAgC;QACnF,IAAI,cAAc,GAAG,IAAI,CAAC;QAE1B,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;YAC7B,IAAI,WAAW,KAAK,iBAAiB,CAAC,MAAM,EAAE,CAAC;gBAC7C,cAAc,GAAG,kBAAkB,CAAC;YACtC,CAAC;iBAAM,IAAI,WAAW,KAAK,iBAAiB,CAAC,QAAQ,EAAE,CAAC;gBACtD,cAAc,GAAG,iBAAiB,CAAC;YACrC,CAAC;QAC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D,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,EAAE,aAAa,CAAC,IAAI,aAAa,CAAC;QAEjG,OAAO,iBAAiB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,KAAK,cAAc,GAAG,SAAS,GAAG,cAAc,IAAI,CAAC;IACjH,CAAC;IAEO,cAAc,CAAC,aAAgC;QACrD,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;YAC7B,OAAO,aAAa,CAAC;QACvB,CAAC;aAAM,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;YACpC,OAAO,SAAS,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,+EAA+E;YAC/E,MAAM,IAAI,KAAK,CAAC,+BAA+B,aAAa,EAAE,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IAEM,cAAc,CAAC,OAAiB;QACrC,MAAM,eAAe,GAAW,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACpG,MAAM,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAE9D,OAAO,yBAAyB,YAAY,mBAAmB,OAAO,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;IACvG,CAAC;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ISubject } from '../interfaces/ISubject.js';
|
|
2
|
+
import { type ScreenComponents } from '../types/Components.js';
|
|
3
|
+
import type { NamingHandler } from './helpers/NamingHandler.js';
|
|
4
|
+
import type { SelectorBuilder } from './SelectorBuilder.js';
|
|
5
|
+
import type { TsConstructor, TsFileModel, TsImport, TsMethod, TsProperty } from './TsFileModel.js';
|
|
6
|
+
export type ComponentEntry = {
|
|
7
|
+
name: string;
|
|
8
|
+
type: ScreenComponents;
|
|
9
|
+
context: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* **Pipeline sub-step** — Builds a pure in-memory model (`TsFileModel`) that
|
|
13
|
+
* describes the TypeScript class to generate for a single Thinkwise subject +
|
|
14
|
+
* screen context combination.
|
|
15
|
+
*
|
|
16
|
+
* **What it does:** Given an `ISubject` record from seed data, it works out:
|
|
17
|
+
* - Which imports the generated class needs.
|
|
18
|
+
* - Which component properties to declare (e.g. `form: EmployeeForm`,
|
|
19
|
+
* `grid: EmployeeGrid`, `actionBar: ActionBar`).
|
|
20
|
+
* - The constructor body that instantiates each component with the correct
|
|
21
|
+
* Playwright locator.
|
|
22
|
+
* - The `goTo()` method body.
|
|
23
|
+
*
|
|
24
|
+
* **No file I/O here** — the model is handed to `TsFileSerializer` which
|
|
25
|
+
* writes it to disk. This split makes `SubjectClassModelBuilder` fully
|
|
26
|
+
* unit-testable without a real filesystem.
|
|
27
|
+
*/
|
|
28
|
+
export declare class SubjectClassModelBuilder {
|
|
29
|
+
private readonly _namingHandler;
|
|
30
|
+
private readonly _selectorBuilder;
|
|
31
|
+
constructor(namingHandler: NamingHandler, selectorBuilder: SelectorBuilder);
|
|
32
|
+
build(subject: ISubject, screenInterfaceName: string, componentDictionary: ComponentEntry[], subjectFolderName: string): TsFileModel;
|
|
33
|
+
buildImports(screenInterfaceName: string, componentDictionary: ComponentEntry[], subjectFolderName: string): TsImport[];
|
|
34
|
+
buildProperties(componentDictionary: ComponentEntry[], subjectFolderName: string): TsProperty[];
|
|
35
|
+
buildConstructor(subject: ISubject, componentDictionary: ComponentEntry[], subjectFolderName: string): TsConstructor;
|
|
36
|
+
buildGoToMethod(subject: ISubject): TsMethod;
|
|
37
|
+
private getComponentInitializer;
|
|
38
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { coreComponents, screenComponents } from '../types/Components.js';
|
|
2
|
+
/**
|
|
3
|
+
* **Pipeline sub-step** — Builds a pure in-memory model (`TsFileModel`) that
|
|
4
|
+
* describes the TypeScript class to generate for a single Thinkwise subject +
|
|
5
|
+
* screen context combination.
|
|
6
|
+
*
|
|
7
|
+
* **What it does:** Given an `ISubject` record from seed data, it works out:
|
|
8
|
+
* - Which imports the generated class needs.
|
|
9
|
+
* - Which component properties to declare (e.g. `form: EmployeeForm`,
|
|
10
|
+
* `grid: EmployeeGrid`, `actionBar: ActionBar`).
|
|
11
|
+
* - The constructor body that instantiates each component with the correct
|
|
12
|
+
* Playwright locator.
|
|
13
|
+
* - The `goTo()` method body.
|
|
14
|
+
*
|
|
15
|
+
* **No file I/O here** — the model is handed to `TsFileSerializer` which
|
|
16
|
+
* writes it to disk. This split makes `SubjectClassModelBuilder` fully
|
|
17
|
+
* unit-testable without a real filesystem.
|
|
18
|
+
*/
|
|
19
|
+
export class SubjectClassModelBuilder {
|
|
20
|
+
constructor(namingHandler, selectorBuilder) {
|
|
21
|
+
this._namingHandler = namingHandler;
|
|
22
|
+
this._selectorBuilder = selectorBuilder;
|
|
23
|
+
}
|
|
24
|
+
build(subject, screenInterfaceName, componentDictionary, subjectFolderName) {
|
|
25
|
+
return {
|
|
26
|
+
imports: this.buildImports(screenInterfaceName, componentDictionary, subjectFolderName),
|
|
27
|
+
classModel: {
|
|
28
|
+
name: this._namingHandler.generateSubjectClassName(subject),
|
|
29
|
+
extendsClass: 'SubjectPageBase',
|
|
30
|
+
implementsInterface: screenInterfaceName,
|
|
31
|
+
properties: this.buildProperties(componentDictionary, subjectFolderName),
|
|
32
|
+
constructor: this.buildConstructor(subject, componentDictionary, subjectFolderName),
|
|
33
|
+
methods: [this.buildGoToMethod(subject)]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
buildImports(screenInterfaceName, componentDictionary, subjectFolderName) {
|
|
38
|
+
const imports = [];
|
|
39
|
+
imports.push({ namedImports: [{ name: screenInterfaceName }], isTypeOnly: true, from: '../../screens/index.js' });
|
|
40
|
+
const coreTypes = [
|
|
41
|
+
...new Set(componentDictionary
|
|
42
|
+
.filter((c) => screenComponents.includes(c.type) && coreComponents.includes(c.type))
|
|
43
|
+
.map((c) => c.type))
|
|
44
|
+
];
|
|
45
|
+
if (coreTypes.length > 0) {
|
|
46
|
+
imports.push({
|
|
47
|
+
namedImports: coreTypes.map((t) => ({ name: t })),
|
|
48
|
+
isTypeOnly: false,
|
|
49
|
+
from: '../../../components/index.js'
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
for (const component of componentDictionary) {
|
|
53
|
+
if (!screenComponents.includes(component.type))
|
|
54
|
+
continue;
|
|
55
|
+
if (coreComponents.includes(component.type))
|
|
56
|
+
continue;
|
|
57
|
+
const baseName = `${subjectFolderName}${component.type}`;
|
|
58
|
+
imports.push({
|
|
59
|
+
namedImports: [{ name: baseName, isTypeOnly: true }, { name: `${baseName}Component` }],
|
|
60
|
+
isTypeOnly: false,
|
|
61
|
+
from: `./Components/${baseName}.js`
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
imports.push({ namedImports: [{ name: 'Page' }], isTypeOnly: true, from: '@playwright/test' });
|
|
65
|
+
imports.push({
|
|
66
|
+
namedImports: [{ name: 'SubjectNavigator' }],
|
|
67
|
+
isTypeOnly: false,
|
|
68
|
+
from: '@thinkwise/testwise/helpers/SubjectNavigator'
|
|
69
|
+
});
|
|
70
|
+
imports.push({ namedImports: [{ name: 'SubjectPageBase' }], isTypeOnly: false, from: '../../SubjectPageBase.js' });
|
|
71
|
+
return imports;
|
|
72
|
+
}
|
|
73
|
+
buildProperties(componentDictionary, subjectFolderName) {
|
|
74
|
+
const properties = [];
|
|
75
|
+
for (const component of componentDictionary) {
|
|
76
|
+
if (!screenComponents.includes(component.type))
|
|
77
|
+
continue;
|
|
78
|
+
const propertyName = this._namingHandler.formatPropertyName(component.name);
|
|
79
|
+
if (coreComponents.includes(component.type)) {
|
|
80
|
+
properties.push({ name: propertyName, type: component.type });
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
properties.push({ name: propertyName, type: `${subjectFolderName}${component.type}` });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
properties.push({ access: 'private', name: '_subjectPage', type: 'Page' });
|
|
87
|
+
return properties;
|
|
88
|
+
}
|
|
89
|
+
buildConstructor(subject, componentDictionary, subjectFolderName) {
|
|
90
|
+
const rootContextSelector = this._selectorBuilder.getPageContext(subject);
|
|
91
|
+
const assignments = [];
|
|
92
|
+
for (const component of componentDictionary) {
|
|
93
|
+
if (!screenComponents.includes(component.type))
|
|
94
|
+
continue;
|
|
95
|
+
const propertyName = this._namingHandler.formatPropertyName(component.name);
|
|
96
|
+
if (coreComponents.includes(component.type)) {
|
|
97
|
+
const componentId = this._namingHandler.toPascalCase(propertyName);
|
|
98
|
+
assignments.push({ property: propertyName, value: this.getComponentInitializer(component, componentId) });
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
assignments.push({
|
|
102
|
+
property: propertyName,
|
|
103
|
+
value: `new ${subjectFolderName}${component.type}Component(${component.context})`
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
params: [{ name: 'page', type: 'Page' }],
|
|
109
|
+
superCall: `page.locator('${rootContextSelector}')`,
|
|
110
|
+
assignments,
|
|
111
|
+
extraLines: ['this._subjectPage = this.context.page();']
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
buildGoToMethod(subject) {
|
|
115
|
+
let url = `subject=${subject.subject}`;
|
|
116
|
+
if (subject.variant !== '')
|
|
117
|
+
url = `${url}/subjectVariant=${subject.variant}`;
|
|
118
|
+
return {
|
|
119
|
+
isAsync: true,
|
|
120
|
+
name: 'goTo',
|
|
121
|
+
returnType: 'void',
|
|
122
|
+
bodyLines: [`await new SubjectNavigator(this._subjectPage).navigateTo(\`${url}\`);`]
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
getComponentInitializer(component, componentId) {
|
|
126
|
+
const componentNamePascal = this._namingHandler.toPascalCase(component.type);
|
|
127
|
+
switch (component.type) {
|
|
128
|
+
case 'Cardlist':
|
|
129
|
+
case 'TaskTiles':
|
|
130
|
+
case 'PrefilterList':
|
|
131
|
+
case 'Chart':
|
|
132
|
+
case 'CubeViewBar':
|
|
133
|
+
case 'PivotGrid':
|
|
134
|
+
case 'PivotGridFieldList':
|
|
135
|
+
case 'Maps':
|
|
136
|
+
case 'ReportBar':
|
|
137
|
+
case 'ReportTiles':
|
|
138
|
+
case 'Preview':
|
|
139
|
+
return `new ${component.type}(this.context.locator('.${component.type}.${componentNamePascal}'))`;
|
|
140
|
+
case 'CombinedFilter':
|
|
141
|
+
case 'CustomActionBar':
|
|
142
|
+
case 'ActionBar':
|
|
143
|
+
case 'Splitter':
|
|
144
|
+
case 'DetailTabPage':
|
|
145
|
+
case 'Tab':
|
|
146
|
+
case 'FilterForm':
|
|
147
|
+
case 'Scheduler':
|
|
148
|
+
return `new ${component.type}(${component.context})`;
|
|
149
|
+
case 'TreeView':
|
|
150
|
+
return `new ${component.type}(this.context.locator('.Tree.${componentNamePascal}'))`;
|
|
151
|
+
case 'TaskBar':
|
|
152
|
+
return `new ${component.type}(this.context.locator('.ActionBar.${componentId}'))`;
|
|
153
|
+
default:
|
|
154
|
+
throw new Error(`Unknown core component type: ${component.type}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=SubjectClassModelBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubjectClassModelBuilder.js","sourceRoot":"","sources":["../../artifact-builder/SubjectClassModelBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EAGd,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAWhC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,wBAAwB;IAInC,YAAY,aAA4B,EAAE,eAAgC;QACxE,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAEM,KAAK,CACV,OAAiB,EACjB,m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IAAI,EAAE,CAAC;YACvB,KAAK,UAAU,CAAC;YAChB,KAAK,WAAW,CAAC;YACjB,KAAK,eAAe,CAAC;YACrB,KAAK,OAAO,CAAC;YACb,KAAK,aAAa,CAAC;YACnB,KAAK,WAAW,CAAC;YACjB,KAAK,oBAAoB,CAAC;YAC1B,KAAK,MAAM,CAAC;YACZ,KAAK,WAAW,CAAC;YACjB,KAAK,aAAa,CAAC;YACnB,KAAK,SAAS;gBACZ,OAAO,OAAO,SAAS,CAAC,IAAI,2BAA2B,SAAS,CAAC,IAAI,IAAI,mBAAmB,KAAK,CAAC;YACpG,KAAK,gBAAgB,CAAC;YACtB,KAAK,iBAAiB,CAAC;YACvB,KAAK,WAAW,CAAC;YACjB,KAAK,UAAU,CAAC;YAChB,KAAK,eAAe,CAAC;YACrB,KAAK,KAAK,CAAC;YACX,KAAK,YAAY,CAAC;YAClB,KAAK,WAAW;gBACd,OAAO,OAAO,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,GAAG,CAAC;YACvD,KAAK,UAAU;gBACb,OAAO,OAAO,SAAS,CAAC,IAAI,gCAAgC,mBAAmB,KAAK,CAAC;YACvF,KAAK,SAAS;gBACZ,OAAO,OAAO,SAAS,CAAC,IAAI,qCAAqC,WAAW,KAAK,CAAC;YACpF;gBACE,MAAM,IAAI,KAAK,CAAC,gCAAgC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,27 +1,38 @@
|
|
|
1
|
+
import { PipelinePaths } from './helpers/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* **Pipeline Step 6b** — Appends typed component class bodies to the raw
|
|
4
|
+
* screen interface files that `InterfaceGenerator` (quicktype) produced.
|
|
5
|
+
*
|
|
6
|
+
* **What it does:**
|
|
7
|
+
* - Scans the `Components/` subfolder inside each subject folder in
|
|
8
|
+
* `test-artifacts/subjects/`.
|
|
9
|
+
* - For each component interface file (e.g. `EmployeeForm.ts`), it reads the
|
|
10
|
+
* corresponding `.meta.json` sidecar to learn the control types of each
|
|
11
|
+
* property, then uses `ComponentClassModelBuilder` to produce an in-memory
|
|
12
|
+
* class model.
|
|
13
|
+
* - `TsFileSerializer.appendComponentClass` writes the class body (with typed
|
|
14
|
+
* property constructors) directly into the same interface file.
|
|
15
|
+
* - Also runs `refineComponentInterface` to clean up quicktype artefacts
|
|
16
|
+
* (removes the `Locator` import, adds correct Testwise imports).
|
|
17
|
+
*
|
|
18
|
+
* **When it runs:** Step 6 of `testwise sync`, in parallel with
|
|
19
|
+
* `SubjectGenerator` (both write into `test-artifacts/subjects/`).
|
|
20
|
+
*/
|
|
1
21
|
export declare class SubjectComponentGenerator {
|
|
2
|
-
private static readonly SUBJECTS_RELATIVE_PATH;
|
|
3
|
-
private readonly _currentFilename;
|
|
4
|
-
private readonly _currentDirname;
|
|
5
22
|
private readonly _subjectsDirectory;
|
|
23
|
+
private readonly _schemasDirectory;
|
|
6
24
|
private readonly _selectorBuilder;
|
|
7
25
|
private readonly _namingHandler;
|
|
8
|
-
|
|
26
|
+
private readonly _paths;
|
|
27
|
+
private readonly _modelBuilder;
|
|
28
|
+
constructor(paths?: PipelinePaths);
|
|
9
29
|
run(): void;
|
|
10
30
|
private getAllSubjectFolders;
|
|
31
|
+
private loadSchemaMeta;
|
|
11
32
|
private refineSubjectComponents;
|
|
12
|
-
private getComponentNameFromFile;
|
|
13
33
|
private refine;
|
|
14
|
-
private transformGridInterface;
|
|
15
|
-
private generateGridGetters;
|
|
16
34
|
private getSubjectFolderPath;
|
|
17
35
|
private verifyDirectoryExists;
|
|
18
|
-
private getPropertyInitializations;
|
|
19
|
-
private addImportsDynamically;
|
|
20
|
-
private generatePropertyDeclarations;
|
|
21
|
-
private transformInterfaceTypes;
|
|
22
36
|
private convertStringsToArray;
|
|
23
37
|
private getPropertyNamesFromInterface;
|
|
24
|
-
private setSubjectExtendsComponent;
|
|
25
|
-
private addComponentImports;
|
|
26
|
-
private removeLocatorInterface;
|
|
27
38
|
}
|