@thinkwise/testwise 0.2.67 → 0.2.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) 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 +35 -2
  32. package/components/filter/FilterForm.ts +10 -0
  33. package/components/filter/FilterPopup.ts +30 -9
  34. package/components/filter/FilterPopupObjects.ts +10 -3
  35. package/components/filter/FindForm.ts +7 -0
  36. package/components/filter/ManagePrefilterPopup.ts +11 -0
  37. package/components/form/Form.ts +16 -0
  38. package/components/grid/Grid.ts +18 -1
  39. package/components/maps/Maps.ts +6 -0
  40. package/components/menu/ListBarMenuComponent.ts +10 -0
  41. package/components/pivot-grid/PivotGrid.ts +6 -0
  42. package/components/pivot-grid/PivotGridFieldList.ts +7 -0
  43. package/components/pop-up/AllRowsPopUp.ts +12 -0
  44. package/components/pop-up/PopUpComponent.ts +11 -0
  45. package/components/prefilter-list/PrefilterList.ts +9 -0
  46. package/components/preview/Preview.ts +6 -0
  47. package/components/report-bar/ReportBar.ts +6 -0
  48. package/components/report-tiles/ReportTiles.ts +6 -0
  49. package/components/scheduler/Scheduler.ts +6 -0
  50. package/components/snackbar/SnackBar.ts +12 -0
  51. package/components/splitter/Splitter.ts +6 -0
  52. package/components/tab/BaseTab.ts +5 -0
  53. package/components/tab/DetailTabPage.ts +11 -0
  54. package/components/tab/Tab.ts +10 -0
  55. package/components/task/TaskBar.ts +13 -3
  56. package/components/task/TaskTiles.ts +12 -3
  57. package/components/topbar/TopBar.ts +10 -0
  58. package/components/tree-view/TreeView.ts +9 -0
  59. package/controls/DateControl.ts +40 -1
  60. package/controls/FormComboBox.ts +30 -0
  61. package/controls/GridColumnControl.ts +34 -3
  62. package/controls/InputFieldControl.ts +49 -0
  63. package/controls/LookupDropdown.ts +29 -0
  64. package/dist/Testwise.js +35 -0
  65. package/dist/Testwise.js.map +1 -1
  66. package/dist/artifact-builder/ArtifactManager.d.ts +18 -1
  67. package/dist/artifact-builder/ArtifactManager.js +24 -2
  68. package/dist/artifact-builder/ArtifactManager.js.map +1 -1
  69. package/dist/artifact-builder/ComponentClassModelBuilder.d.ts +22 -0
  70. package/dist/artifact-builder/ComponentClassModelBuilder.js +115 -0
  71. package/dist/artifact-builder/ComponentClassModelBuilder.js.map +1 -0
  72. package/dist/artifact-builder/InterfaceGenerator.d.ts +15 -6
  73. package/dist/artifact-builder/InterfaceGenerator.js +27 -26
  74. package/dist/artifact-builder/InterfaceGenerator.js.map +1 -1
  75. package/dist/artifact-builder/ModelDataBuilder.d.ts +7 -0
  76. package/dist/artifact-builder/ModelDataBuilder.js +13 -5
  77. package/dist/artifact-builder/ModelDataBuilder.js.map +1 -1
  78. package/dist/artifact-builder/ModelDataRefiner.d.ts +18 -1
  79. package/dist/artifact-builder/ModelDataRefiner.js +18 -3
  80. package/dist/artifact-builder/ModelDataRefiner.js.map +1 -1
  81. package/dist/artifact-builder/SchemaGenerator.d.ts +21 -5
  82. package/dist/artifact-builder/SchemaGenerator.js +38 -26
  83. package/dist/artifact-builder/SchemaGenerator.js.map +1 -1
  84. package/dist/artifact-builder/ScreenInterfaceRefiner.d.ts +18 -1
  85. package/dist/artifact-builder/ScreenInterfaceRefiner.js +23 -9
  86. package/dist/artifact-builder/ScreenInterfaceRefiner.js.map +1 -1
  87. package/dist/artifact-builder/SelectorBuilder.d.ts +18 -5
  88. package/dist/artifact-builder/SelectorBuilder.js +29 -14
  89. package/dist/artifact-builder/SelectorBuilder.js.map +1 -1
  90. package/dist/artifact-builder/SubjectClassModelBuilder.d.ts +38 -0
  91. package/dist/artifact-builder/SubjectClassModelBuilder.js +158 -0
  92. package/dist/artifact-builder/SubjectClassModelBuilder.js.map +1 -0
  93. package/dist/artifact-builder/SubjectComponentGenerator.d.ts +25 -14
  94. package/dist/artifact-builder/SubjectComponentGenerator.js +65 -189
  95. package/dist/artifact-builder/SubjectComponentGenerator.js.map +1 -1
  96. package/dist/artifact-builder/SubjectGenerator.d.ts +32 -13
  97. package/dist/artifact-builder/SubjectGenerator.js +81 -165
  98. package/dist/artifact-builder/SubjectGenerator.js.map +1 -1
  99. package/dist/artifact-builder/SubjectRegistration.d.ts +22 -8
  100. package/dist/artifact-builder/SubjectRegistration.js +29 -14
  101. package/dist/artifact-builder/SubjectRegistration.js.map +1 -1
  102. package/dist/artifact-builder/TsFileModel.d.ts +86 -0
  103. package/dist/artifact-builder/TsFileModel.js +2 -0
  104. package/dist/artifact-builder/TsFileModel.js.map +1 -0
  105. package/dist/artifact-builder/TsFileSerializer.d.ts +19 -0
  106. package/dist/artifact-builder/TsFileSerializer.js +225 -0
  107. package/dist/artifact-builder/TsFileSerializer.js.map +1 -0
  108. package/dist/artifact-builder/helpers/DataRetriever.d.ts +22 -3
  109. package/dist/artifact-builder/helpers/DataRetriever.js +56 -26
  110. package/dist/artifact-builder/helpers/DataRetriever.js.map +1 -1
  111. package/dist/artifact-builder/helpers/NamingHandler.d.ts +18 -6
  112. package/dist/artifact-builder/helpers/NamingHandler.js +20 -61
  113. package/dist/artifact-builder/helpers/NamingHandler.js.map +1 -1
  114. package/dist/artifact-builder/helpers/PipelinePaths.d.ts +52 -0
  115. package/dist/artifact-builder/helpers/PipelinePaths.js +99 -0
  116. package/dist/artifact-builder/helpers/PipelinePaths.js.map +1 -0
  117. package/dist/artifact-builder/helpers/Stopwatch.d.ts +10 -0
  118. package/dist/artifact-builder/helpers/Stopwatch.js +10 -0
  119. package/dist/artifact-builder/helpers/Stopwatch.js.map +1 -1
  120. package/dist/artifact-builder/helpers/index.d.ts +1 -0
  121. package/dist/artifact-builder/helpers/index.js +1 -0
  122. package/dist/artifact-builder/helpers/index.js.map +1 -1
  123. package/dist/artifact-builder/index.d.ts +4 -0
  124. package/dist/artifact-builder/index.js +4 -0
  125. package/dist/artifact-builder/index.js.map +1 -1
  126. package/dist/components/BaseComponentObjects.d.ts +17 -0
  127. package/dist/components/BaseComponentObjects.js +17 -0
  128. package/dist/components/BaseComponentObjects.js.map +1 -1
  129. package/dist/components/action-bar/ActionBar.d.ts +21 -24
  130. package/dist/components/action-bar/ActionBar.js +31 -24
  131. package/dist/components/action-bar/ActionBar.js.map +1 -1
  132. package/dist/components/action-bar/ActionBarObjects.d.ts +1 -0
  133. package/dist/components/action-bar/ActionBarObjects.js +1 -0
  134. package/dist/components/action-bar/ActionBarObjects.js.map +1 -1
  135. package/dist/components/action-bar/CustomActionBar.d.ts +6 -0
  136. package/dist/components/action-bar/CustomActionBar.js +6 -0
  137. package/dist/components/action-bar/CustomActionBar.js.map +1 -1
  138. package/dist/components/cardlist/Cardlist.d.ts +6 -0
  139. package/dist/components/cardlist/Cardlist.js +6 -0
  140. package/dist/components/cardlist/Cardlist.js.map +1 -1
  141. package/dist/components/chart/Chart.d.ts +6 -0
  142. package/dist/components/chart/Chart.js +6 -0
  143. package/dist/components/chart/Chart.js.map +1 -1
  144. package/dist/components/combined-filter/CombinedFilter.d.ts +9 -0
  145. package/dist/components/combined-filter/CombinedFilter.js +9 -0
  146. package/dist/components/combined-filter/CombinedFilter.js.map +1 -1
  147. package/dist/components/cube-view-bar/CubeViewBar.d.ts +6 -0
  148. package/dist/components/cube-view-bar/CubeViewBar.js +6 -0
  149. package/dist/components/cube-view-bar/CubeViewBar.js.map +1 -1
  150. package/dist/components/export/ExportComponent.d.ts +12 -0
  151. package/dist/components/export/ExportComponent.js +12 -0
  152. package/dist/components/export/ExportComponent.js.map +1 -1
  153. package/dist/components/filter/ExcelStyleFilterPopup.d.ts +17 -4
  154. package/dist/components/filter/ExcelStyleFilterPopup.js +35 -23
  155. package/dist/components/filter/ExcelStyleFilterPopup.js.map +1 -1
  156. package/dist/components/filter/ExcelStyleFilterPopupObjects.d.ts +1 -1
  157. package/dist/components/filter/ExcelStyleFilterPopupObjects.js +2 -2
  158. package/dist/components/filter/ExcelStyleFilterPopupObjects.js.map +1 -1
  159. package/dist/components/filter/FilterForm.d.ts +10 -0
  160. package/dist/components/filter/FilterForm.js +10 -0
  161. package/dist/components/filter/FilterForm.js.map +1 -1
  162. package/dist/components/filter/FilterPopup.d.ts +22 -4
  163. package/dist/components/filter/FilterPopup.js +17 -9
  164. package/dist/components/filter/FilterPopup.js.map +1 -1
  165. package/dist/components/filter/FilterPopupObjects.d.ts +5 -2
  166. package/dist/components/filter/FilterPopupObjects.js +5 -2
  167. package/dist/components/filter/FilterPopupObjects.js.map +1 -1
  168. package/dist/components/filter/FindForm.d.ts +7 -0
  169. package/dist/components/filter/FindForm.js +7 -0
  170. package/dist/components/filter/FindForm.js.map +1 -1
  171. package/dist/components/filter/ManagePrefilterPopup.d.ts +11 -0
  172. package/dist/components/filter/ManagePrefilterPopup.js +11 -0
  173. package/dist/components/filter/ManagePrefilterPopup.js.map +1 -1
  174. package/dist/components/form/Form.d.ts +16 -0
  175. package/dist/components/form/Form.js +16 -0
  176. package/dist/components/form/Form.js.map +1 -1
  177. package/dist/components/grid/Grid.d.ts +17 -0
  178. package/dist/components/grid/Grid.js +18 -1
  179. package/dist/components/grid/Grid.js.map +1 -1
  180. package/dist/components/maps/Maps.d.ts +6 -0
  181. package/dist/components/maps/Maps.js +6 -0
  182. package/dist/components/maps/Maps.js.map +1 -1
  183. package/dist/components/menu/ListBarMenuComponent.d.ts +10 -0
  184. package/dist/components/menu/ListBarMenuComponent.js +10 -0
  185. package/dist/components/menu/ListBarMenuComponent.js.map +1 -1
  186. package/dist/components/pivot-grid/PivotGrid.d.ts +6 -0
  187. package/dist/components/pivot-grid/PivotGrid.js +6 -0
  188. package/dist/components/pivot-grid/PivotGrid.js.map +1 -1
  189. package/dist/components/pivot-grid/PivotGridFieldList.d.ts +7 -0
  190. package/dist/components/pivot-grid/PivotGridFieldList.js +7 -0
  191. package/dist/components/pivot-grid/PivotGridFieldList.js.map +1 -1
  192. package/dist/components/pop-up/AllRowsPopUp.d.ts +12 -0
  193. package/dist/components/pop-up/AllRowsPopUp.js +12 -0
  194. package/dist/components/pop-up/AllRowsPopUp.js.map +1 -1
  195. package/dist/components/pop-up/PopUpComponent.d.ts +11 -0
  196. package/dist/components/pop-up/PopUpComponent.js +11 -0
  197. package/dist/components/pop-up/PopUpComponent.js.map +1 -1
  198. package/dist/components/prefilter-list/PrefilterList.d.ts +9 -0
  199. package/dist/components/prefilter-list/PrefilterList.js +9 -0
  200. package/dist/components/prefilter-list/PrefilterList.js.map +1 -1
  201. package/dist/components/preview/Preview.d.ts +6 -0
  202. package/dist/components/preview/Preview.js +6 -0
  203. package/dist/components/preview/Preview.js.map +1 -1
  204. package/dist/components/report-bar/ReportBar.d.ts +6 -0
  205. package/dist/components/report-bar/ReportBar.js +6 -0
  206. package/dist/components/report-bar/ReportBar.js.map +1 -1
  207. package/dist/components/report-tiles/ReportTiles.d.ts +6 -0
  208. package/dist/components/report-tiles/ReportTiles.js +6 -0
  209. package/dist/components/report-tiles/ReportTiles.js.map +1 -1
  210. package/dist/components/scheduler/Scheduler.d.ts +6 -0
  211. package/dist/components/scheduler/Scheduler.js +6 -0
  212. package/dist/components/scheduler/Scheduler.js.map +1 -1
  213. package/dist/components/snackbar/SnackBar.d.ts +12 -0
  214. package/dist/components/snackbar/SnackBar.js +12 -0
  215. package/dist/components/snackbar/SnackBar.js.map +1 -1
  216. package/dist/components/splitter/Splitter.d.ts +6 -0
  217. package/dist/components/splitter/Splitter.js +6 -0
  218. package/dist/components/splitter/Splitter.js.map +1 -1
  219. package/dist/components/tab/BaseTab.d.ts +5 -0
  220. package/dist/components/tab/BaseTab.js +5 -0
  221. package/dist/components/tab/BaseTab.js.map +1 -1
  222. package/dist/components/tab/DetailTabPage.d.ts +11 -0
  223. package/dist/components/tab/DetailTabPage.js +11 -0
  224. package/dist/components/tab/DetailTabPage.js.map +1 -1
  225. package/dist/components/tab/Tab.d.ts +10 -0
  226. package/dist/components/tab/Tab.js +10 -0
  227. package/dist/components/tab/Tab.js.map +1 -1
  228. package/dist/components/task/TaskBar.d.ts +12 -2
  229. package/dist/components/task/TaskBar.js +13 -3
  230. package/dist/components/task/TaskBar.js.map +1 -1
  231. package/dist/components/task/TaskTiles.d.ts +11 -2
  232. package/dist/components/task/TaskTiles.js +12 -3
  233. package/dist/components/task/TaskTiles.js.map +1 -1
  234. package/dist/components/topbar/TopBar.d.ts +10 -0
  235. package/dist/components/topbar/TopBar.js +10 -0
  236. package/dist/components/topbar/TopBar.js.map +1 -1
  237. package/dist/components/tree-view/TreeView.d.ts +9 -0
  238. package/dist/components/tree-view/TreeView.js +9 -0
  239. package/dist/components/tree-view/TreeView.js.map +1 -1
  240. package/dist/controls/DateControl.d.ts +39 -0
  241. package/dist/controls/DateControl.js +18 -1
  242. package/dist/controls/DateControl.js.map +1 -1
  243. package/dist/controls/FormComboBox.d.ts +30 -0
  244. package/dist/controls/FormComboBox.js +8 -0
  245. package/dist/controls/FormComboBox.js.map +1 -1
  246. package/dist/controls/GridColumnControl.d.ts +30 -0
  247. package/dist/controls/GridColumnControl.js +12 -3
  248. package/dist/controls/GridColumnControl.js.map +1 -1
  249. package/dist/controls/InputFieldControl.d.ts +49 -0
  250. package/dist/controls/InputFieldControl.js +30 -0
  251. package/dist/controls/InputFieldControl.js.map +1 -1
  252. package/dist/controls/LookupDropdown.d.ts +29 -0
  253. package/dist/controls/LookupDropdown.js +8 -0
  254. package/dist/controls/LookupDropdown.js.map +1 -1
  255. package/dist/enums/ElementTypes.d.ts +18 -0
  256. package/dist/enums/ElementTypes.js +18 -0
  257. package/dist/enums/ElementTypes.js.map +1 -1
  258. package/dist/enums/ExportFormat.d.ts +8 -0
  259. package/dist/enums/ExportFormat.js +8 -0
  260. package/dist/enums/ExportFormat.js.map +1 -1
  261. package/dist/enums/LogLevel.d.ts +17 -0
  262. package/dist/enums/LogLevel.js +17 -1
  263. package/dist/enums/LogLevel.js.map +1 -1
  264. package/dist/enums/index.d.ts +1 -0
  265. package/dist/enums/index.js +1 -0
  266. package/dist/enums/index.js.map +1 -1
  267. package/dist/helpers/ConfigChecker.d.ts +13 -0
  268. package/dist/helpers/ConfigChecker.js +13 -0
  269. package/dist/helpers/ConfigChecker.js.map +1 -1
  270. package/dist/helpers/Ensure.d.ts +13 -0
  271. package/dist/helpers/Ensure.js +13 -0
  272. package/dist/helpers/Ensure.js.map +1 -1
  273. package/dist/helpers/FlightTracker.d.ts +13 -3
  274. package/dist/helpers/FlightTracker.js +103 -17
  275. package/dist/helpers/FlightTracker.js.map +1 -1
  276. package/dist/helpers/GlobalWaitEventHandler.d.ts +13 -0
  277. package/dist/helpers/GlobalWaitEventHandler.js +13 -0
  278. package/dist/helpers/GlobalWaitEventHandler.js.map +1 -1
  279. package/dist/helpers/LoginHelper.d.ts +35 -1
  280. package/dist/helpers/LoginHelper.js +46 -11
  281. package/dist/helpers/LoginHelper.js.map +1 -1
  282. package/dist/helpers/PathResolver.d.ts +22 -0
  283. package/dist/helpers/PathResolver.js +22 -0
  284. package/dist/helpers/PathResolver.js.map +1 -1
  285. package/dist/helpers/Poll.d.ts +13 -1
  286. package/dist/helpers/Poll.js +12 -0
  287. package/dist/helpers/Poll.js.map +1 -1
  288. package/dist/helpers/RegexHelper.d.ts +15 -0
  289. package/dist/helpers/RegexHelper.js +15 -3
  290. package/dist/helpers/RegexHelper.js.map +1 -1
  291. package/dist/helpers/SubjectNavigator.d.ts +26 -0
  292. package/dist/helpers/SubjectNavigator.js +51 -0
  293. package/dist/helpers/SubjectNavigator.js.map +1 -0
  294. package/dist/helpers/UserSimulationHelper.d.ts +14 -0
  295. package/dist/helpers/UserSimulationHelper.js +14 -0
  296. package/dist/helpers/UserSimulationHelper.js.map +1 -1
  297. package/dist/helpers/index.d.ts +1 -0
  298. package/dist/helpers/index.js +1 -0
  299. package/dist/helpers/index.js.map +1 -1
  300. package/dist/index.d.ts +6 -20
  301. package/dist/index.js +1 -0
  302. package/dist/index.js.map +1 -1
  303. package/dist/interfaces/IComponentObjects.d.ts +12 -0
  304. package/dist/interfaces/IComponentSchemaMeta.d.ts +15 -0
  305. package/dist/interfaces/IComponentSchemaMeta.js +2 -0
  306. package/dist/interfaces/IComponentSchemaMeta.js.map +1 -0
  307. package/dist/interfaces/IProperty.d.ts +13 -0
  308. package/dist/interfaces/IRegisteredSubjects.d.ts +12 -0
  309. package/dist/interfaces/ISeedSubjectDraft.d.ts +16 -0
  310. package/dist/interfaces/ISeedSubjectDraft.js +2 -0
  311. package/dist/interfaces/ISeedSubjectDraft.js.map +1 -0
  312. package/dist/interfaces/ISubject.d.ts +13 -0
  313. package/dist/interfaces/ISubjectDetail.d.ts +11 -0
  314. package/dist/interfaces/ISubjectDetail.js +2 -0
  315. package/dist/interfaces/ISubjectDetail.js.map +1 -0
  316. package/dist/mcp/ArtifactResolver.d.ts +152 -0
  317. package/dist/mcp/ArtifactResolver.js +232 -0
  318. package/dist/mcp/ArtifactResolver.js.map +1 -0
  319. package/dist/mcp/index.d.ts +2 -0
  320. package/dist/mcp/index.js +2 -0
  321. package/dist/mcp/index.js.map +1 -0
  322. package/dist/page-extensions/GlobalComponents.d.ts +30 -0
  323. package/dist/page-extensions/GlobalComponents.js +30 -0
  324. package/dist/page-extensions/GlobalComponents.js.map +1 -1
  325. package/dist/page-extensions/GoToDeepLink.d.ts +9 -0
  326. package/dist/page-extensions/GoToDeepLink.js +9 -0
  327. package/dist/page-extensions/GoToDeepLink.js.map +1 -1
  328. package/dist/page-extensions/LoginFeatures.d.ts +8 -0
  329. package/dist/page-extensions/LoginFeatures.js +8 -0
  330. package/dist/page-extensions/LoginFeatures.js.map +1 -1
  331. package/dist/page-extensions/SubjectRegistry.d.ts +31 -0
  332. package/dist/page-extensions/SubjectRegistry.js +31 -0
  333. package/dist/page-extensions/SubjectRegistry.js.map +1 -1
  334. package/dist/page-extensions/UserSimulation.d.ts +21 -0
  335. package/dist/page-extensions/UserSimulation.js +21 -0
  336. package/dist/page-extensions/UserSimulation.js.map +1 -1
  337. package/dist/page-extensions/WaitEventHandler.d.ts +20 -0
  338. package/dist/page-extensions/WaitEventHandler.js +20 -0
  339. package/dist/page-extensions/WaitEventHandler.js.map +1 -1
  340. package/dist/page-overrides/ClickOverride.d.ts +23 -2
  341. package/dist/page-overrides/ClickOverride.js +34 -50
  342. package/dist/page-overrides/ClickOverride.js.map +1 -1
  343. package/dist/page-overrides/FillOverride.d.ts +23 -0
  344. package/dist/page-overrides/FillOverride.js +56 -61
  345. package/dist/page-overrides/FillOverride.js.map +1 -1
  346. package/dist/services/ConfigBuilder.d.ts +24 -0
  347. package/dist/services/ConfigBuilder.js +24 -0
  348. package/dist/services/ConfigBuilder.js.map +1 -1
  349. package/dist/services/IndiciumApi.service.d.ts +26 -0
  350. package/dist/services/IndiciumApi.service.js +40 -5
  351. package/dist/services/IndiciumApi.service.js.map +1 -1
  352. package/dist/services/Logger.d.ts +13 -0
  353. package/dist/services/Logger.js +39 -0
  354. package/dist/services/Logger.js.map +1 -1
  355. package/dist/types/Components.d.ts +18 -1
  356. package/dist/types/Components.js +0 -1
  357. package/dist/types/Components.js.map +1 -1
  358. package/dist/types/LocatorType.d.ts +5 -0
  359. package/dist/types/LocatorType.js +2 -0
  360. package/dist/types/LocatorType.js.map +1 -0
  361. package/dist/types/PollTypes.d.ts +8 -0
  362. package/dist/types/Test.d.ts +18 -0
  363. package/dist/types/Universal.d.ts +12 -0
  364. package/dist/types/index.d.ts +2 -0
  365. package/dist/types/index.js +2 -0
  366. package/dist/types/index.js.map +1 -1
  367. package/enums/ElementTypes.ts +18 -0
  368. package/enums/ExportFormat.ts +8 -0
  369. package/enums/LogLevel.ts +17 -1
  370. package/enums/index.ts +1 -0
  371. package/helpers/ConfigChecker.ts +13 -0
  372. package/helpers/Ensure.ts +13 -0
  373. package/helpers/FlightTracker.ts +109 -20
  374. package/helpers/GlobalWaitEventHandler.ts +13 -0
  375. package/helpers/LoginHelper.ts +49 -12
  376. package/helpers/PathResolver.ts +22 -0
  377. package/helpers/Poll.ts +13 -1
  378. package/helpers/RegexHelper.ts +15 -3
  379. package/helpers/SubjectNavigator.ts +57 -0
  380. package/helpers/UserSimulationHelper.ts +14 -0
  381. package/helpers/index.ts +1 -0
  382. package/index.ts +1 -0
  383. package/interfaces/IComponentObjects.ts +12 -0
  384. package/interfaces/IComponentSchemaMeta.ts +17 -0
  385. package/interfaces/IProperty.ts +13 -0
  386. package/interfaces/IRegisteredSubjects.ts +12 -0
  387. package/interfaces/ISeedSubjectDraft.ts +17 -0
  388. package/interfaces/ISubject.ts +13 -0
  389. package/interfaces/ISubjectDetail.ts +12 -0
  390. package/mcp/ArtifactResolver.ts +296 -0
  391. package/mcp/index.ts +2 -0
  392. package/package.json +20 -8
  393. package/page-extensions/GlobalComponents.ts +30 -0
  394. package/page-extensions/GoToDeepLink.ts +9 -0
  395. package/page-extensions/LoginFeatures.ts +8 -0
  396. package/page-extensions/SubjectRegistry.ts +32 -0
  397. package/page-extensions/UserSimulation.ts +21 -0
  398. package/page-extensions/WaitEventHandler.ts +20 -0
  399. package/page-overrides/ClickOverride.ts +36 -55
  400. package/page-overrides/FillOverride.ts +59 -73
  401. package/promptCredentials.js +1 -1
  402. package/scripts/Testwise.template.json +1 -1
  403. package/scripts/diagram.js +2267 -0
  404. package/scripts/main.js +84 -63
  405. package/scripts/postinstall.js +55 -42
  406. package/scripts/setup.js +91 -37
  407. package/scripts/sync.js +767 -748
  408. package/services/ConfigBuilder.ts +24 -0
  409. package/services/IndiciumApi.service.ts +44 -6
  410. package/services/Logger.ts +40 -0
  411. package/templates/copilot-instructions.md +130 -0
  412. package/templates/mcp.json +9 -0
  413. package/templates/testwise-test-expert.agent.md +453 -0
  414. package/tests/tsconfig.json +12 -0
  415. package/tsconfig.json +6 -2
  416. package/types/Components.ts +17 -2
  417. package/types/LocatorType.ts +5 -0
  418. package/types/PollTypes.ts +8 -0
  419. package/types/Test.ts +18 -0
  420. package/types/Universal.ts +12 -0
  421. package/types/index.ts +2 -0
  422. package/dist/interfaces/IStoredTestResults.d.ts +0 -5
  423. package/dist/interfaces/IStoredTestResults.js +0 -2
  424. package/dist/interfaces/IStoredTestResults.js.map +0 -1
  425. package/dist/templates/test-artifacts/SubjectPageBase.d.ts +0 -5
  426. package/dist/templates/test-artifacts/SubjectPageBase.js +0 -6
  427. package/dist/templates/test-artifacts/SubjectPageBase.js.map +0 -1
  428. package/dist/templates/test-artifacts/screens/index.d.ts +0 -1
  429. package/dist/templates/test-artifacts/screens/index.js +0 -2
  430. package/dist/templates/test-artifacts/screens/index.js.map +0 -1
  431. package/dist/templates/test-artifacts/subjects/index.d.ts +0 -1
  432. package/dist/templates/test-artifacts/subjects/index.js +0 -2
  433. package/dist/templates/test-artifacts/subjects/index.js.map +0 -1
  434. package/interfaces/IStoredTestResults.ts +0 -6
@@ -0,0 +1,296 @@
1
+ import * as fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ import { PipelinePaths } from '../artifact-builder/helpers/PipelinePaths.js';
4
+ import type { ScreenContext } from '../interfaces/ISubjectDetail.js';
5
+
6
+ /** All known screen context suffixes, ordered longest-first to avoid prefix clashes. */
7
+ const screenContexts: ScreenContext[] = ['Detail', 'Popup', 'Main', 'Zoom'];
8
+
9
+ /** Describes a single generated subject class discovered in the test-artifacts directory. */
10
+ export interface SubjectArtifactInfo {
11
+ /** PascalCase subject folder name (e.g. `"CustomerOrder"`). */
12
+ subject: string;
13
+ /** Exact generated class name (e.g. `"CustomerOrderMain"`). */
14
+ className: string;
15
+ /** Screen context encoded in the class name. */
16
+ screenContext: ScreenContext;
17
+ /**
18
+ * Module specifier that importing code should use, relative to the consumer
19
+ * project root (e.g. `"@thinkwise/testwise/test-artifacts/subjects/CustomerOrder/CustomerOrderMain.js"`).
20
+ */
21
+ importPath: string;
22
+ }
23
+
24
+ /** Describes a single field or column on a screen interface. */
25
+ export interface ScreenFieldInfo {
26
+ /** camelCase property name as it appears on the screen interface (e.g. `"customerName"`, `"orderDate"`). */
27
+ propertyName: string;
28
+ /**
29
+ * Testwise control type suffix indicating which control helper to use
30
+ * (e.g. `"Field"`, `"Lookup"`, `"Dropdown"`, `"DatePicker"`, `"Checkbox"`, `"Textarea"`, `"ComboBox"`).
31
+ * Derived from the property name suffix in the generated interface.
32
+ */
33
+ controlType: string;
34
+ /** The component this field belongs to — `"Form"` or `"Grid"`. */
35
+ componentType: 'Form' | 'Grid';
36
+ }
37
+
38
+ /** Describes a single typed component property on a generated subject class. */
39
+ export interface ComponentInfo {
40
+ /** camelCase property name as declared on the subject class (e.g. `"grid"`, `"actionBar"`). */
41
+ propertyName: string;
42
+ /** Testwise component class name (e.g. `"Grid"`, `"ActionBar"`, `"Form"`). */
43
+ componentType: string;
44
+ }
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
+ * Intended to be used by the `@thinkwise/testwise-mcp` server so that AI
52
+ * tooling can discover the correct class names and component properties before
53
+ * generating test code — without having to guess or hallucinate names.
54
+ */
55
+ /**
56
+ * Runtime service that reads the generated test-artifact files to answer
57
+ * questions about available subjects, their screen-context variants, and the
58
+ * components exposed on each subject class.
59
+ *
60
+ * **What it does:** The `@thinkwise/testwise-mcp` MCP server calls these
61
+ * methods to surface information to AI tooling (e.g. GitHub Copilot agents)
62
+ * so the AI can write correct Testwise tests without guessing class names,
63
+ * property names, or field names.
64
+ *
65
+ * **How to use it (as a consumer of the MCP server):** You don't call this
66
+ * class directly — use the MCP tools:
67
+ * - `list_subjects()` — all available subject folder names
68
+ * - `list_artifacts(subject?, screenContext?)` — exact class names + import paths
69
+ * - `get_components(subject, screenContext)` — component properties on a class
70
+ * - `get_screen_interface(subject, screenContext)` — field/column names + control types
71
+ *
72
+ * **For contributors:** This class is intentionally side-effect-free — it
73
+ * only reads files and never writes anything. Do not add browser-interaction
74
+ * logic here.
75
+ *
76
+ * @example
77
+ * // Used internally by the MCP server:
78
+ * const resolver = new ArtifactResolver();
79
+ * const subjects = resolver.listSubjects();
80
+ * const artifacts = resolver.listArtifacts('Employee', 'Main');
81
+ */
82
+ export class ArtifactResolver {
83
+ private readonly _paths: PipelinePaths;
84
+
85
+ constructor(paths?: PipelinePaths) {
86
+ this._paths = paths ?? new PipelinePaths();
87
+ }
88
+
89
+ /**
90
+ * Returns all subject folder names (PascalCase) that have been generated
91
+ * into the test-artifacts directory.
92
+ *
93
+ * @example
94
+ * resolver.listSubjects();
95
+ * // → ["CustomerOrder", "Product", "Employee"]
96
+ */
97
+ public listSubjects(): string[] {
98
+ const subjectsDir = this._paths.subjects;
99
+
100
+ if (!fs.existsSync(subjectsDir)) return [];
101
+
102
+ return fs.readdirSync(subjectsDir).filter((entry) => fs.statSync(path.join(subjectsDir, entry)).isDirectory());
103
+ }
104
+
105
+ /**
106
+ * Returns all artifacts for the given subject, optionally filtered to a
107
+ * specific screen context.
108
+ *
109
+ * When `subject` is omitted every generated artifact is returned.
110
+ *
111
+ * @example
112
+ * // All screen contexts for one subject
113
+ * resolver.listArtifacts('CustomerOrder');
114
+ * // → [{ className: "CustomerOrderMain", screenContext: "Main", ... }, ...]
115
+ *
116
+ * @example
117
+ * // One specific artifact
118
+ * resolver.listArtifacts('CustomerOrder', 'Main');
119
+ * // → [{ className: "CustomerOrderMain", screenContext: "Main", ... }]
120
+ */
121
+ public listArtifacts(subject?: string, screenContext?: ScreenContext): SubjectArtifactInfo[] {
122
+ const subjects = subject ? [subject] : this.listSubjects();
123
+ const results: SubjectArtifactInfo[] = [];
124
+
125
+ for (const subjectName of subjects) {
126
+ const subjectDir = path.join(this._paths.subjects, subjectName);
127
+
128
+ if (!fs.existsSync(subjectDir)) continue;
129
+
130
+ const files = fs.readdirSync(subjectDir).filter((f) => f.endsWith('.ts') && f !== 'index.ts');
131
+
132
+ for (const file of files) {
133
+ const className = file.replace('.ts', '');
134
+ const context = this.inferScreenContext(className);
135
+
136
+ if (!context) continue;
137
+ if (screenContext && context !== screenContext) continue;
138
+
139
+ results.push({
140
+ subject: subjectName,
141
+ className,
142
+ screenContext: context,
143
+ importPath: `@thinkwise/testwise/test-artifacts/subjects/${subjectName}/${className}.js`
144
+ });
145
+ }
146
+ }
147
+
148
+ return results;
149
+ }
150
+
151
+ /**
152
+ * Returns the typed component properties declared on the generated subject
153
+ * class for the given subject + screen context combination.
154
+ *
155
+ * @example
156
+ * resolver.getComponents('CustomerOrder', 'Main');
157
+ * // → [
158
+ * // { propertyName: "grid", componentType: "Grid" },
159
+ * // { propertyName: "actionBar", componentType: "ActionBar" },
160
+ * // { propertyName: "filterForm",componentType: "FilterForm"},
161
+ * // ]
162
+ */
163
+ public getComponents(subject: string, screenContext: ScreenContext): ComponentInfo[] {
164
+ const artifacts = this.listArtifacts(subject, screenContext);
165
+
166
+ if (artifacts.length === 0) return [];
167
+
168
+ const filePath = path.join(this._paths.subjects, subject, `${artifacts[0].className}.ts`);
169
+
170
+ if (!fs.existsSync(filePath)) return [];
171
+
172
+ return this.parseComponentProperties(fs.readFileSync(filePath, 'utf-8'));
173
+ }
174
+
175
+ /**
176
+ * Returns all fields and columns declared on the generated screen interface
177
+ * for the given subject + screen context combination.
178
+ *
179
+ * The interface lives in `test-artifacts/screens/` and contains every field
180
+ * name, column name, and control type for the screen — enough for an AI to
181
+ * write a complete, accurate test without inspecting a live browser.
182
+ *
183
+ * @example
184
+ * resolver.getScreenInterface('CustomerOrder', 'Main');
185
+ * // → [
186
+ * // { propertyName: "customerName", controlType: "Field", componentType: "Form" },
187
+ * // { propertyName: "orderDate", controlType: "DatePicker", componentType: "Form" },
188
+ * // { propertyName: "status", controlType: "Lookup", componentType: "Form" },
189
+ * // { propertyName: "orderId", controlType: "Column", componentType: "Grid" },
190
+ * // ]
191
+ */
192
+ public getScreenInterface(subject: string, screenContext: ScreenContext): ScreenFieldInfo[] {
193
+ const artifacts = this.listArtifacts(subject, screenContext);
194
+ if (artifacts.length === 0) return [];
195
+
196
+ // Component files live in Components/ subfolder under the subject folder
197
+ const componentsDir = path.join(this._paths.subjects, subject, 'Components');
198
+ if (!fs.existsSync(componentsDir)) return [];
199
+
200
+ const results: ScreenFieldInfo[] = [];
201
+ const componentFiles = fs.readdirSync(componentsDir).filter((f) => f.endsWith('.ts'));
202
+
203
+ for (const file of componentFiles) {
204
+ const content = fs.readFileSync(path.join(componentsDir, file), 'utf-8');
205
+ const interfaceName = file.replace('.ts', '');
206
+ const fields = this.parseScreenInterface(content, interfaceName);
207
+ results.push(...fields);
208
+ }
209
+
210
+ return results;
211
+ }
212
+
213
+ // ── Private helpers ────────────────────────────────────────────────────────
214
+
215
+ private inferScreenContext(className: string): ScreenContext | undefined {
216
+ for (const ctx of screenContexts) {
217
+ if (className.endsWith(ctx)) return ctx;
218
+ }
219
+ return undefined;
220
+ }
221
+
222
+ /**
223
+ * Parses component properties from a generated subject class.
224
+ *
225
+ * Generated classes declare properties without `public`:
226
+ * actionBarVXE6V0YT: ActionBar;
227
+ * gridQT3UL7F8: EmployeeGrid;
228
+ */
229
+ private parseComponentProperties(content: string): ComponentInfo[] {
230
+ const results: ComponentInfo[] = [];
231
+
232
+ // Match class-body property declarations: " name: Type;" (no public keyword)
233
+ // Excludes private fields (_name), constructor, and method declarations
234
+ const propertyRegex = /^\s{4}(\w+)\s*:\s*(\w+)\s*;/gm;
235
+
236
+ for (let match = propertyRegex.exec(content); match !== null; match = propertyRegex.exec(content)) {
237
+ const propertyName = match[1];
238
+ const componentType = match[2];
239
+
240
+ if (propertyName.startsWith('_')) continue;
241
+ if (['string', 'number', 'boolean', 'Page', 'Locator'].includes(componentType)) continue;
242
+
243
+ results.push({ propertyName, componentType });
244
+ }
245
+
246
+ return results;
247
+ }
248
+
249
+ /**
250
+ * Parses fields/columns from the Components/ subfolder files for a subject.
251
+ *
252
+ * Generated component files (e.g. EmployeeGrid.ts, EmployeeForm.ts) declare
253
+ * getters like:
254
+ * public get firstNameColumn(): IGridColumnControl { ... }
255
+ * public get firstNameField(): IInputFieldControl { ... }
256
+ */
257
+ private parseScreenInterface(content: string, interfaceName: string): ScreenFieldInfo[] {
258
+ const results: ScreenFieldInfo[] = [];
259
+
260
+ // Match readonly interface members: " readonly bioColumn: IGridColumnControl;"
261
+ const interfaceRegex = /^\s+readonly\s+(\w+)\s*:\s*(I?\w+Control)\s*;/gm;
262
+ for (let match = interfaceRegex.exec(content); match !== null; match = interfaceRegex.exec(content)) {
263
+ const propertyName = match[1];
264
+ const rawType = match[2];
265
+ const controlType = this.inferControlType(rawType, propertyName);
266
+ const componentType = interfaceName.toLowerCase().includes('grid') ? 'Grid' : 'Form';
267
+ results.push({ propertyName, controlType, componentType: componentType as 'Form' | 'Grid' });
268
+ }
269
+
270
+ return results;
271
+ }
272
+
273
+ private inferControlType(rawType: string, propertyName: string): string {
274
+ const typeMap: Record<string, string> = {
275
+ IGridColumnControl: 'Column',
276
+ GridColumnControl: 'Column',
277
+ IInputFieldControl: 'Field',
278
+ InputFieldControl: 'Field',
279
+ ILookupDropdown: 'Lookup',
280
+ LookupDropdown: 'Lookup',
281
+ IFormComboBox: 'ComboBox',
282
+ FormComboBox: 'ComboBox',
283
+ IDateControl: 'DatePicker',
284
+ DateControl: 'DatePicker',
285
+ ICheckboxControl: 'Checkbox',
286
+ CheckboxControl: 'Checkbox',
287
+ ITextareaControl: 'Textarea',
288
+ TextareaControl: 'Textarea'
289
+ };
290
+
291
+ if (typeMap[rawType]) return typeMap[rawType];
292
+
293
+ const suffixMatch = propertyName.match(/(Field|Lookup|Dropdown|DatePicker|Checkbox|Textarea|ComboBox|Column)$/i);
294
+ return suffixMatch ? suffixMatch[1] : rawType;
295
+ }
296
+ }
package/mcp/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type { ComponentInfo, ScreenFieldInfo, SubjectArtifactInfo } from './ArtifactResolver.js';
2
+ export { ArtifactResolver } from './ArtifactResolver.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkwise/testwise",
3
- "version": "0.2.67",
3
+ "version": "0.2.103",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,25 +11,29 @@
11
11
  "lint": "eslint ./ --cache --ignore-pattern .gitignore",
12
12
  "format:fix": "run-s \"lint --fix\" && biome check --fix --unsafe",
13
13
  "format:check": "run-s \"lint \" && biome check",
14
- "postinstall": "node scripts/main.js postinstall"
14
+ "postinstall": "node scripts/main.js postinstall",
15
+ "test": "vitest run",
16
+ "test:watch": "vitest",
17
+ "test:coverage": "vitest run --coverage",
18
+ "diagram": "node scripts/main.js diagram"
15
19
  },
16
20
  "keywords": [],
17
21
  "author": "",
18
22
  "license": "ISC",
19
23
  "description": "",
20
24
  "dependencies": {
21
- "@thinkwise/backups": "^1.0.16",
22
- "@types/node": "^22.15.29",
25
+ "@thinkwise/backups": "^1.0.20",
23
26
  "axios": "^1.9.0",
24
27
  "chalk": "^5.4.1",
25
28
  "change-case": "^5.4.4",
26
29
  "csv-parse": "^5.6.0",
27
30
  "dotenv": "^17.2.2",
28
- "playwright-bdd": "^8.4.2",
31
+ "playwright-bdd": "^6.6.0",
29
32
  "prettier": "^3.8.1",
30
33
  "prompts": "^2.4.2",
31
34
  "quicktype-core": "^23.2.6",
32
35
  "rimraf": "^6.0.1",
36
+ "ts-morph": "^28.0.0",
33
37
  "ts-node": "^10.9.2",
34
38
  "typescript": "^5.8.3"
35
39
  },
@@ -37,12 +41,15 @@
37
41
  "@playwright/test": "^1.56.1"
38
42
  },
39
43
  "devDependencies": {
40
- "@biomejs/biome": "^2.4.8",
44
+ "@biomejs/biome": "^2.4.12",
41
45
  "@eslint/js": "^9.28.0",
46
+ "@types/node": "^25.6.0",
47
+ "@vitest/coverage-v8": "^4.1.5",
42
48
  "eslint": "^9.39.2",
43
49
  "eslint-plugin-playwright": "^2.2.0",
44
50
  "npm-run-all": "^4.1.5",
45
- "typescript-eslint": "^8.34.0"
51
+ "typescript-eslint": "^8.34.0",
52
+ "vitest": "^4.1.5"
46
53
  },
47
54
  "exports": {
48
55
  ".": {
@@ -52,6 +59,10 @@
52
59
  "./subjects/*": {
53
60
  "types": "./dist/test-artifacts/subjects/*/index.d.ts",
54
61
  "import": "./dist/test-artifacts/subjects/*/index.js"
62
+ },
63
+ "./helpers/SubjectNavigator": {
64
+ "types": "./dist/helpers/SubjectNavigator.d.ts",
65
+ "import": "./dist/helpers/SubjectNavigator.js"
55
66
  }
56
67
  },
57
68
  "files": [
@@ -74,6 +85,7 @@
74
85
  "test-artifacts/",
75
86
  "artifact-builder/",
76
87
  "**/config.json",
77
- "templates/"
88
+ "templates/",
89
+ "mcp/"
78
90
  ]
79
91
  }
@@ -9,6 +9,27 @@ import {
9
9
  } from '../components/index.js';
10
10
  import type { Test } from '../types/Test.js';
11
11
 
12
+ /**
13
+ * Holds pre-constructed instances of the Thinkwise UI components that are
14
+ * present globally across all screens (not tied to any specific subject).
15
+ *
16
+ * Accessed via `page.components` in tests. Available properties:
17
+ * - `popUp` — the main overlay/modal dialog
18
+ * - `export` — the export panel triggered from a grid or list
19
+ * - `snackBar` — the toast notification bar
20
+ * - `topBar` — the application top bar (breadcrumbs, user menu)
21
+ * - `listBarMenu` — the hamburger / list-bar dropdown menu
22
+ * - `managePrefilterPopup` — the "Manage prefilter" popup dialog
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * // Confirm a save popup:
27
+ * await page.components.popUp.confirm();
28
+ *
29
+ * // Check a snackbar message:
30
+ * await expect(page.components.snackBar.message).toHaveText('Saved successfully');
31
+ * ```
32
+ */
12
33
  class GlobalComponents {
13
34
  public popUp: PopUpComponent;
14
35
  public export: ExportComponent;
@@ -36,6 +57,12 @@ declare module '@playwright/test' {
36
57
  export class Components {
37
58
  private _test: Test;
38
59
 
60
+ /**
61
+ * Extends the Playwright `Test` fixture to attach a `GlobalComponents` instance to
62
+ * `page.components` before each test, providing access to shared UI components
63
+ * such as `popUp`, `export`, `snackBar`, `topBar`, `listBarMenu`, and `managePrefilterPopup`.
64
+ * @param test - The Playwright `Test` fixture to extend.
65
+ */
39
66
  constructor(test: Test) {
40
67
  this._test = test.extend({
41
68
  page: async ({ page }, use) => {
@@ -46,6 +73,9 @@ export class Components {
46
73
  });
47
74
  }
48
75
 
76
+ /**
77
+ * Returns the extended `Test` fixture with `page.components` wired up.
78
+ */
49
79
  get test() {
50
80
  return this._test;
51
81
  }
@@ -9,6 +9,12 @@ declare module '@playwright/test' {
9
9
  export class GoToDeepLink {
10
10
  private _test: Test;
11
11
 
12
+ /**
13
+ * Extends the Playwright `Test` fixture to add a `page.goToDeepLink(deepLink)` method.
14
+ * The method preserves the current `#application=` hash segment and appends the given
15
+ * deep link path before navigating to the resulting URL.
16
+ * @param test - The Playwright `Test` fixture to extend.
17
+ */
12
18
  constructor(test: Test) {
13
19
  this._test = test.extend({
14
20
  page: async ({ page }, use) => {
@@ -39,6 +45,9 @@ export class GoToDeepLink {
39
45
  });
40
46
  }
41
47
 
48
+ /**
49
+ * Returns the extended `Test` fixture with `page.goToDeepLink` wired up.
50
+ */
42
51
  get test() {
43
52
  return this._test;
44
53
  }
@@ -15,6 +15,11 @@ export class LoginFeatures {
15
15
  private _loginHelper: LoginHelper | undefined;
16
16
  private _test: Test;
17
17
 
18
+ /**
19
+ * Extends the Playwright `Test` fixture to attach `logIn`, `logInWithCredentials`,
20
+ * `logInWithOptions`, and `logOut` methods to the page, backed by `LoginHelper`.
21
+ * @param test - The Playwright `Test` fixture to extend.
22
+ */
18
23
  constructor(test: Test) {
19
24
  this._test = test.extend({
20
25
  page: async ({ page }, use) => {
@@ -49,6 +54,9 @@ export class LoginFeatures {
49
54
  return this._loginHelper;
50
55
  }
51
56
 
57
+ /**
58
+ * Returns the extended `Test` fixture with login methods wired up on `page`.
59
+ */
52
60
  get test() {
53
61
  return this._test;
54
62
  }
@@ -1,12 +1,44 @@
1
1
  import type { Test } from '../types/Test.js';
2
+
3
+ /**
4
+ * Playwright page-extension that makes every generated subject class available
5
+ * on the `page.subject` proxy during tests.
6
+ *
7
+ * **What it does:** At test startup it reads the registered subject list and
8
+ * wires up a `page.subject` property. Accessing `page.subject.EmployeeMain`
9
+ * returns an instance of the generated `EmployeeMain` class, which exposes
10
+ * typed component properties (`form`, `grid`, `actionBar`, etc.) and a
11
+ * `goTo()` method that navigates to that screen.
12
+ *
13
+ * **Important — do not edit this file directly.** The real implementation is
14
+ * generated from `templates/SubjectRegistry.template.ts` by the
15
+ * `SubjectRegistration` pipeline step. Any changes made here will be
16
+ * overwritten on the next `testwise sync`. Edit the template instead.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * // In a test:
21
+ * const employee = await page.subject.EmployeeEditable1Main.goTo();
22
+ * await employee.form.firstNameField.fill('Jane');
23
+ * await employee.actionBar.save();
24
+ * ```
25
+ */
2
26
  export class SubjectRegistry {
3
27
  private _test: Test;
4
28
 
29
+ /**
30
+ * Stores the provided `Test` instance. The full implementation of this class is
31
+ * generated from the template in the templates folder — do not edit here directly.
32
+ * @param test - The Playwright `Test` fixture.
33
+ */
5
34
  constructor(test: Test) {
6
35
  // Implementation of this class is in the templates folder, don't edit here
7
36
  this._test = test;
8
37
  }
9
38
 
39
+ /**
40
+ * Returns the stored `Test` fixture.
41
+ */
10
42
  get test() {
11
43
  return this._test;
12
44
  }
@@ -9,10 +9,28 @@ declare module '@playwright/test' {
9
9
  }
10
10
  }
11
11
 
12
+ /**
13
+ * Playwright fixture layer that adds user-simulation methods to the page:
14
+ * `page.simulateUser(username)`, `page.getSimulatedUser()`, and
15
+ * `page.stopSimulation()`.
16
+ *
17
+ * These methods switch the active identity inside the running Thinkwise
18
+ * application without a full logout/login cycle, enabling RBAC tests.
19
+ *
20
+ * @example
21
+ * await page.simulateUser('manager@example.com');
22
+ * // assert manager-only visibility ...
23
+ * await page.stopSimulation();
24
+ */
12
25
  export class UserSimulation {
13
26
  private _userSimulationHelper: UserSimulationHelper | undefined;
14
27
  private _test: Test;
15
28
 
29
+ /**
30
+ * Extends the Playwright `Test` fixture to attach `simulateUser`, `getSimulatedUser`,
31
+ * and `stopSimulation` methods to the page, backed by `UserSimulationHelper`.
32
+ * @param test - The Playwright `Test` fixture to extend.
33
+ */
16
34
  constructor(test: Test) {
17
35
  this._test = test.extend({
18
36
  page: async ({ page }, use) => {
@@ -43,6 +61,9 @@ export class UserSimulation {
43
61
  return this._userSimulationHelper;
44
62
  }
45
63
 
64
+ /**
65
+ * Returns the extended `Test` fixture with user simulation methods wired up on `page`.
66
+ */
46
67
  get test() {
47
68
  return this._test;
48
69
  }
@@ -7,9 +7,26 @@ declare module '@playwright/test' {
7
7
  }
8
8
  }
9
9
 
10
+ /**
11
+ * Playwright fixture layer that attaches a `GlobalWaitEventHandler` instance
12
+ * to `page.waitEventHandler` before each test.
13
+ *
14
+ * Use `page.waitEventHandler` when you need to block test execution until a
15
+ * specific URL pattern has been responded to — for example, waiting for a
16
+ * background data-load endpoint before asserting on results.
17
+ *
18
+ * @example
19
+ * await page.waitEventHandler.waitForUrl('/api/employees/load');
20
+ * await expect(subject.grid.rows()).toHaveCount(10);
21
+ */
10
22
  export class WaitEventHandler {
11
23
  private _test: Test;
12
24
 
25
+ /**
26
+ * Extends the Playwright `Test` fixture to attach a `GlobalWaitEventHandler` instance
27
+ * to `page.waitEventHandler` before each test.
28
+ * @param test - The Playwright `Test` fixture to extend.
29
+ */
13
30
  constructor(test: Test) {
14
31
  this._test = test.extend({
15
32
  page: async ({ page }, use) => {
@@ -20,6 +37,9 @@ export class WaitEventHandler {
20
37
  });
21
38
  }
22
39
 
40
+ /**
41
+ * Returns the extended `Test` fixture with `page.waitEventHandler` wired up.
42
+ */
23
43
  get test() {
24
44
  return this._test;
25
45
  }