@thinkwise/testwise 0.2.62 → 0.2.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (458) hide show
  1. package/Testwise.ts +35 -0
  2. package/artifact-builder/ArtifactManager.ts +25 -2
  3. package/artifact-builder/ComponentClassModelBuilder.ts +148 -0
  4. package/artifact-builder/InterfaceGenerator.ts +31 -33
  5. package/artifact-builder/ModelDataBuilder.ts +18 -20
  6. package/artifact-builder/ModelDataRefiner.ts +23 -3
  7. package/artifact-builder/SchemaGenerator.ts +45 -35
  8. package/artifact-builder/ScreenInterfaceRefiner.ts +25 -10
  9. package/artifact-builder/SelectorBuilder.ts +30 -24
  10. package/artifact-builder/SubjectClassModelBuilder.ts +209 -0
  11. package/artifact-builder/SubjectComponentGenerator.ts +67 -246
  12. package/artifact-builder/SubjectGenerator.ts +117 -230
  13. package/artifact-builder/SubjectRegistration.ts +41 -32
  14. package/artifact-builder/TsFileModel.ts +94 -0
  15. package/artifact-builder/TsFileSerializer.ts +247 -0
  16. package/artifact-builder/helpers/DataRetriever.ts +64 -27
  17. package/artifact-builder/helpers/NamingHandler.ts +23 -78
  18. package/artifact-builder/helpers/PipelinePaths.ts +123 -0
  19. package/artifact-builder/helpers/Stopwatch.ts +10 -0
  20. package/artifact-builder/helpers/index.ts +1 -0
  21. package/artifact-builder/index.ts +4 -0
  22. package/components/BaseComponentObjects.ts +17 -0
  23. package/components/action-bar/ActionBar.ts +35 -47
  24. package/components/action-bar/ActionBarObjects.ts +2 -0
  25. package/components/action-bar/CustomActionBar.ts +6 -0
  26. package/components/cardlist/Cardlist.ts +6 -0
  27. package/components/chart/Chart.ts +6 -0
  28. package/components/combined-filter/CombinedFilter.ts +9 -0
  29. package/components/cube-view-bar/CubeViewBar.ts +6 -0
  30. package/components/export/ExportComponent.ts +12 -0
  31. package/components/filter/ExcelStyleFilterPopup.ts +83 -10
  32. package/components/filter/ExcelStyleFilterPopupObjects.ts +29 -3
  33. package/components/filter/FilterForm.ts +10 -0
  34. package/components/filter/FilterPopup.ts +30 -9
  35. package/components/filter/FilterPopupObjects.ts +10 -3
  36. package/components/filter/FindForm.ts +7 -0
  37. package/components/filter/ManagePrefilterPopup.ts +11 -0
  38. package/components/form/Form.ts +16 -0
  39. package/components/grid/Grid.ts +50 -14
  40. package/components/grid/GridObjects.ts +0 -15
  41. package/components/maps/Maps.ts +6 -0
  42. package/components/menu/ListBarMenuComponent.ts +10 -0
  43. package/components/pivot-grid/PivotGrid.ts +6 -0
  44. package/components/pivot-grid/PivotGridFieldList.ts +7 -0
  45. package/components/pop-up/AllRowsPopUp.ts +12 -0
  46. package/components/pop-up/PopUpComponent.ts +11 -0
  47. package/components/prefilter-list/PrefilterList.ts +9 -0
  48. package/components/preview/Preview.ts +6 -0
  49. package/components/report-bar/ReportBar.ts +6 -0
  50. package/components/report-tiles/ReportTiles.ts +6 -0
  51. package/components/scheduler/Scheduler.ts +6 -0
  52. package/components/snackbar/SnackBar.ts +12 -0
  53. package/components/splitter/Splitter.ts +6 -0
  54. package/components/tab/BaseTab.ts +5 -0
  55. package/components/tab/DetailTabPage.ts +11 -0
  56. package/components/tab/Tab.ts +10 -0
  57. package/components/task/TaskBar.ts +13 -3
  58. package/components/task/TaskTiles.ts +12 -3
  59. package/components/topbar/TopBar.ts +10 -0
  60. package/components/tree-view/TreeView.ts +9 -0
  61. package/controls/DateControl.ts +47 -9
  62. package/controls/DateControlObjects.ts +15 -0
  63. package/controls/FormComboBox.ts +43 -26
  64. package/controls/FormComboBoxObjects.ts +27 -0
  65. package/controls/GridColumnControl.ts +35 -4
  66. package/controls/GridColumnControlObjects.ts +1 -1
  67. package/controls/InputFieldControl.ts +61 -15
  68. package/controls/InputFieldControlObjects.ts +19 -0
  69. package/controls/LookupDropdown.ts +59 -31
  70. package/controls/LookupDropdownObjects.ts +19 -0
  71. package/dist/Testwise.js +35 -0
  72. package/dist/Testwise.js.map +1 -1
  73. package/dist/artifact-builder/ArtifactManager.d.ts +18 -1
  74. package/dist/artifact-builder/ArtifactManager.js +24 -2
  75. package/dist/artifact-builder/ArtifactManager.js.map +1 -1
  76. package/dist/artifact-builder/ComponentClassModelBuilder.d.ts +22 -0
  77. package/dist/artifact-builder/ComponentClassModelBuilder.js +115 -0
  78. package/dist/artifact-builder/ComponentClassModelBuilder.js.map +1 -0
  79. package/dist/artifact-builder/InterfaceGenerator.d.ts +15 -6
  80. package/dist/artifact-builder/InterfaceGenerator.js +27 -26
  81. package/dist/artifact-builder/InterfaceGenerator.js.map +1 -1
  82. package/dist/artifact-builder/ModelDataBuilder.d.ts +7 -0
  83. package/dist/artifact-builder/ModelDataBuilder.js +13 -5
  84. package/dist/artifact-builder/ModelDataBuilder.js.map +1 -1
  85. package/dist/artifact-builder/ModelDataRefiner.d.ts +18 -1
  86. package/dist/artifact-builder/ModelDataRefiner.js +18 -3
  87. package/dist/artifact-builder/ModelDataRefiner.js.map +1 -1
  88. package/dist/artifact-builder/SchemaGenerator.d.ts +21 -5
  89. package/dist/artifact-builder/SchemaGenerator.js +38 -26
  90. package/dist/artifact-builder/SchemaGenerator.js.map +1 -1
  91. package/dist/artifact-builder/ScreenInterfaceRefiner.d.ts +18 -1
  92. package/dist/artifact-builder/ScreenInterfaceRefiner.js +23 -9
  93. package/dist/artifact-builder/ScreenInterfaceRefiner.js.map +1 -1
  94. package/dist/artifact-builder/SelectorBuilder.d.ts +18 -5
  95. package/dist/artifact-builder/SelectorBuilder.js +29 -14
  96. package/dist/artifact-builder/SelectorBuilder.js.map +1 -1
  97. package/dist/artifact-builder/SubjectClassModelBuilder.d.ts +38 -0
  98. package/dist/artifact-builder/SubjectClassModelBuilder.js +158 -0
  99. package/dist/artifact-builder/SubjectClassModelBuilder.js.map +1 -0
  100. package/dist/artifact-builder/SubjectComponentGenerator.d.ts +25 -14
  101. package/dist/artifact-builder/SubjectComponentGenerator.js +65 -189
  102. package/dist/artifact-builder/SubjectComponentGenerator.js.map +1 -1
  103. package/dist/artifact-builder/SubjectGenerator.d.ts +32 -13
  104. package/dist/artifact-builder/SubjectGenerator.js +81 -165
  105. package/dist/artifact-builder/SubjectGenerator.js.map +1 -1
  106. package/dist/artifact-builder/SubjectRegistration.d.ts +22 -8
  107. package/dist/artifact-builder/SubjectRegistration.js +29 -14
  108. package/dist/artifact-builder/SubjectRegistration.js.map +1 -1
  109. package/dist/artifact-builder/TsFileModel.d.ts +86 -0
  110. package/dist/artifact-builder/TsFileModel.js +2 -0
  111. package/dist/artifact-builder/TsFileModel.js.map +1 -0
  112. package/dist/artifact-builder/TsFileSerializer.d.ts +19 -0
  113. package/dist/artifact-builder/TsFileSerializer.js +225 -0
  114. package/dist/artifact-builder/TsFileSerializer.js.map +1 -0
  115. package/dist/artifact-builder/helpers/DataRetriever.d.ts +22 -3
  116. package/dist/artifact-builder/helpers/DataRetriever.js +56 -26
  117. package/dist/artifact-builder/helpers/DataRetriever.js.map +1 -1
  118. package/dist/artifact-builder/helpers/NamingHandler.d.ts +18 -6
  119. package/dist/artifact-builder/helpers/NamingHandler.js +20 -61
  120. package/dist/artifact-builder/helpers/NamingHandler.js.map +1 -1
  121. package/dist/artifact-builder/helpers/PipelinePaths.d.ts +52 -0
  122. package/dist/artifact-builder/helpers/PipelinePaths.js +99 -0
  123. package/dist/artifact-builder/helpers/PipelinePaths.js.map +1 -0
  124. package/dist/artifact-builder/helpers/Stopwatch.d.ts +10 -0
  125. package/dist/artifact-builder/helpers/Stopwatch.js +10 -0
  126. package/dist/artifact-builder/helpers/Stopwatch.js.map +1 -1
  127. package/dist/artifact-builder/helpers/index.d.ts +1 -0
  128. package/dist/artifact-builder/helpers/index.js +1 -0
  129. package/dist/artifact-builder/helpers/index.js.map +1 -1
  130. package/dist/artifact-builder/index.d.ts +4 -0
  131. package/dist/artifact-builder/index.js +4 -0
  132. package/dist/artifact-builder/index.js.map +1 -1
  133. package/dist/components/BaseComponentObjects.d.ts +17 -0
  134. package/dist/components/BaseComponentObjects.js +17 -0
  135. package/dist/components/BaseComponentObjects.js.map +1 -1
  136. package/dist/components/action-bar/ActionBar.d.ts +21 -24
  137. package/dist/components/action-bar/ActionBar.js +31 -24
  138. package/dist/components/action-bar/ActionBar.js.map +1 -1
  139. package/dist/components/action-bar/ActionBarObjects.d.ts +1 -0
  140. package/dist/components/action-bar/ActionBarObjects.js +1 -0
  141. package/dist/components/action-bar/ActionBarObjects.js.map +1 -1
  142. package/dist/components/action-bar/CustomActionBar.d.ts +6 -0
  143. package/dist/components/action-bar/CustomActionBar.js +6 -0
  144. package/dist/components/action-bar/CustomActionBar.js.map +1 -1
  145. package/dist/components/cardlist/Cardlist.d.ts +6 -0
  146. package/dist/components/cardlist/Cardlist.js +6 -0
  147. package/dist/components/cardlist/Cardlist.js.map +1 -1
  148. package/dist/components/chart/Chart.d.ts +6 -0
  149. package/dist/components/chart/Chart.js +6 -0
  150. package/dist/components/chart/Chart.js.map +1 -1
  151. package/dist/components/combined-filter/CombinedFilter.d.ts +9 -0
  152. package/dist/components/combined-filter/CombinedFilter.js +9 -0
  153. package/dist/components/combined-filter/CombinedFilter.js.map +1 -1
  154. package/dist/components/cube-view-bar/CubeViewBar.d.ts +6 -0
  155. package/dist/components/cube-view-bar/CubeViewBar.js +6 -0
  156. package/dist/components/cube-view-bar/CubeViewBar.js.map +1 -1
  157. package/dist/components/export/ExportComponent.d.ts +12 -0
  158. package/dist/components/export/ExportComponent.js +12 -0
  159. package/dist/components/export/ExportComponent.js.map +1 -1
  160. package/dist/components/filter/ExcelStyleFilterPopup.d.ts +25 -2
  161. package/dist/components/filter/ExcelStyleFilterPopup.js +60 -6
  162. package/dist/components/filter/ExcelStyleFilterPopup.js.map +1 -1
  163. package/dist/components/filter/ExcelStyleFilterPopupObjects.d.ts +8 -1
  164. package/dist/components/filter/ExcelStyleFilterPopupObjects.js +15 -2
  165. package/dist/components/filter/ExcelStyleFilterPopupObjects.js.map +1 -1
  166. package/dist/components/filter/FilterForm.d.ts +10 -0
  167. package/dist/components/filter/FilterForm.js +10 -0
  168. package/dist/components/filter/FilterForm.js.map +1 -1
  169. package/dist/components/filter/FilterPopup.d.ts +22 -4
  170. package/dist/components/filter/FilterPopup.js +17 -9
  171. package/dist/components/filter/FilterPopup.js.map +1 -1
  172. package/dist/components/filter/FilterPopupObjects.d.ts +5 -2
  173. package/dist/components/filter/FilterPopupObjects.js +5 -2
  174. package/dist/components/filter/FilterPopupObjects.js.map +1 -1
  175. package/dist/components/filter/FindForm.d.ts +7 -0
  176. package/dist/components/filter/FindForm.js +7 -0
  177. package/dist/components/filter/FindForm.js.map +1 -1
  178. package/dist/components/filter/ManagePrefilterPopup.d.ts +11 -0
  179. package/dist/components/filter/ManagePrefilterPopup.js +11 -0
  180. package/dist/components/filter/ManagePrefilterPopup.js.map +1 -1
  181. package/dist/components/form/Form.d.ts +16 -0
  182. package/dist/components/form/Form.js +16 -0
  183. package/dist/components/form/Form.js.map +1 -1
  184. package/dist/components/grid/Grid.d.ts +20 -1
  185. package/dist/components/grid/Grid.js +35 -25
  186. package/dist/components/grid/Grid.js.map +1 -1
  187. package/dist/components/grid/GridObjects.d.ts +0 -4
  188. package/dist/components/grid/GridObjects.js +0 -6
  189. package/dist/components/grid/GridObjects.js.map +1 -1
  190. package/dist/components/maps/Maps.d.ts +6 -0
  191. package/dist/components/maps/Maps.js +6 -0
  192. package/dist/components/maps/Maps.js.map +1 -1
  193. package/dist/components/menu/ListBarMenuComponent.d.ts +10 -0
  194. package/dist/components/menu/ListBarMenuComponent.js +10 -0
  195. package/dist/components/menu/ListBarMenuComponent.js.map +1 -1
  196. package/dist/components/pivot-grid/PivotGrid.d.ts +6 -0
  197. package/dist/components/pivot-grid/PivotGrid.js +6 -0
  198. package/dist/components/pivot-grid/PivotGrid.js.map +1 -1
  199. package/dist/components/pivot-grid/PivotGridFieldList.d.ts +7 -0
  200. package/dist/components/pivot-grid/PivotGridFieldList.js +7 -0
  201. package/dist/components/pivot-grid/PivotGridFieldList.js.map +1 -1
  202. package/dist/components/pop-up/AllRowsPopUp.d.ts +12 -0
  203. package/dist/components/pop-up/AllRowsPopUp.js +12 -0
  204. package/dist/components/pop-up/AllRowsPopUp.js.map +1 -1
  205. package/dist/components/pop-up/PopUpComponent.d.ts +11 -0
  206. package/dist/components/pop-up/PopUpComponent.js +11 -0
  207. package/dist/components/pop-up/PopUpComponent.js.map +1 -1
  208. package/dist/components/prefilter-list/PrefilterList.d.ts +9 -0
  209. package/dist/components/prefilter-list/PrefilterList.js +9 -0
  210. package/dist/components/prefilter-list/PrefilterList.js.map +1 -1
  211. package/dist/components/preview/Preview.d.ts +6 -0
  212. package/dist/components/preview/Preview.js +6 -0
  213. package/dist/components/preview/Preview.js.map +1 -1
  214. package/dist/components/report-bar/ReportBar.d.ts +6 -0
  215. package/dist/components/report-bar/ReportBar.js +6 -0
  216. package/dist/components/report-bar/ReportBar.js.map +1 -1
  217. package/dist/components/report-tiles/ReportTiles.d.ts +6 -0
  218. package/dist/components/report-tiles/ReportTiles.js +6 -0
  219. package/dist/components/report-tiles/ReportTiles.js.map +1 -1
  220. package/dist/components/scheduler/Scheduler.d.ts +6 -0
  221. package/dist/components/scheduler/Scheduler.js +6 -0
  222. package/dist/components/scheduler/Scheduler.js.map +1 -1
  223. package/dist/components/snackbar/SnackBar.d.ts +12 -0
  224. package/dist/components/snackbar/SnackBar.js +12 -0
  225. package/dist/components/snackbar/SnackBar.js.map +1 -1
  226. package/dist/components/splitter/Splitter.d.ts +6 -0
  227. package/dist/components/splitter/Splitter.js +6 -0
  228. package/dist/components/splitter/Splitter.js.map +1 -1
  229. package/dist/components/tab/BaseTab.d.ts +5 -0
  230. package/dist/components/tab/BaseTab.js +5 -0
  231. package/dist/components/tab/BaseTab.js.map +1 -1
  232. package/dist/components/tab/DetailTabPage.d.ts +11 -0
  233. package/dist/components/tab/DetailTabPage.js +11 -0
  234. package/dist/components/tab/DetailTabPage.js.map +1 -1
  235. package/dist/components/tab/Tab.d.ts +10 -0
  236. package/dist/components/tab/Tab.js +10 -0
  237. package/dist/components/tab/Tab.js.map +1 -1
  238. package/dist/components/task/TaskBar.d.ts +12 -2
  239. package/dist/components/task/TaskBar.js +13 -3
  240. package/dist/components/task/TaskBar.js.map +1 -1
  241. package/dist/components/task/TaskTiles.d.ts +11 -2
  242. package/dist/components/task/TaskTiles.js +12 -3
  243. package/dist/components/task/TaskTiles.js.map +1 -1
  244. package/dist/components/topbar/TopBar.d.ts +10 -0
  245. package/dist/components/topbar/TopBar.js +10 -0
  246. package/dist/components/topbar/TopBar.js.map +1 -1
  247. package/dist/components/tree-view/TreeView.d.ts +9 -0
  248. package/dist/components/tree-view/TreeView.js +9 -0
  249. package/dist/components/tree-view/TreeView.js.map +1 -1
  250. package/dist/controls/DateControl.d.ts +40 -2
  251. package/dist/controls/DateControl.js +24 -7
  252. package/dist/controls/DateControl.js.map +1 -1
  253. package/dist/controls/DateControlObjects.d.ts +8 -1
  254. package/dist/controls/DateControlObjects.js +8 -1
  255. package/dist/controls/DateControlObjects.js.map +1 -1
  256. package/dist/controls/FormComboBox.d.ts +30 -0
  257. package/dist/controls/FormComboBox.js +19 -16
  258. package/dist/controls/FormComboBox.js.map +1 -1
  259. package/dist/controls/FormComboBoxObjects.d.ts +12 -1
  260. package/dist/controls/FormComboBoxObjects.js +15 -1
  261. package/dist/controls/FormComboBoxObjects.js.map +1 -1
  262. package/dist/controls/GridColumnControl.d.ts +30 -0
  263. package/dist/controls/GridColumnControl.js +13 -4
  264. package/dist/controls/GridColumnControl.js.map +1 -1
  265. package/dist/controls/GridColumnControlObjects.js +1 -1
  266. package/dist/controls/GridColumnControlObjects.js.map +1 -1
  267. package/dist/controls/InputFieldControl.d.ts +50 -3
  268. package/dist/controls/InputFieldControl.js +40 -11
  269. package/dist/controls/InputFieldControl.js.map +1 -1
  270. package/dist/controls/InputFieldControlObjects.d.ts +10 -1
  271. package/dist/controls/InputFieldControlObjects.js +10 -1
  272. package/dist/controls/InputFieldControlObjects.js.map +1 -1
  273. package/dist/controls/LookupDropdown.d.ts +29 -0
  274. package/dist/controls/LookupDropdown.js +36 -25
  275. package/dist/controls/LookupDropdown.js.map +1 -1
  276. package/dist/controls/LookupDropdownObjects.d.ts +10 -0
  277. package/dist/controls/LookupDropdownObjects.js +11 -0
  278. package/dist/controls/LookupDropdownObjects.js.map +1 -0
  279. package/dist/enums/ElementTypes.d.ts +18 -0
  280. package/dist/enums/ElementTypes.js +18 -0
  281. package/dist/enums/ElementTypes.js.map +1 -1
  282. package/dist/enums/ExportFormat.d.ts +8 -0
  283. package/dist/enums/ExportFormat.js +8 -0
  284. package/dist/enums/ExportFormat.js.map +1 -1
  285. package/dist/enums/LogLevel.d.ts +17 -0
  286. package/dist/enums/LogLevel.js +17 -1
  287. package/dist/enums/LogLevel.js.map +1 -1
  288. package/dist/enums/index.d.ts +1 -0
  289. package/dist/enums/index.js +1 -0
  290. package/dist/enums/index.js.map +1 -1
  291. package/dist/helpers/ConfigChecker.d.ts +13 -0
  292. package/dist/helpers/ConfigChecker.js +13 -0
  293. package/dist/helpers/ConfigChecker.js.map +1 -1
  294. package/dist/helpers/Ensure.d.ts +13 -0
  295. package/dist/helpers/Ensure.js +13 -0
  296. package/dist/helpers/Ensure.js.map +1 -1
  297. package/dist/helpers/FlightTracker.d.ts +13 -3
  298. package/dist/helpers/FlightTracker.js +103 -17
  299. package/dist/helpers/FlightTracker.js.map +1 -1
  300. package/dist/helpers/GlobalWaitEventHandler.d.ts +13 -0
  301. package/dist/helpers/GlobalWaitEventHandler.js +13 -0
  302. package/dist/helpers/GlobalWaitEventHandler.js.map +1 -1
  303. package/dist/helpers/LoginHelper.d.ts +35 -1
  304. package/dist/helpers/LoginHelper.js +46 -11
  305. package/dist/helpers/LoginHelper.js.map +1 -1
  306. package/dist/helpers/PathResolver.d.ts +22 -0
  307. package/dist/helpers/PathResolver.js +22 -0
  308. package/dist/helpers/PathResolver.js.map +1 -1
  309. package/dist/helpers/Poll.d.ts +13 -1
  310. package/dist/helpers/Poll.js +12 -0
  311. package/dist/helpers/Poll.js.map +1 -1
  312. package/dist/helpers/RegexHelper.d.ts +15 -0
  313. package/dist/helpers/RegexHelper.js +15 -3
  314. package/dist/helpers/RegexHelper.js.map +1 -1
  315. package/dist/helpers/SubjectNavigator.d.ts +26 -0
  316. package/dist/helpers/SubjectNavigator.js +51 -0
  317. package/dist/helpers/SubjectNavigator.js.map +1 -0
  318. package/dist/helpers/UserSimulationHelper.d.ts +14 -0
  319. package/dist/helpers/UserSimulationHelper.js +14 -0
  320. package/dist/helpers/UserSimulationHelper.js.map +1 -1
  321. package/dist/helpers/index.d.ts +1 -0
  322. package/dist/helpers/index.js +1 -0
  323. package/dist/helpers/index.js.map +1 -1
  324. package/dist/index.d.ts +6 -20
  325. package/dist/index.js +1 -0
  326. package/dist/index.js.map +1 -1
  327. package/dist/interfaces/IComponentObjects.d.ts +12 -0
  328. package/dist/interfaces/IComponentSchemaMeta.d.ts +15 -0
  329. package/dist/interfaces/IComponentSchemaMeta.js +2 -0
  330. package/dist/interfaces/IComponentSchemaMeta.js.map +1 -0
  331. package/dist/interfaces/IProperty.d.ts +13 -0
  332. package/dist/interfaces/IRegisteredSubjects.d.ts +12 -0
  333. package/dist/interfaces/ISeedSubjectDraft.d.ts +16 -0
  334. package/dist/interfaces/ISeedSubjectDraft.js +2 -0
  335. package/dist/interfaces/ISeedSubjectDraft.js.map +1 -0
  336. package/dist/interfaces/ISubject.d.ts +13 -0
  337. package/dist/interfaces/ISubjectDetail.d.ts +11 -0
  338. package/dist/interfaces/ISubjectDetail.js +2 -0
  339. package/dist/interfaces/ISubjectDetail.js.map +1 -0
  340. package/dist/mcp/ArtifactResolver.d.ts +152 -0
  341. package/dist/mcp/ArtifactResolver.js +232 -0
  342. package/dist/mcp/ArtifactResolver.js.map +1 -0
  343. package/dist/mcp/index.d.ts +2 -0
  344. package/dist/mcp/index.js +2 -0
  345. package/dist/mcp/index.js.map +1 -0
  346. package/dist/page-extensions/GlobalComponents.d.ts +30 -0
  347. package/dist/page-extensions/GlobalComponents.js +30 -0
  348. package/dist/page-extensions/GlobalComponents.js.map +1 -1
  349. package/dist/page-extensions/GoToDeepLink.d.ts +9 -0
  350. package/dist/page-extensions/GoToDeepLink.js +9 -0
  351. package/dist/page-extensions/GoToDeepLink.js.map +1 -1
  352. package/dist/page-extensions/LoginFeatures.d.ts +8 -0
  353. package/dist/page-extensions/LoginFeatures.js +8 -0
  354. package/dist/page-extensions/LoginFeatures.js.map +1 -1
  355. package/dist/page-extensions/SubjectRegistry.d.ts +31 -0
  356. package/dist/page-extensions/SubjectRegistry.js +31 -0
  357. package/dist/page-extensions/SubjectRegistry.js.map +1 -1
  358. package/dist/page-extensions/UserSimulation.d.ts +21 -0
  359. package/dist/page-extensions/UserSimulation.js +21 -0
  360. package/dist/page-extensions/UserSimulation.js.map +1 -1
  361. package/dist/page-extensions/WaitEventHandler.d.ts +20 -0
  362. package/dist/page-extensions/WaitEventHandler.js +20 -0
  363. package/dist/page-extensions/WaitEventHandler.js.map +1 -1
  364. package/dist/page-overrides/ClickOverride.d.ts +23 -2
  365. package/dist/page-overrides/ClickOverride.js +34 -50
  366. package/dist/page-overrides/ClickOverride.js.map +1 -1
  367. package/dist/page-overrides/FillOverride.d.ts +23 -0
  368. package/dist/page-overrides/FillOverride.js +46 -66
  369. package/dist/page-overrides/FillOverride.js.map +1 -1
  370. package/dist/services/ConfigBuilder.d.ts +24 -0
  371. package/dist/services/ConfigBuilder.js +24 -0
  372. package/dist/services/ConfigBuilder.js.map +1 -1
  373. package/dist/services/IndiciumApi.service.d.ts +26 -0
  374. package/dist/services/IndiciumApi.service.js +40 -5
  375. package/dist/services/IndiciumApi.service.js.map +1 -1
  376. package/dist/services/Logger.d.ts +13 -0
  377. package/dist/services/Logger.js +39 -0
  378. package/dist/services/Logger.js.map +1 -1
  379. package/dist/types/Components.d.ts +18 -1
  380. package/dist/types/Components.js +0 -1
  381. package/dist/types/Components.js.map +1 -1
  382. package/dist/types/LocatorType.d.ts +5 -0
  383. package/dist/types/LocatorType.js +2 -0
  384. package/dist/types/LocatorType.js.map +1 -0
  385. package/dist/types/PollTypes.d.ts +8 -0
  386. package/dist/types/Test.d.ts +18 -0
  387. package/dist/types/Universal.d.ts +12 -0
  388. package/dist/types/index.d.ts +2 -0
  389. package/dist/types/index.js +2 -0
  390. package/dist/types/index.js.map +1 -1
  391. package/enums/ElementTypes.ts +18 -0
  392. package/enums/ExportFormat.ts +8 -0
  393. package/enums/LogLevel.ts +17 -1
  394. package/enums/index.ts +1 -0
  395. package/helpers/ConfigChecker.ts +13 -0
  396. package/helpers/Ensure.ts +13 -0
  397. package/helpers/FlightTracker.ts +109 -20
  398. package/helpers/GlobalWaitEventHandler.ts +13 -0
  399. package/helpers/LoginHelper.ts +49 -12
  400. package/helpers/PathResolver.ts +22 -0
  401. package/helpers/Poll.ts +13 -1
  402. package/helpers/RegexHelper.ts +15 -3
  403. package/helpers/SubjectNavigator.ts +57 -0
  404. package/helpers/UserSimulationHelper.ts +14 -0
  405. package/helpers/index.ts +1 -0
  406. package/index.ts +1 -0
  407. package/interfaces/IComponentObjects.ts +12 -0
  408. package/interfaces/IComponentSchemaMeta.ts +17 -0
  409. package/interfaces/IProperty.ts +13 -0
  410. package/interfaces/IRegisteredSubjects.ts +12 -0
  411. package/interfaces/ISeedSubjectDraft.ts +17 -0
  412. package/interfaces/ISubject.ts +13 -0
  413. package/interfaces/ISubjectDetail.ts +12 -0
  414. package/mcp/ArtifactResolver.ts +296 -0
  415. package/mcp/index.ts +2 -0
  416. package/package.json +20 -8
  417. package/page-extensions/GlobalComponents.ts +30 -0
  418. package/page-extensions/GoToDeepLink.ts +9 -0
  419. package/page-extensions/LoginFeatures.ts +8 -0
  420. package/page-extensions/SubjectRegistry.ts +32 -0
  421. package/page-extensions/UserSimulation.ts +21 -0
  422. package/page-extensions/WaitEventHandler.ts +20 -0
  423. package/page-overrides/ClickOverride.ts +36 -55
  424. package/page-overrides/FillOverride.ts +59 -73
  425. package/promptCredentials.js +1 -1
  426. package/scripts/Testwise.template.json +1 -1
  427. package/scripts/diagram.js +2267 -0
  428. package/scripts/main.js +84 -63
  429. package/scripts/postinstall.js +55 -42
  430. package/scripts/setup.js +91 -37
  431. package/scripts/sync.js +767 -748
  432. package/services/ConfigBuilder.ts +24 -0
  433. package/services/IndiciumApi.service.ts +44 -6
  434. package/services/Logger.ts +40 -0
  435. package/templates/copilot-instructions.md +130 -0
  436. package/templates/mcp.json +9 -0
  437. package/templates/testwise-test-expert.agent.md +453 -0
  438. package/tests/tsconfig.json +12 -0
  439. package/tsconfig.json +6 -2
  440. package/types/Components.ts +17 -2
  441. package/types/LocatorType.ts +5 -0
  442. package/types/PollTypes.ts +8 -0
  443. package/types/Test.ts +18 -0
  444. package/types/Universal.ts +12 -0
  445. package/types/index.ts +2 -0
  446. package/dist/interfaces/IStoredTestResults.d.ts +0 -5
  447. package/dist/interfaces/IStoredTestResults.js +0 -2
  448. package/dist/interfaces/IStoredTestResults.js.map +0 -1
  449. package/dist/templates/test-artifacts/SubjectPageBase.d.ts +0 -5
  450. package/dist/templates/test-artifacts/SubjectPageBase.js +0 -6
  451. package/dist/templates/test-artifacts/SubjectPageBase.js.map +0 -1
  452. package/dist/templates/test-artifacts/screens/index.d.ts +0 -1
  453. package/dist/templates/test-artifacts/screens/index.js +0 -2
  454. package/dist/templates/test-artifacts/screens/index.js.map +0 -1
  455. package/dist/templates/test-artifacts/subjects/index.d.ts +0 -1
  456. package/dist/templates/test-artifacts/subjects/index.js +0 -2
  457. package/dist/templates/test-artifacts/subjects/index.js.map +0 -1
  458. package/interfaces/IStoredTestResults.ts +0 -6
@@ -1,3 +1,15 @@
1
+ /**
2
+ * Repeatedly calls `fn` at a configurable interval until the optional `predicate` returns
3
+ * truthy or the `timeout` is exceeded, at which point it throws.
4
+ * `onTick` is called with the last value and elapsed time after each failing attempt.
5
+ * @param fn - The async or sync function to poll.
6
+ * @param opts.timeout - Maximum wait time in milliseconds (default `10 000`).
7
+ * @param opts.interval - Polling interval in milliseconds (default `200`).
8
+ * @param opts.predicate - Returns `true` when the result is acceptable (default: truthy check).
9
+ * @param opts.onTick - Called after each failing attempt with the last value and elapsed ms.
10
+ * @returns The first value for which `predicate` returns `true`.
11
+ * @throws If `timeout` is exceeded before `predicate` returns `true`.
12
+ */
1
13
  export async function pollUntil(fn, opts = {}) {
2
14
  const timeout = opts.timeout ?? 10000;
3
15
  const interval = opts.interval ?? 200;
@@ -1 +1 @@
1
- {"version":3,"file":"Poll.js","sourceRoot":"","sources":["../../helpers/Poll.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,SAAS,CAAI,EAAwB,EAAE,OAAuB,EAAE;IACpF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,KAAM,CAAC;IACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;IACtC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAI,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAEzB,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,GAAG,GAAG,MAAM,EAAE,EAAE,CAAC;QACvB,IAAI,EAAE,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;QAExB,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;QACvC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,OAAO,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,IAAI,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"Poll.js","sourceRoot":"","sources":["../../helpers/Poll.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAI,EAAwB,EAAE,OAAuB,EAAE;IACpF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,KAAM,CAAC;IACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;IACtC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAI,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAEzB,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,GAAG,GAAG,MAAM,EAAE,EAAE,CAAC;QACvB,IAAI,EAAE,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;QAExB,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;QACvC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,OAAO,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,IAAI,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
@@ -1,4 +1,19 @@
1
+ /**
2
+ * Escapes all characters with special meaning in regular expressions so that `input`
3
+ * can be safely embedded inside a `RegExp` constructor without unintended pattern matching.
4
+ * @param input - The raw string to escape.
5
+ * @returns The escaped string.
6
+ */
1
7
  export declare function escapeRegex(input: string): string;
8
+ /**
9
+ * Builds a case-insensitive, Unicode-safe `RegExp` that exactly matches `input`.
10
+ * Optionally trims leading/trailing whitespace and collapses internal whitespace runs
11
+ * to a single space to match typical UI text normalization.
12
+ * @param input - The text to match exactly.
13
+ * @param opts.trim - Trim leading/trailing whitespace before matching (default `true`).
14
+ * @param opts.collapseWhitespace - Collapse runs of whitespace to a single space (default `false`).
15
+ * @returns A case-insensitive `RegExp` anchored with `^` and `$`.
16
+ */
2
17
  export declare function exactTextRegex(input: string, opts?: {
3
18
  trim?: boolean;
4
19
  collapseWhitespace?: boolean;
@@ -1,9 +1,21 @@
1
- // Escapes characters with special meaning in regexes.
1
+ /**
2
+ * Escapes all characters with special meaning in regular expressions so that `input`
3
+ * can be safely embedded inside a `RegExp` constructor without unintended pattern matching.
4
+ * @param input - The raw string to escape.
5
+ * @returns The escaped string.
6
+ */
2
7
  export function escapeRegex(input) {
3
8
  return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
4
9
  }
5
- // Exact match, case-insensitive, Unicode-safe.
6
- // By default trims the input; set trim=false for truly literal.
10
+ /**
11
+ * Builds a case-insensitive, Unicode-safe `RegExp` that exactly matches `input`.
12
+ * Optionally trims leading/trailing whitespace and collapses internal whitespace runs
13
+ * to a single space to match typical UI text normalization.
14
+ * @param input - The text to match exactly.
15
+ * @param opts.trim - Trim leading/trailing whitespace before matching (default `true`).
16
+ * @param opts.collapseWhitespace - Collapse runs of whitespace to a single space (default `false`).
17
+ * @returns A case-insensitive `RegExp` anchored with `^` and `$`.
18
+ */
7
19
  export function exactTextRegex(input, opts) {
8
20
  const { trim = true, collapseWhitespace = false } = opts ?? {};
9
21
  let s = trim ? input.trim() : input;
@@ -1 +1 @@
1
- {"version":3,"file":"RegexHelper.js","sourceRoot":"","sources":["../../helpers/RegexHelper.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,+CAA+C;AAC/C,gEAAgE;AAChE,MAAM,UAA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 @@
1
+ import type { Page } from '@playwright/test';
2
+ /**
3
+ * Navigates the browser to a Thinkwise subject deep-link URL and waits for
4
+ * the application to fully settle before returning control to the test.
5
+ *
6
+ * **Why this exists:** Calling `page.goto()` directly does not account for
7
+ * the asynchronous XHR requests that the Thinkwise app fires after a navigation
8
+ * event. Tests that act immediately after a bare `goto` frequently encounter
9
+ * loading spinners, empty grids, or incomplete form data. `SubjectNavigator`
10
+ * wraps navigation in a `FlightTracker` session so the test only continues
11
+ * once the network is truly idle.
12
+ *
13
+ * **How to use it:** You typically don't call this directly — it is used
14
+ * internally by the generated subject class `goTo()` methods. If you need
15
+ * to navigate imperatively in a test, prefer `page.subject.MySubjectClass.goTo()`.
16
+ *
17
+ * @example
18
+ * // Inside a generated subject class:
19
+ * const navigator = new SubjectNavigator(page);
20
+ * await navigator.navigateTo('subjects/Employee/Editable1/Main');
21
+ */
22
+ export declare class SubjectNavigator {
23
+ private readonly _page;
24
+ constructor(page: Page);
25
+ navigateTo(url: string): Promise<void>;
26
+ }
@@ -0,0 +1,51 @@
1
+ import { FlightTracker } from './FlightTracker.js';
2
+ /**
3
+ * Navigates the browser to a Thinkwise subject deep-link URL and waits for
4
+ * the application to fully settle before returning control to the test.
5
+ *
6
+ * **Why this exists:** Calling `page.goto()` directly does not account for
7
+ * the asynchronous XHR requests that the Thinkwise app fires after a navigation
8
+ * event. Tests that act immediately after a bare `goto` frequently encounter
9
+ * loading spinners, empty grids, or incomplete form data. `SubjectNavigator`
10
+ * wraps navigation in a `FlightTracker` session so the test only continues
11
+ * once the network is truly idle.
12
+ *
13
+ * **How to use it:** You typically don't call this directly — it is used
14
+ * internally by the generated subject class `goTo()` methods. If you need
15
+ * to navigate imperatively in a test, prefer `page.subject.MySubjectClass.goTo()`.
16
+ *
17
+ * @example
18
+ * // Inside a generated subject class:
19
+ * const navigator = new SubjectNavigator(page);
20
+ * await navigator.navigateTo('subjects/Employee/Editable1/Main');
21
+ */
22
+ export class SubjectNavigator {
23
+ constructor(page) {
24
+ this._page = page;
25
+ }
26
+ async navigateTo(url) {
27
+ const flightTracker = new FlightTracker();
28
+ const onRequest = (request) => {
29
+ flightTracker.handleRequestStarted(request.url(), request.resourceType());
30
+ };
31
+ const onResponse = (response) => {
32
+ flightTracker.handleRequestFinished(response.request().url());
33
+ };
34
+ const onRequestFailed = (request) => {
35
+ flightTracker.handleRequestFailed(request.url());
36
+ };
37
+ this._page.on('request', onRequest);
38
+ this._page.on('response', onResponse);
39
+ this._page.on('requestfailed', onRequestFailed);
40
+ try {
41
+ await this._page.goToDeepLink(url);
42
+ await flightTracker.waitForNavigationToSettle();
43
+ }
44
+ finally {
45
+ this._page.off('request', onRequest);
46
+ this._page.off('response', onResponse);
47
+ this._page.off('requestfailed', onRequestFailed);
48
+ }
49
+ }
50
+ }
51
+ //# sourceMappingURL=SubjectNavigator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubjectNavigator.js","sourceRoot":"","sources":["../../helpers/SubjectNavigator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,gBAAgB;IAG3B,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,GAAW;QACjC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAE1C,MAAM,SAAS,GAAG,CAAC,OAA2C,EAAE,EAAE;YAChE,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;QAC5E,CAAC,CAAC;QACF,MAAM,UAAU,GAAG,CAAC,QAA6C,EAAE,EAAE;YACnE,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QAChE,CAAC,CAAC;QACF,MAAM,eAAe,GAAG,CAAC,OAA2C,EAAE,EAAE;YACtE,aAAa,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACnD,CAAC,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QAEhD,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YACnC,MAAM,aAAa,CAAC,yBAAyB,EAAE,CAAC;QAClD,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACrC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YACvC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF"}
@@ -1,4 +1,18 @@
1
1
  import type { Page } from '@playwright/test';
2
+ /**
3
+ * Simulates switching the active user identity in the Thinkwise application
4
+ * at runtime, without logging out and back in. Useful for testing
5
+ * role-based access control (RBAC) and user-specific workflows.
6
+ *
7
+ * Exposed on the page fixture via `UserSimulation` as `page.simulateUser()`,
8
+ * `page.getSimulatedUser()`, and `page.stopSimulation()`. You do not
9
+ * instantiate `UserSimulationHelper` directly in tests.
10
+ *
11
+ * @example
12
+ * await page.simulateUser('john.doe@example.com');
13
+ * // ... assert behaviour for this user ...
14
+ * await page.stopSimulation();
15
+ */
2
16
  export declare class UserSimulationHelper {
3
17
  private _page;
4
18
  private _serviceUrl;
@@ -1,5 +1,19 @@
1
1
  import { testwiseConfig } from '../services/ConfigBuilder.js';
2
2
  import { pollUntil } from './Poll.js';
3
+ /**
4
+ * Simulates switching the active user identity in the Thinkwise application
5
+ * at runtime, without logging out and back in. Useful for testing
6
+ * role-based access control (RBAC) and user-specific workflows.
7
+ *
8
+ * Exposed on the page fixture via `UserSimulation` as `page.simulateUser()`,
9
+ * `page.getSimulatedUser()`, and `page.stopSimulation()`. You do not
10
+ * instantiate `UserSimulationHelper` directly in tests.
11
+ *
12
+ * @example
13
+ * await page.simulateUser('john.doe@example.com');
14
+ * // ... assert behaviour for this user ...
15
+ * await page.stopSimulation();
16
+ */
3
17
  export class UserSimulationHelper {
4
18
  constructor(page) {
5
19
  this._page = page;
@@ -1 +1 @@
1
- {"version":3,"file":"UserSimulationHelper.js","sourceRoot":"","sources":["../../helpers/UserSimulationHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,OAAO,oBAAoB;IAI/B,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,MAAM,UAAU,GAAG,cAAc,EAAE,CAAC,GAAG,CAAS,gCAAgC,CAAC,CAAC;QAElF,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;QAExG,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,gBAAgB;QAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,6BAA6B,CAAC,CAAC;QAEhG,QAAQ,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;YAC1B,KAAK,GAAG;gBACN,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;gBAC9D,OAAO,EAAE,CAAC;YACZ,KAA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C,0CAA0C,MAAM,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACvF,CAAC;IACH,CAAC;CACF"}
@@ -1,3 +1,4 @@
1
1
  export * from './LoginHelper.js';
2
2
  export * from './PathResolver.js';
3
3
  export * from './RegexHelper.js';
4
+ export * from './SubjectNavigator.js';
@@ -1,4 +1,5 @@
1
1
  export * from './LoginHelper.js';
2
2
  export * from './PathResolver.js';
3
3
  export * from './RegexHelper.js';
4
+ export * from './SubjectNavigator.js';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,28 +1,14 @@
1
- declare const originalLog: {
2
- (...data: any[]): void;
3
- (message?: any, ...optionalParams: any[]): void;
4
- };
5
- declare const originalInfo: {
6
- (...data: any[]): void;
7
- (message?: any, ...optionalParams: any[]): void;
8
- };
9
- declare const originalWarn: {
10
- (...data: any[]): void;
11
- (message?: any, ...optionalParams: any[]): void;
12
- };
13
- declare const originalError: {
14
- (...data: any[]): void;
15
- (message?: any, ...optionalParams: any[]): void;
16
- };
17
- declare const originalDebug: {
18
- (...data: any[]): void;
19
- (message?: any, ...optionalParams: any[]): void;
20
- };
1
+ declare const originalLog: (...data: any[]) => void;
2
+ declare const originalInfo: (...data: any[]) => void;
3
+ declare const originalWarn: (...data: any[]) => void;
4
+ declare const originalError: (...data: any[]) => void;
5
+ declare const originalDebug: (...data: any[]) => void;
21
6
  export * from './artifact-builder/index.js';
22
7
  export * from './components/index.js';
23
8
  export * from './controls/index.js';
24
9
  export * from './enums/index.js';
25
10
  export * from './helpers/index.js';
11
+ export * from './mcp/index.js';
26
12
  export * from './page-extensions/index.js';
27
13
  export * from './page-overrides/index.js';
28
14
  export * from './services/index.js';
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ export * from './components/index.js';
14
14
  export * from './controls/index.js';
15
15
  export * from './enums/index.js';
16
16
  export * from './helpers/index.js';
17
+ export * from './mcp/index.js';
17
18
  export * from './page-extensions/index.js';
18
19
  export * from './page-overrides/index.js';
19
20
  export * from './services/index.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;AAChC,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;AAClC,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;AAClC,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;AACpC,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;AAEpC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACjE,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACnE,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACnE,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,MAAM,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Ae,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACnE,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAErE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC"}
@@ -1,5 +1,17 @@
1
1
  import type { Locator } from '@playwright/test';
2
+ /**
3
+ * Base contract that every `*Objects` class in `components/` and `controls/`
4
+ * must implement.
5
+ *
6
+ * **Why this exists:** Each component is split into two files — a `<Name>.ts`
7
+ * (public API with interaction methods) and a `<Name>Objects.ts` (raw locator
8
+ * accessors). `IComponentObjects` enforces that every `Objects` class exposes
9
+ * the two locators that all Thinkwise screens share: the scoped `context`
10
+ * locator and the page-level `mainHeader` locator used for presence checks.
11
+ */
2
12
  export interface IComponentObjects {
13
+ /** The scoped Playwright `Locator` that roots all locator lookups for this component instance. */
3
14
  context: Locator;
15
+ /** Locator for `main header` — used as a presence anchor to confirm the screen has rendered. */
4
16
  mainHeader: Locator;
5
17
  }
@@ -0,0 +1,15 @@
1
+ import type { SubjectComponents } from '../types/Components.js';
2
+ /** Metadata for a single property within a generated component schema. */
3
+ export interface IComponentPropertyMeta {
4
+ colId: string;
5
+ elementType: string;
6
+ }
7
+ /**
8
+ * The full meta file that SchemaGenerator writes alongside each `.json`
9
+ * schema file, and that SubjectComponentGenerator reads back to drive code
10
+ * generation.
11
+ */
12
+ export interface IComponentSchemaMeta {
13
+ componentType: SubjectComponents;
14
+ properties: Record<string, IComponentPropertyMeta>;
15
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IComponentSchemaMeta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IComponentSchemaMeta.js","sourceRoot":"","sources":["../../interfaces/IComponentSchemaMeta.ts"],"names":[],"mappings":""}
@@ -1,4 +1,17 @@
1
+ /**
2
+ * Describes a single field or column on a Thinkwise screen, as returned by
3
+ * the Indicium API and stored in `seed-data/subjects.json`.
4
+ *
5
+ * The `control_type` drives which Testwise control helper gets generated for
6
+ * the property (e.g. `"field"` → `InputFieldControl`, `"lookup"` → `LookupDropdown`).
7
+ */
1
8
  export interface IProperty {
9
+ /** The field or column identifier as defined in the Thinkwise model (e.g. `"employee_id"`). */
2
10
  col: string;
11
+ /**
12
+ * The Thinkwise UI control type for this property.
13
+ * Drives the control class suffix appended in generated subject components.
14
+ * Common values: `"field"`, `"lookup"`, `"dropdown"`, `"checkbox"`, `"date_picker"`, `"combo_box"`.
15
+ */
3
16
  control_type: string;
4
17
  }
@@ -1,5 +1,17 @@
1
+ /**
2
+ * Describes a subject that has been registered in the consumer project's
3
+ * `registeredSubjects.json` file.
4
+ *
5
+ * The `SubjectRegistration` pipeline step reads generated subject classes and
6
+ * writes an entry here for each one. The `SubjectRegistry` page-extension
7
+ * reads this file at test startup to make all subjects available on
8
+ * `page.subject.<ClassName>`.
9
+ */
1
10
  export interface IRegisteredSubjects {
11
+ /** Thinkwise subject identifier (e.g. `"Employee"`). */
2
12
  subject: string;
13
+ /** Optional variant discriminator when the same subject has multiple variants (e.g. `"Editable1"`). */
3
14
  variant?: string;
15
+ /** Screen type context — `"Main"`, `"Popup"`, `"Zoom"`, or `"Detail"`. */
4
16
  screen_type: string;
5
17
  }
@@ -0,0 +1,16 @@
1
+ import type { IProperty } from './IProperty.js';
2
+ /**
3
+ * Represents a subject as it is built from the Indicium API before properties
4
+ * are fully populated. `properties` is optional here because it is assigned
5
+ * after the initial object is constructed during the build phase.
6
+ *
7
+ * Once written to `subjects.json` and read back via `DataRetriever`, the data
8
+ * is typed as the narrower `ISubject` (which requires `properties`).
9
+ */
10
+ export interface ISeedSubjectDraft {
11
+ subject: string;
12
+ variant: string;
13
+ screentype_context: string;
14
+ screentype_id: string;
15
+ properties?: IProperty[];
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISeedSubjectDraft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISeedSubjectDraft.js","sourceRoot":"","sources":["../../interfaces/ISeedSubjectDraft.ts"],"names":[],"mappings":""}
@@ -1,8 +1,21 @@
1
1
  import type { IProperty } from './IProperty.js';
2
+ /**
3
+ * Represents a single Thinkwise subject as stored in `seed-data/subjects.json`
4
+ * after the `ModelDataBuilder` pipeline step fetches it from the Indicium API.
5
+ *
6
+ * Each subject maps to one screen variant in the Thinkwise application. The
7
+ * `SubjectClassModelBuilder` reads these records and turns them into generated
8
+ * TypeScript subject classes under `test-artifacts/subjects/`.
9
+ */
2
10
  export interface ISubject {
11
+ /** Internal Thinkwise subject identifier (e.g. `"Employee"`). */
3
12
  subject: string;
13
+ /** Subject variant, used to distinguish multiple configurations of the same subject (e.g. `"Editable1"`). */
4
14
  variant: string;
15
+ /** Human-readable screen context: `"Main"`, `"Popup"`, `"Zoom"`, or `"Detail"`. */
5
16
  screentype_context: string;
17
+ /** Thinkwise screen type identifier used to look up the correct screen schema file. */
6
18
  screentype_id: string;
19
+ /** All field/column properties available on this screen. */
7
20
  properties: IProperty[];
8
21
  }
@@ -0,0 +1,11 @@
1
+ /** Screen context variants produced by the artifact-builder pipeline. */
2
+ export type ScreenContext = 'Main' | 'Popup' | 'Zoom' | 'Detail';
3
+ /**
4
+ * Describes a single generated subject class that the SubjectRegistration
5
+ * step registers in the SubjectRegistry.
6
+ */
7
+ export interface ISubjectDetail {
8
+ subject: string;
9
+ variant?: string;
10
+ screen: ScreenContext;
11
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISubjectDetail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISubjectDetail.js","sourceRoot":"","sources":["../../interfaces/ISubjectDetail.ts"],"names":[],"mappings":""}
@@ -0,0 +1,152 @@
1
+ import { PipelinePaths } from '../artifact-builder/helpers/PipelinePaths.js';
2
+ import type { ScreenContext } from '../interfaces/ISubjectDetail.js';
3
+ /** Describes a single generated subject class discovered in the test-artifacts directory. */
4
+ export interface SubjectArtifactInfo {
5
+ /** PascalCase subject folder name (e.g. `"CustomerOrder"`). */
6
+ subject: string;
7
+ /** Exact generated class name (e.g. `"CustomerOrderMain"`). */
8
+ className: string;
9
+ /** Screen context encoded in the class name. */
10
+ screenContext: ScreenContext;
11
+ /**
12
+ * Module specifier that importing code should use, relative to the consumer
13
+ * project root (e.g. `"@thinkwise/testwise/test-artifacts/subjects/CustomerOrder/CustomerOrderMain.js"`).
14
+ */
15
+ importPath: string;
16
+ }
17
+ /** Describes a single field or column on a screen interface. */
18
+ export interface ScreenFieldInfo {
19
+ /** camelCase property name as it appears on the screen interface (e.g. `"customerName"`, `"orderDate"`). */
20
+ propertyName: string;
21
+ /**
22
+ * Testwise control type suffix indicating which control helper to use
23
+ * (e.g. `"Field"`, `"Lookup"`, `"Dropdown"`, `"DatePicker"`, `"Checkbox"`, `"Textarea"`, `"ComboBox"`).
24
+ * Derived from the property name suffix in the generated interface.
25
+ */
26
+ controlType: string;
27
+ /** The component this field belongs to — `"Form"` or `"Grid"`. */
28
+ componentType: 'Form' | 'Grid';
29
+ }
30
+ /** Describes a single typed component property on a generated subject class. */
31
+ export interface ComponentInfo {
32
+ /** camelCase property name as declared on the subject class (e.g. `"grid"`, `"actionBar"`). */
33
+ propertyName: string;
34
+ /** Testwise component class name (e.g. `"Grid"`, `"ActionBar"`, `"Form"`). */
35
+ componentType: string;
36
+ }
37
+ /**
38
+ * Runtime service that reads the generated test-artifact files to answer
39
+ * questions about available subjects, their screen-context variants, and the
40
+ * components exposed on each subject class.
41
+ *
42
+ * Intended to be used by the `@thinkwise/testwise-mcp` server so that AI
43
+ * tooling can discover the correct class names and component properties before
44
+ * generating test code — without having to guess or hallucinate names.
45
+ */
46
+ /**
47
+ * Runtime service that reads the generated test-artifact files to answer
48
+ * questions about available subjects, their screen-context variants, and the
49
+ * components exposed on each subject class.
50
+ *
51
+ * **What it does:** The `@thinkwise/testwise-mcp` MCP server calls these
52
+ * methods to surface information to AI tooling (e.g. GitHub Copilot agents)
53
+ * so the AI can write correct Testwise tests without guessing class names,
54
+ * property names, or field names.
55
+ *
56
+ * **How to use it (as a consumer of the MCP server):** You don't call this
57
+ * class directly — use the MCP tools:
58
+ * - `list_subjects()` — all available subject folder names
59
+ * - `list_artifacts(subject?, screenContext?)` — exact class names + import paths
60
+ * - `get_components(subject, screenContext)` — component properties on a class
61
+ * - `get_screen_interface(subject, screenContext)` — field/column names + control types
62
+ *
63
+ * **For contributors:** This class is intentionally side-effect-free — it
64
+ * only reads files and never writes anything. Do not add browser-interaction
65
+ * logic here.
66
+ *
67
+ * @example
68
+ * // Used internally by the MCP server:
69
+ * const resolver = new ArtifactResolver();
70
+ * const subjects = resolver.listSubjects();
71
+ * const artifacts = resolver.listArtifacts('Employee', 'Main');
72
+ */
73
+ export declare class ArtifactResolver {
74
+ private readonly _paths;
75
+ constructor(paths?: PipelinePaths);
76
+ /**
77
+ * Returns all subject folder names (PascalCase) that have been generated
78
+ * into the test-artifacts directory.
79
+ *
80
+ * @example
81
+ * resolver.listSubjects();
82
+ * // → ["CustomerOrder", "Product", "Employee"]
83
+ */
84
+ listSubjects(): string[];
85
+ /**
86
+ * Returns all artifacts for the given subject, optionally filtered to a
87
+ * specific screen context.
88
+ *
89
+ * When `subject` is omitted every generated artifact is returned.
90
+ *
91
+ * @example
92
+ * // All screen contexts for one subject
93
+ * resolver.listArtifacts('CustomerOrder');
94
+ * // → [{ className: "CustomerOrderMain", screenContext: "Main", ... }, ...]
95
+ *
96
+ * @example
97
+ * // One specific artifact
98
+ * resolver.listArtifacts('CustomerOrder', 'Main');
99
+ * // → [{ className: "CustomerOrderMain", screenContext: "Main", ... }]
100
+ */
101
+ listArtifacts(subject?: string, screenContext?: ScreenContext): SubjectArtifactInfo[];
102
+ /**
103
+ * Returns the typed component properties declared on the generated subject
104
+ * class for the given subject + screen context combination.
105
+ *
106
+ * @example
107
+ * resolver.getComponents('CustomerOrder', 'Main');
108
+ * // → [
109
+ * // { propertyName: "grid", componentType: "Grid" },
110
+ * // { propertyName: "actionBar", componentType: "ActionBar" },
111
+ * // { propertyName: "filterForm",componentType: "FilterForm"},
112
+ * // ]
113
+ */
114
+ getComponents(subject: string, screenContext: ScreenContext): ComponentInfo[];
115
+ /**
116
+ * Returns all fields and columns declared on the generated screen interface
117
+ * for the given subject + screen context combination.
118
+ *
119
+ * The interface lives in `test-artifacts/screens/` and contains every field
120
+ * name, column name, and control type for the screen — enough for an AI to
121
+ * write a complete, accurate test without inspecting a live browser.
122
+ *
123
+ * @example
124
+ * resolver.getScreenInterface('CustomerOrder', 'Main');
125
+ * // → [
126
+ * // { propertyName: "customerName", controlType: "Field", componentType: "Form" },
127
+ * // { propertyName: "orderDate", controlType: "DatePicker", componentType: "Form" },
128
+ * // { propertyName: "status", controlType: "Lookup", componentType: "Form" },
129
+ * // { propertyName: "orderId", controlType: "Column", componentType: "Grid" },
130
+ * // ]
131
+ */
132
+ getScreenInterface(subject: string, screenContext: ScreenContext): ScreenFieldInfo[];
133
+ private inferScreenContext;
134
+ /**
135
+ * Parses component properties from a generated subject class.
136
+ *
137
+ * Generated classes declare properties without `public`:
138
+ * actionBarVXE6V0YT: ActionBar;
139
+ * gridQT3UL7F8: EmployeeGrid;
140
+ */
141
+ private parseComponentProperties;
142
+ /**
143
+ * Parses fields/columns from the Components/ subfolder files for a subject.
144
+ *
145
+ * Generated component files (e.g. EmployeeGrid.ts, EmployeeForm.ts) declare
146
+ * getters like:
147
+ * public get firstNameColumn(): IGridColumnControl { ... }
148
+ * public get firstNameField(): IInputFieldControl { ... }
149
+ */
150
+ private parseScreenInterface;
151
+ private inferControlType;
152
+ }