testeranto 0.94.0 → 0.110.0

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 (308) hide show
  1. package/README.md +1 -0
  2. package/bundle.js +80 -33
  3. package/dist/common/{src/Init.js → Init.js} +28 -0
  4. package/dist/common/{src/PM → PM}/main.js +272 -111
  5. package/dist/common/{src/PM → PM}/node.js +20 -5
  6. package/dist/common/{src/PM → PM}/web.js +19 -4
  7. package/dist/common/ReportServer.js +22 -0
  8. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/index.js +0 -12
  9. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
  10. package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
  11. package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
  12. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +1 -1
  13. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +41 -30
  14. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +17 -7
  15. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +17 -7
  16. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +17 -7
  17. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +17 -7
  18. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +18 -14
  19. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +17 -7
  20. package/dist/common/build.js +222 -0
  21. package/dist/common/{src/defaultConfig.js → defaultConfig.js} +1 -0
  22. package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +6 -0
  23. package/dist/common/esbuildConfigs/inputFilesPlugin.js +27 -0
  24. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
  25. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
  26. package/dist/common/{src/init-docs.js → init-docs.js} +20 -10
  27. package/dist/common/{src/lib → lib}/abstractBase.js +20 -92
  28. package/dist/common/{src/lib → lib}/basebuilder.js +23 -10
  29. package/dist/common/{src/lib → lib}/classBuilder.js +1 -3
  30. package/dist/common/{src/lib → lib}/core.js +26 -10
  31. package/dist/common/{src/lib → lib}/index.js +0 -1
  32. package/dist/common/run.js +297 -0
  33. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  34. package/dist/common/utils.js +43 -0
  35. package/dist/module/Footer.js +4 -0
  36. package/dist/module/Init.js +63 -0
  37. package/dist/module/{src/PM → PM}/main.js +253 -102
  38. package/dist/module/{src/PM → PM}/node.js +20 -5
  39. package/dist/module/{src/PM → PM}/web.js +19 -4
  40. package/dist/module/ReportClient.js +97 -0
  41. package/dist/module/ReportServer.js +17 -0
  42. package/dist/module/SubPackages/react/jsx/index.js +15 -0
  43. package/dist/module/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
  44. package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
  45. package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
  46. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +3 -3
  47. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +24 -23
  48. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +1 -7
  49. package/dist/module/TestReport.js +91 -0
  50. package/dist/module/build.js +184 -0
  51. package/dist/module/{src/defaultConfig.js → defaultConfig.js} +1 -0
  52. package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +3 -0
  53. package/dist/module/esbuildConfigs/inputFilesPlugin.js +22 -0
  54. package/dist/module/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
  55. package/dist/module/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
  56. package/dist/module/{src/init-docs.js → init-docs.js} +1 -1
  57. package/dist/module/{src/lib → lib}/abstractBase.js +20 -92
  58. package/dist/module/{src/lib → lib}/basebuilder.js +23 -10
  59. package/dist/module/{src/lib → lib}/classBuilder.js +1 -3
  60. package/dist/module/{src/lib → lib}/core.js +26 -10
  61. package/dist/module/{src/lib → lib}/index.js +0 -1
  62. package/dist/module/run.js +259 -0
  63. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  64. package/dist/module/utils.js +29 -0
  65. package/dist/prebuild/ReportClient.css +11367 -0
  66. package/dist/prebuild/ReportClient.js +23641 -0
  67. package/dist/prebuild/ReportServer.mjs +16 -0
  68. package/dist/prebuild/TestReport.css +11367 -0
  69. package/dist/prebuild/TestReport.js +27484 -0
  70. package/dist/prebuild/build.mjs +376 -0
  71. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +9 -0
  72. package/dist/prebuild/init-docs.mjs +64 -8
  73. package/dist/prebuild/{run-tests.mjs → run.mjs} +501 -182
  74. package/dist/tsconfig.tsbuildinfo +1 -0
  75. package/dist/types/Node.d.ts +12 -0
  76. package/dist/types/{src/PM → PM}/index.d.ts +11 -3
  77. package/dist/types/{src/PM → PM}/main.d.ts +24 -15
  78. package/dist/types/{src/PM → PM}/node.d.ts +11 -6
  79. package/dist/types/{src/PM → PM}/web.d.ts +11 -7
  80. package/dist/types/SubPackages/react/component/node.d.ts +7 -0
  81. package/dist/types/SubPackages/react/component/web.d.ts +7 -0
  82. package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
  83. package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
  84. package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
  85. package/dist/types/SubPackages/react-dom/component/node.d.ts +11 -0
  86. package/dist/types/SubPackages/react-dom/component/web.d.ts +20 -0
  87. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
  88. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +7 -0
  89. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
  90. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +6 -0
  91. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
  92. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +4 -0
  93. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -0
  94. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
  95. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +9 -0
  96. package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +16 -0
  97. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
  98. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -0
  99. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
  100. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +5 -0
  101. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
  102. package/dist/types/Types.d.ts +61 -0
  103. package/dist/types/Web.d.ts +9 -0
  104. package/dist/types/defaultConfig.d.ts +3 -0
  105. package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +2 -0
  106. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/index.d.ts +1 -1
  107. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/inputFilesPlugin.d.ts +0 -1
  108. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/node.d.ts +1 -1
  109. package/dist/types/{src/esbuildConfigs → esbuildConfigs}/web.d.ts +1 -1
  110. package/dist/types/lib/abstractBase.d.ts +110 -0
  111. package/dist/types/lib/basebuilder.d.ts +27 -0
  112. package/dist/types/lib/classBuilder.d.ts +7 -0
  113. package/dist/types/lib/core.d.ts +7 -0
  114. package/dist/types/lib/index.d.ts +83 -0
  115. package/dist/types/lib/types.d.ts +14 -0
  116. package/dist/types/run.d.ts +1 -0
  117. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  118. package/dist/types/utils.d.ts +9 -0
  119. package/package.json +50 -39
  120. package/src/Footer.tsx +4 -0
  121. package/src/Init.ts +48 -0
  122. package/src/Node.ts +23 -17
  123. package/src/PM/index.ts +13 -9
  124. package/src/PM/main.ts +337 -139
  125. package/src/PM/node.ts +43 -8
  126. package/src/PM/web.ts +34 -6
  127. package/src/ReportClient.tsx +155 -0
  128. package/src/ReportServer.ts +21 -0
  129. package/src/SubPackages/react/component/node.ts +68 -24
  130. package/src/SubPackages/react/component/web.ts +68 -25
  131. package/src/SubPackages/react/jsx/index.ts +39 -18
  132. package/src/SubPackages/react/jsx/node.ts +23 -10
  133. package/src/SubPackages/react/jsx/web.ts +27 -14
  134. package/src/SubPackages/react-dom/component/node.ts +42 -50
  135. package/src/SubPackages/react-dom/component/web.ts +28 -10
  136. package/src/SubPackages/react-dom/jsx/node.ts +54 -56
  137. package/src/SubPackages/react-dom/jsx/web.ts +55 -42
  138. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +23 -7
  139. package/src/SubPackages/react-test-renderer/component/index.ts +38 -5
  140. package/src/SubPackages/react-test-renderer/component/node.ts +24 -5
  141. package/src/SubPackages/react-test-renderer/component/web.ts +22 -5
  142. package/src/SubPackages/react-test-renderer/fc/node.ts +41 -7
  143. package/src/SubPackages/react-test-renderer/fc/web.ts +43 -11
  144. package/src/SubPackages/react-test-renderer/jsx/index.ts +39 -16
  145. package/src/SubPackages/react-test-renderer/jsx/node.ts +22 -5
  146. package/src/SubPackages/react-test-renderer/jsx/web.ts +22 -5
  147. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +39 -6
  148. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +27 -10
  149. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +26 -12
  150. package/src/TestReport.tsx +176 -0
  151. package/src/Types.ts +131 -129
  152. package/src/Web.ts +24 -18
  153. package/src/build.ts +240 -0
  154. package/src/defaultConfig.ts +2 -1
  155. package/src/esbuildConfigs/eslint-formatter-testeranto.ts +5 -0
  156. package/src/esbuildConfigs/featuresPlugin.ts +0 -1
  157. package/src/esbuildConfigs/index.ts +1 -1
  158. package/src/esbuildConfigs/inputFilesPlugin.ts +2 -114
  159. package/src/esbuildConfigs/node.ts +7 -19
  160. package/src/esbuildConfigs/web.ts +6 -21
  161. package/src/init-docs.ts +2 -1
  162. package/src/lib/abstractBase.ts +140 -195
  163. package/src/lib/basebuilder.ts +57 -45
  164. package/src/lib/classBuilder.ts +15 -15
  165. package/src/lib/core.ts +44 -35
  166. package/src/lib/index.ts +47 -98
  167. package/src/lib/readme.md +12 -0
  168. package/src/lib/types.ts +40 -231
  169. package/src/run.ts +398 -0
  170. package/src/style.css +8 -0
  171. package/src/utils.ts +74 -2
  172. package/tsc.log +106 -0
  173. package/Bundle.Dockerfile +0 -52
  174. package/bin/init-docs.js +0 -24
  175. package/dist/common/dist/module/src/Init.js +0 -40
  176. package/dist/common/src/Aider.js +0 -143
  177. package/dist/common/src/Project.js +0 -227
  178. package/dist/common/src/Puppeteer.js +0 -111
  179. package/dist/common/src/SubPackages/puppeteer.js +0 -21
  180. package/dist/common/src/build-tests.js +0 -39
  181. package/dist/common/src/esbuildConfigs/features.js +0 -14
  182. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -87
  183. package/dist/common/src/esbuildConfigs/report.js +0 -14
  184. package/dist/common/src/esbuildConfigs/tests.js +0 -13
  185. package/dist/common/src/run-tests.js +0 -39
  186. package/dist/common/src/utils.js +0 -16
  187. package/dist/common/testeranto.js +0 -15
  188. package/dist/module/src/Aider.js +0 -136
  189. package/dist/module/src/Init.js +0 -35
  190. package/dist/module/src/Project.js +0 -220
  191. package/dist/module/src/Puppeteer.js +0 -106
  192. package/dist/module/src/SubPackages/puppeteer.js +0 -16
  193. package/dist/module/src/SubPackages/react/jsx/index.js +0 -27
  194. package/dist/module/src/build-tests.js +0 -11
  195. package/dist/module/src/esbuildConfigs/features.js +0 -12
  196. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -82
  197. package/dist/module/src/esbuildConfigs/report.js +0 -14
  198. package/dist/module/src/esbuildConfigs/tests.js +0 -11
  199. package/dist/module/src/run-tests.js +0 -11
  200. package/dist/module/src/utils.js +0 -9
  201. package/dist/module/testeranto.js +0 -13
  202. package/dist/prebuild/build-tests.mjs +0 -553
  203. package/dist/types/dist/module/src/Init.d.ts +0 -2
  204. package/dist/types/src/Aider.d.ts +0 -1
  205. package/dist/types/src/Node.d.ts +0 -13
  206. package/dist/types/src/Project.d.ts +0 -12
  207. package/dist/types/src/Puppeteer.d.ts +0 -2
  208. package/dist/types/src/SubPackages/puppeteer.d.ts +0 -6
  209. package/dist/types/src/SubPackages/react/component/node.d.ts +0 -7
  210. package/dist/types/src/SubPackages/react/component/web.d.ts +0 -7
  211. package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -12
  212. package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
  213. package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
  214. package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -12
  215. package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -11
  216. package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -7
  217. package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -6
  218. package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
  219. package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
  220. package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -13
  221. package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -8
  222. package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -3
  223. package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
  224. package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -8
  225. package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -17
  226. package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -8
  227. package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -8
  228. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -16
  229. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
  230. package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
  231. package/dist/types/src/Types.d.ts +0 -51
  232. package/dist/types/src/Web.d.ts +0 -10
  233. package/dist/types/src/defaultConfig.d.ts +0 -3
  234. package/dist/types/src/esbuildConfigs/features.d.ts +0 -4
  235. package/dist/types/src/esbuildConfigs/report.d.ts +0 -0
  236. package/dist/types/src/esbuildConfigs/tests.d.ts +0 -4
  237. package/dist/types/src/lib/abstractBase.d.ts +0 -110
  238. package/dist/types/src/lib/basebuilder.d.ts +0 -27
  239. package/dist/types/src/lib/classBuilder.d.ts +0 -7
  240. package/dist/types/src/lib/core.d.ts +0 -8
  241. package/dist/types/src/lib/index.d.ts +0 -60
  242. package/dist/types/src/lib/types.d.ts +0 -68
  243. package/dist/types/src/utils.d.ts +0 -2
  244. package/dist/types/testeranto.d.ts +0 -16
  245. package/docker-compose.yml +0 -37
  246. package/src/Aider.ts +0 -168
  247. package/src/Project.ts +0 -292
  248. package/src/Puppeteer.ts +0 -143
  249. package/src/SubPackages/puppeteer.ts +0 -51
  250. package/src/build-tests.ts +0 -12
  251. package/src/esbuildConfigs/features.ts +0 -17
  252. package/src/esbuildConfigs/report.ts +0 -15
  253. package/src/esbuildConfigs/tests.ts +0 -14
  254. package/src/run-tests.ts +0 -12
  255. package/testeranto.ts +0 -13
  256. package/dist/common/{src/Node.js → Node.js} +0 -0
  257. package/dist/common/{src/PM → PM}/index.js +0 -0
  258. package/dist/common/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
  259. package/dist/common/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
  260. package/dist/common/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
  261. package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  262. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
  263. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
  264. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
  265. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
  266. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
  267. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
  268. package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  269. package/dist/common/{src/Types.js → Types.js} +0 -0
  270. package/dist/common/{src/Web.js → Web.js} +0 -0
  271. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
  272. package/dist/common/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
  273. package/dist/common/{src/lib → lib}/types.js +0 -0
  274. package/dist/common/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
  275. package/dist/common/{src/web.html.js → web.html.js} +0 -0
  276. package/dist/module/{src/Node.js → Node.js} +0 -0
  277. package/dist/module/{src/PM → PM}/index.js +0 -0
  278. package/dist/module/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
  279. package/dist/module/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
  280. package/dist/module/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
  281. package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
  282. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
  283. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
  284. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +0 -0
  285. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
  286. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
  287. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +0 -0
  288. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +0 -0
  289. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
  290. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
  291. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
  292. package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
  293. /package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  294. /package/dist/module/{src/Types.js → Types.js} +0 -0
  295. /package/dist/module/{src/Web.js → Web.js} +0 -0
  296. /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
  297. /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
  298. /package/dist/module/{src/lib → lib}/types.js +0 -0
  299. /package/dist/module/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
  300. /package/dist/module/{src/web.html.js → web.html.js} +0 -0
  301. /package/dist/types/{src/Init.d.ts → Init.d.ts} +0 -0
  302. /package/dist/types/{src/build-tests.d.ts → ReportServer.d.ts} +0 -0
  303. /package/dist/types/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
  304. /package/dist/types/{src/init-docs.d.ts → build.d.ts} +0 -0
  305. /package/dist/types/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.d.ts +0 -0
  306. /package/dist/types/{src/run-tests.d.ts → init-docs.d.ts} +0 -0
  307. /package/dist/types/{src/puppeteerConfiger.d.ts → puppeteerConfiger.d.ts} +0 -0
  308. /package/dist/types/{src/web.html.d.ts → web.html.d.ts} +0 -0
@@ -1,34 +1,33 @@
1
- import { IBaseTest } from "../Types";
1
+ // import { IBaseTest } from "../Types";
2
2
  import { PM } from "../PM/index.js";
3
3
 
4
4
  import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
5
+ import { IBaseTest } from "../../dist/types/src/Types.js";
6
+ import { Ibdd_in, Ibdd_out } from "../Types.js";
5
7
 
6
8
  export type IGivens<
7
- ITestShape extends IBaseTest<
9
+ I extends Ibdd_in<
8
10
  unknown,
9
11
  unknown,
10
12
  unknown,
11
13
  unknown,
12
14
  unknown,
13
15
  unknown,
14
- unknown,
15
- Record<string, any>,
16
- Record<string, any>,
17
- Record<string, any>,
18
- Record<string, any>,
19
- Record<string, any>
16
+ unknown
20
17
  >
21
- > = Record<string, BaseGiven<ITestShape>>;
18
+ > = Record<string, BaseGiven<I>>;
22
19
 
23
20
  export abstract class BaseSuite<
24
- ITestShape extends IBaseTest<
25
- unknown,
21
+ I extends Ibdd_in<
26
22
  unknown,
27
23
  unknown,
28
24
  unknown,
29
25
  unknown,
30
26
  unknown,
31
27
  unknown,
28
+ unknown
29
+ >,
30
+ O extends Ibdd_out<
32
31
  Record<string, any>,
33
32
  Record<string, any>,
34
33
  Record<string, any>,
@@ -37,18 +36,18 @@ export abstract class BaseSuite<
37
36
  >
38
37
  > {
39
38
  name: string;
40
- givens: IGivens<ITestShape>;
41
- checks: BaseCheck<ITestShape>[];
42
- store: ITestShape["istore"];
43
- fails: BaseGiven<ITestShape>[];
39
+ givens: IGivens<I>;
40
+ checks: BaseCheck<I, O>[];
41
+ store: I["istore"];
42
+ fails: BaseGiven<I>[];
44
43
  testResourceConfiguration: ITTestResourceConfiguration;
45
44
  index: number;
46
45
 
47
46
  constructor(
48
47
  name: string,
49
48
  index: number,
50
- givens: IGivens<ITestShape> = {},
51
- checks: BaseCheck<ITestShape>[] = []
49
+ givens: IGivens<I> = {},
50
+ checks: BaseCheck<I, O>[] = []
52
51
  ) {
53
52
  this.name = name;
54
53
  this.index = index;
@@ -83,29 +82,29 @@ export abstract class BaseSuite<
83
82
  }
84
83
 
85
84
  setup(
86
- s: ITestShape["iinput"],
85
+ s: I["iinput"],
87
86
  artifactory: ITestArtifactory,
88
87
  tr: ITTestResourceConfiguration,
89
88
  pm: PM
90
- ): Promise<ITestShape["isubject"]> {
91
- return new Promise((res) => res(s as unknown as ITestShape["isubject"]));
89
+ ): Promise<I["isubject"]> {
90
+ return new Promise((res) => res(s as unknown as I["isubject"]));
92
91
  }
93
92
 
94
- assertThat(t: ITestShape["then"]): unknown {
93
+ assertThat(t: I["then"]): unknown {
95
94
  return t;
96
95
  }
97
96
 
98
- afterAll(store: ITestShape["istore"], artifactory: ITestArtifactory, pm: PM) {
97
+ afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: PM) {
99
98
  return store;
100
99
  }
101
100
 
102
101
  async run(
103
- input: ITestShape["iinput"],
102
+ input: I["iinput"],
104
103
  testResourceConfiguration: ITTestResourceConfiguration,
105
104
  artifactory: (fPath: string, value: unknown) => void,
106
105
  tLog: (...string) => void,
107
106
  pm: PM
108
- ): Promise<BaseSuite<ITestShape>> {
107
+ ): Promise<BaseSuite<I, O>> {
109
108
  this.testResourceConfiguration = testResourceConfiguration;
110
109
  tLog("test resources: ", JSON.stringify(testResourceConfiguration));
111
110
 
@@ -122,12 +121,15 @@ export abstract class BaseSuite<
122
121
  const beforeAllProxy = new Proxy(pm, {
123
122
  get(target, prop, receiver) {
124
123
  if (prop === "customScreenShot") {
125
- return (opts) =>
126
- target.customScreenShot({
127
- ...opts,
128
- // path: `${filepath}/${opts.path}`,
129
- path: `suite-${sNdx}/beforeAll/${opts.path}`,
130
- });
124
+ return (opts, p) =>
125
+ target.customScreenShot(
126
+ {
127
+ ...opts,
128
+ // path: `${filepath}/${opts.path}`,
129
+ path: `suite-${sNdx}/beforeAll/${opts.path}`,
130
+ },
131
+ p
132
+ );
131
133
  }
132
134
 
133
135
  if (prop === "writeFileSync") {
@@ -135,6 +137,7 @@ export abstract class BaseSuite<
135
137
  target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
136
138
  }
137
139
 
140
+ /* @ts-ignore:next-line */
138
141
  return Reflect.get(...arguments);
139
142
  },
140
143
  });
@@ -209,39 +212,34 @@ export abstract class BaseSuite<
209
212
  }
210
213
 
211
214
  export abstract class BaseGiven<
212
- ITestShape extends IBaseTest<
213
- unknown,
215
+ I extends Ibdd_in<
214
216
  unknown,
215
217
  unknown,
216
218
  unknown,
217
219
  unknown,
218
220
  unknown,
219
221
  unknown,
220
- Record<string, any>,
221
- Record<string, any>,
222
- Record<string, any>,
223
- Record<string, any>,
224
- Record<string, any>
222
+ unknown
225
223
  >
226
224
  > {
227
225
  name: string;
228
226
  features: string[];
229
- whens: BaseWhen<ITestShape>[];
230
- thens: BaseThen<ITestShape>[];
227
+ whens: BaseWhen<I>[];
228
+ thens: BaseThen<I>[];
231
229
  error: Error;
232
230
  fail: any;
233
- store: ITestShape["istore"];
231
+ store: I["istore"];
234
232
  recommendedFsPath: string;
235
- givenCB: ITestShape["given"];
233
+ givenCB: I["given"];
236
234
  initialValues: any;
237
235
  key: string;
238
236
 
239
237
  constructor(
240
238
  name: string,
241
239
  features: string[],
242
- whens: BaseWhen<ITestShape>[],
243
- thens: BaseThen<ITestShape>[],
244
- givenCB: ITestShape["given"],
240
+ whens: BaseWhen<I>[],
241
+ thens: BaseThen<I>[],
242
+ givenCB: I["given"],
245
243
  initialValues: any
246
244
  // key: string
247
245
  ) {
@@ -254,7 +252,7 @@ export abstract class BaseGiven<
254
252
  }
255
253
 
256
254
  beforeAll(
257
- store: ITestShape["istore"],
255
+ store: I["istore"],
258
256
  // artifactory: ITestArtifactory
259
257
  // subject,
260
258
  initializer,
@@ -279,16 +277,16 @@ export abstract class BaseGiven<
279
277
  }
280
278
 
281
279
  abstract givenThat(
282
- subject: ITestShape["isubject"],
280
+ subject: I["isubject"],
283
281
  testResourceConfiguration,
284
282
  artifactory: ITestArtifactory,
285
- givenCB: ITestShape["given"],
283
+ givenCB: I["given"],
286
284
  initialValues: any,
287
285
  pm: PM
288
- ): Promise<ITestShape["istore"]>;
286
+ ): Promise<I["istore"]>;
289
287
 
290
288
  async afterEach(
291
- store: ITestShape["istore"],
289
+ store: I["istore"],
292
290
  key: string,
293
291
  artifactory: ITestArtifactory,
294
292
  pm: PM
@@ -299,21 +297,22 @@ export abstract class BaseGiven<
299
297
  abstract uberCatcher(e);
300
298
 
301
299
  async give(
302
- subject: ITestShape["isubject"],
300
+ subject: I["isubject"],
303
301
  key: string,
304
302
  testResourceConfiguration: ITTestResourceConfiguration,
305
- tester: (t: Awaited<ITestShape["then"]> | undefined) => boolean,
303
+ tester: (t: Awaited<I["then"]> | undefined) => boolean,
306
304
  artifactory: ITestArtifactory,
307
305
  tLog: ITLog,
308
306
  pm: PM,
309
307
  suiteNdx: number
310
308
  ) {
311
309
  this.key = key;
310
+
312
311
  tLog(`\n ${this.key}`);
313
312
  tLog(`\n Given: ${this.name}`);
314
313
 
315
314
  const givenArtifactory = (fPath: string, value: unknown) =>
316
- artifactory(`given-${this.key}/${fPath}`, value);
315
+ artifactory(`given-${key}/${fPath}`, value);
317
316
  try {
318
317
  // tLog(`\n Given this.store`, this.store);
319
318
 
@@ -322,19 +321,34 @@ export abstract class BaseGiven<
322
321
  if (prop === "writeFileSync") {
323
322
  return (fp, contents) =>
324
323
  target[prop](
325
- `suite-${suiteNdx}/given-${this.key}/when/beforeEach/${fp}`,
324
+ `suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`,
326
325
  contents
327
326
  );
328
327
  }
329
328
 
330
329
  if (prop === "customScreenShot") {
331
- return (opts) =>
332
- target.customScreenShot({
333
- ...opts,
334
- path: `suite-${suiteNdx}/given-${this.key}/when/beforeEach/${opts.path}`,
335
- });
330
+ return (opts, p) =>
331
+ target.customScreenShot(
332
+ {
333
+ ...opts,
334
+ path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}`,
335
+ },
336
+ p
337
+ );
338
+ }
339
+
340
+ if (prop === "screencast") {
341
+ return (opts, p) =>
342
+ target.screencast(
343
+ {
344
+ ...opts,
345
+ path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}`,
346
+ },
347
+ p
348
+ );
336
349
  }
337
350
 
351
+ /* @ts-ignore:next-line */
338
352
  return Reflect.get(...arguments);
339
353
  },
340
354
  });
@@ -360,7 +374,7 @@ export abstract class BaseGiven<
360
374
  testResourceConfiguration,
361
375
  tLog,
362
376
  pm,
363
- `suite-${suiteNdx}/given-${this.key}/when/${whenNdx}`
377
+ `suite-${suiteNdx}/given-${key}/when/${whenNdx}`
364
378
  );
365
379
  }
366
380
 
@@ -370,7 +384,7 @@ export abstract class BaseGiven<
370
384
  testResourceConfiguration,
371
385
  tLog,
372
386
  pm,
373
- `suite-${suiteNdx}/given-${this.key}/then-${thenNdx}`
387
+ `suite-${suiteNdx}/given-${key}/then-${thenNdx}`
374
388
  );
375
389
  tester(t);
376
390
  }
@@ -386,21 +400,25 @@ export abstract class BaseGiven<
386
400
  const afterEachProxy = new Proxy(pm, {
387
401
  get(target, prop, receiver) {
388
402
  if (prop === "customScreenShot") {
389
- return (opts) =>
390
- target.customScreenShot({
391
- ...opts,
392
- path: `suite-${suiteNdx}/given-${this.key}/afterEach/${opts.path}`,
393
- });
403
+ return (opts, p) =>
404
+ target.customScreenShot(
405
+ {
406
+ ...opts,
407
+ path: `suite-${suiteNdx}/given-${key}/afterEach/${opts.path}`,
408
+ },
409
+ p
410
+ );
394
411
  }
395
412
 
396
413
  if (prop === "writeFileSync") {
397
414
  return (fp, contents) =>
398
415
  target[prop](
399
- `suite-${suiteNdx}/given-${this.key}/afterEach/${fp}`,
416
+ `suite-${suiteNdx}/given-${key}/afterEach/${fp}`,
400
417
  contents
401
418
  );
402
419
  }
403
420
 
421
+ /* @ts-ignore:next-line */
404
422
  return Reflect.get(...arguments);
405
423
  },
406
424
  });
@@ -420,22 +438,29 @@ export abstract class BaseGiven<
420
438
  }
421
439
  }
422
440
 
423
- export abstract class BaseWhen<ITestShape extends IBaseTest> {
441
+ export abstract class BaseWhen<
442
+ I extends Ibdd_in<
443
+ unknown,
444
+ unknown,
445
+ unknown,
446
+ unknown,
447
+ unknown,
448
+ unknown,
449
+ unknown
450
+ >
451
+ > {
424
452
  public name: string;
425
- whenCB: (x: ITestShape["iselection"]) => ITestShape["then"];
453
+ whenCB: (x: I["iselection"]) => I["then"];
426
454
  error: boolean;
427
455
 
428
- constructor(
429
- name: string,
430
- whenCB: (xyz: ITestShape["iselection"]) => ITestShape["then"]
431
- ) {
456
+ constructor(name: string, whenCB: (xyz: I["iselection"]) => I["then"]) {
432
457
  this.name = name;
433
458
  this.whenCB = whenCB;
434
459
  }
435
460
 
436
461
  abstract andWhen(
437
- store: ITestShape["istore"],
438
- whenCB: (x: ITestShape["iselection"]) => ITestShape["then"],
462
+ store: I["istore"],
463
+ whenCB: (x: I["iselection"]) => I["then"],
439
464
  testResource,
440
465
  pm: PM
441
466
  ): Promise<any>;
@@ -448,7 +473,7 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
448
473
  }
449
474
 
450
475
  async test(
451
- store: ITestShape["istore"],
476
+ store: I["istore"],
452
477
  testResourceConfiguration,
453
478
  tLog: ITLog,
454
479
  pm: PM,
@@ -460,101 +485,21 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
460
485
  const andWhenProxy = new Proxy(pm, {
461
486
  get(target, prop, receiver) {
462
487
  if (prop === "customScreenShot") {
463
- return (opts) =>
464
- target.customScreenShot({
465
- ...opts,
466
- path: `${filepath}/${opts.path}`,
467
- });
488
+ return (opts, p) =>
489
+ target.customScreenShot(
490
+ {
491
+ ...opts,
492
+ path: `${filepath}/${opts.path}`,
493
+ },
494
+ p
495
+ );
468
496
  }
469
497
  if (prop === "writeFileSync") {
470
498
  return (fp, contents) =>
471
499
  target[prop](`${filepath}/andWhen/${fp}`, contents);
472
500
  }
473
501
 
474
- /////////////////////
475
-
476
- // if (prop === "browser") {
477
- // return new Proxy(target[prop], {
478
- // get(bTarget, bProp, bReceiver) {
479
- // if (bProp === "pages") {
480
- // return async () => {
481
- // return bTarget.pages().then((pages) => {
482
- // return pages.map((page) => {
483
- // return new Proxy(page, {
484
- // get(pTarget, pProp, pReciever) {
485
- // // console.log("mark get", pTarget, pProp, pReciever);
486
- // if (pProp === "screenshot") {
487
- // return async (x) => {
488
- // return pm.customScreenShot(
489
- // {
490
- // ...x,
491
- // path:
492
- // `${testResourceConfiguration.fs}/${key}/afterEach` +
493
- // "/" +
494
- // x.path,
495
- // },
496
- // page
497
- // );
498
- // };
499
- // } else if (pProp === "mainFrame") {
500
- // return () => pTarget[pProp]();
501
- // // return target[pProp];
502
- // // return Reflect.get(...arguments);
503
- // } else if (pProp === "exposeFunction") {
504
- // // return Reflect.get(target, prop, receiver);
505
- // return pTarget[pProp].bind(pTarget);
506
- // // return target[pProp];
507
- // } else if (pProp === "removeExposedFunction") {
508
- // // return Reflect.get(target, prop, receiver);
509
- // return pTarget[pProp].bind(pTarget);
510
- // // return target[pProp];
511
- // } else if (pProp === "click") {
512
- // // console.log("mark12", arguments);
513
- // // return Reflect.get(target, prop, receiver);
514
- // // return pTarget[pProp].bind(pTarget);
515
- // // return target[pProp];
516
- // return (selector, options) => {
517
- // pTarget[pProp](selector, options);
518
- // };
519
- // } else if (pProp === "$eval") {
520
- // // return pTarget[pProp].bind(pTarget);
521
- // return (selector, options) => {
522
- // pTarget[pProp](selector, options);
523
- // };
524
- // } else if (pProp === "$") {
525
- // return Reflect.get(...arguments);
526
- // // return Reflect.get(target, prop, receiver);
527
- // // return pTarget[pProp].bind(pTarget);
528
- // // return target[pProp];
529
- // // return pTarget[pProp].bind(pTarget);
530
-
531
- // // return async (s) => {
532
- // // console.log("mark17", s);
533
- // // console.log("pTarget", pTarget);
534
- // // console.log("pProp", pProp);
535
- // // console.log("pReciever", pReciever);
536
- // // // return "XXX";
537
- // // // debugger;
538
- // // return await pTarget[pProp](s);
539
- // // };
540
- // } else {
541
- // return Reflect.get(...arguments);
542
- // }
543
- // },
544
- // });
545
- // });
546
- // });
547
- // // return (await target.pages()).map((page) => {
548
- // // return new Proxy(page, handler2);
549
- // // });
550
- // };
551
- // }
552
- // },
553
- // });
554
- // }
555
-
556
- ///////////////////////
557
-
502
+ /* @ts-ignore:next-line */
558
503
  return Reflect.get(...arguments);
559
504
  },
560
505
  });
@@ -583,29 +528,21 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
583
528
  }
584
529
 
585
530
  export abstract class BaseThen<
586
- ITestShape extends IBaseTest<
587
- unknown,
531
+ I extends Ibdd_in<
588
532
  unknown,
589
533
  unknown,
590
534
  unknown,
591
535
  unknown,
592
536
  unknown,
593
537
  unknown,
594
- Record<string, any>,
595
- Record<string, any>,
596
- Record<string, any>,
597
- Record<string, any>,
598
- Record<string, any>
538
+ unknown
599
539
  >
600
540
  > {
601
541
  public name: string;
602
- thenCB: (storeState: ITestShape["iselection"]) => ITestShape["then"];
542
+ thenCB: (storeState: I["iselection"]) => I["then"];
603
543
  error: boolean;
604
544
 
605
- constructor(
606
- name: string,
607
- thenCB: (val: ITestShape["iselection"]) => ITestShape["then"]
608
- ) {
545
+ constructor(name: string, thenCB: (val: I["iselection"]) => I["then"]) {
609
546
  this.name = name;
610
547
  this.thenCB = thenCB;
611
548
  this.error = false;
@@ -619,29 +556,32 @@ export abstract class BaseThen<
619
556
  }
620
557
 
621
558
  abstract butThen(
622
- store: ITestShape["istore"],
559
+ store: I["istore"],
623
560
  thenCB,
624
561
  testResourceConfiguration: ITTestResourceConfiguration,
625
562
  pm: PM
626
- ): Promise<ITestShape["iselection"]>;
563
+ ): Promise<I["iselection"]>;
627
564
 
628
565
  async test(
629
- store: ITestShape["istore"],
566
+ store: I["istore"],
630
567
  testResourceConfiguration,
631
568
  tLog: ITLog,
632
569
  pm: PM,
633
570
  filepath: string
634
- ): Promise<ITestShape["then"] | undefined> {
571
+ ): Promise<I["then"] | undefined> {
635
572
  tLog(" Then:", this.name);
636
573
  try {
637
574
  const butThenProxy = new Proxy(pm, {
638
575
  get(target, prop, receiver) {
639
576
  if (prop === "customScreenShot") {
640
- return (opts) =>
641
- target.customScreenShot({
642
- ...opts,
643
- path: `${filepath}/${opts.path}`,
644
- });
577
+ return (opts, p) =>
578
+ target.customScreenShot(
579
+ {
580
+ ...opts,
581
+ path: `${filepath}/${opts.path}`,
582
+ },
583
+ p
584
+ );
645
585
  }
646
586
 
647
587
  if (prop === "writeFileSync") {
@@ -649,6 +589,7 @@ export abstract class BaseThen<
649
589
  target[prop](`${filepath}/${fp}`, contents);
650
590
  }
651
591
 
592
+ /* @ts-ignore:next-line */
652
593
  return Reflect.get(...arguments);
653
594
  },
654
595
  });
@@ -671,14 +612,16 @@ export abstract class BaseThen<
671
612
  }
672
613
 
673
614
  export abstract class BaseCheck<
674
- ITestShape extends IBaseTest<
675
- unknown,
615
+ I extends Ibdd_in<
676
616
  unknown,
677
617
  unknown,
678
618
  unknown,
679
619
  unknown,
680
620
  unknown,
681
621
  unknown,
622
+ unknown
623
+ >,
624
+ O extends Ibdd_out<
682
625
  Record<string, any>,
683
626
  Record<string, any>,
684
627
  Record<string, any>,
@@ -690,10 +633,10 @@ export abstract class BaseCheck<
690
633
  features: string[];
691
634
  checkCB: (whens, thens) => any;
692
635
  whens: {
693
- [K in keyof ITestShape["whens"]]: (p, tc) => BaseWhen<ITestShape>;
636
+ [K in keyof O["whens"]]: (p, tc) => BaseWhen<I>;
694
637
  };
695
638
  thens: {
696
- [K in keyof ITestShape["thens"]]: (p, tc) => BaseThen<ITestShape>;
639
+ [K in keyof O["thens"]]: (p, tc) => BaseThen<I>;
697
640
  };
698
641
 
699
642
  constructor(
@@ -711,13 +654,14 @@ export abstract class BaseCheck<
711
654
  }
712
655
 
713
656
  abstract checkThat(
714
- subject: ITestShape["isubject"],
657
+ subject: I["isubject"],
715
658
  testResourceConfiguration,
716
- artifactory: ITestArtifactory
717
- ): Promise<ITestShape["istore"]>;
659
+ artifactory: ITestArtifactory,
660
+ pm: PM
661
+ ): Promise<I["istore"]>;
718
662
 
719
663
  async afterEach(
720
- store: ITestShape["istore"],
664
+ store: I["istore"],
721
665
  key: string,
722
666
  cb,
723
667
  pm: PM
@@ -726,7 +670,7 @@ export abstract class BaseCheck<
726
670
  }
727
671
 
728
672
  async check(
729
- subject: ITestShape["isubject"],
673
+ subject: I["isubject"],
730
674
  key: string,
731
675
  testResourceConfiguration,
732
676
  tester,
@@ -738,7 +682,8 @@ export abstract class BaseCheck<
738
682
  const store = await this.checkThat(
739
683
  subject,
740
684
  testResourceConfiguration,
741
- artifactory
685
+ artifactory,
686
+ pm
742
687
  );
743
688
  await this.checkCB(
744
689
  Object.entries(this.whens).reduce((a, [key, when]) => {