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
package/src/PM/node.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
- import puppeteer from "puppeteer-core";
3
+ import { ScreencastOptions } from "puppeteer-core";
4
4
  import { PassThrough } from "stream";
5
5
 
6
6
  import { ITLog, ITTestResourceConfiguration } from "../lib";
7
7
 
8
8
  import { PM } from "./index.js";
9
- import { Page } from "puppeteer-core/lib/esm/puppeteer";
9
+ import { CdpPage, Page } from "puppeteer-core/lib/esm/puppeteer";
10
10
 
11
11
  type IFPaths = string[];
12
12
  const fPaths: IFPaths = [];
@@ -23,14 +23,27 @@ export class PM_Node extends PM {
23
23
  this.testResourceConfiguration = t;
24
24
  }
25
25
 
26
- $(selector: string): boolean {
27
- throw new Error("Method not implemented.");
26
+ waitForSelector(p: string, s: string): any {
27
+ return globalThis["waitForSelector"](p, s);
28
28
  }
29
- screencast(opts: object) {
29
+
30
+ closePage(p): string {
31
+ return globalThis["closePage"](p);
32
+ }
33
+
34
+ goto(cdpPage: CdpPage, url: string): any {
35
+ return globalThis["goto"](cdpPage.mainFrame()._id, url);
36
+ }
37
+
38
+ newPage(): CdpPage {
39
+ return globalThis["newPage"]();
40
+ }
41
+
42
+ $(selector: string): boolean {
30
43
  throw new Error("Method not implemented.");
31
44
  }
32
45
 
33
- isDisabled(selector: string): boolean {
46
+ isDisabled(selector: string): Promise<boolean> {
34
47
  throw new Error("Method not implemented.");
35
48
  }
36
49
 
@@ -57,8 +70,30 @@ export class PM_Node extends PM {
57
70
  return globalThis["click"](selector);
58
71
  }
59
72
 
60
- customScreenShot(opts: object) {
61
- return globalThis["customScreenShot"](opts);
73
+ screencast(opts: ScreencastOptions, page: CdpPage) {
74
+ return globalThis["screencast"](
75
+ {
76
+ ...opts,
77
+ path: this.testResourceConfiguration.fs + "/" + opts.path,
78
+ },
79
+ page.mainFrame()._id,
80
+ this.testResourceConfiguration.name
81
+ );
82
+ }
83
+
84
+ screencastStop(p: string) {
85
+ return globalThis["screencastStop"](p);
86
+ }
87
+
88
+ customScreenShot(opts: ScreencastOptions, cdpPage: CdpPage) {
89
+ return globalThis["customScreenShot"](
90
+ {
91
+ ...opts,
92
+ path: this.testResourceConfiguration.fs + "/" + opts.path,
93
+ },
94
+ cdpPage.mainFrame()._id,
95
+ this.testResourceConfiguration.name
96
+ );
62
97
  }
63
98
 
64
99
  existsSync(destFolder: string): boolean {
package/src/PM/web.ts CHANGED
@@ -3,7 +3,8 @@ import { PassThrough } from "stream";
3
3
  import { ITLog, ITTestResourceConfiguration } from "../lib";
4
4
 
5
5
  import { PM } from "./index.js";
6
- import { ScreenshotOptions } from "puppeteer-core";
6
+ import { ScreencastOptions, ScreenshotOptions } from "puppeteer-core";
7
+ import { CdpPage } from "puppeteer-core/lib/esm/puppeteer";
7
8
 
8
9
  type PuppetMasterServer = Record<string, Promise<any>>;
9
10
 
@@ -16,14 +17,41 @@ export class PM_Web extends PM {
16
17
  this.testResourceConfiguration = t;
17
18
  }
18
19
 
20
+ waitForSelector(p: string, s: string): any {
21
+ return window["waitForSelector"](p, s);
22
+ }
23
+
24
+ screencast(opts: ScreencastOptions) {
25
+ return window["screencast"](
26
+ {
27
+ ...opts,
28
+ path: this.testResourceConfiguration.fs + "/" + opts.path,
29
+ },
30
+ this.testResourceConfiguration.name
31
+ );
32
+ }
33
+
34
+ screencastStop(recorder: string) {
35
+ return window["screencastStop"](recorder);
36
+ }
37
+
38
+ closePage(p): string {
39
+ return window["closePage"](p);
40
+ }
41
+
42
+ goto(p, url: string): any {
43
+ return window["goto"](p, url);
44
+ }
45
+
46
+ newPage(): CdpPage {
47
+ return window["newPage"]();
48
+ }
49
+
19
50
  $(selector: string): boolean {
20
51
  return window["$"](selector);
21
52
  }
22
- screencast(opts: object) {
23
- throw new Error("Method not implemented.");
24
- }
25
53
 
26
- isDisabled(selector: string): boolean {
54
+ isDisabled(selector: string): Promise<boolean> {
27
55
  return window["isDisabled"](selector);
28
56
  }
29
57
 
@@ -64,7 +92,7 @@ export class PM_Web extends PM {
64
92
  return window["existsSync"](destFolder);
65
93
  }
66
94
 
67
- mkdirSync() {
95
+ mkdirSync(x) {
68
96
  return window["mkdirSync"](this.testResourceConfiguration.fs + "/");
69
97
  }
70
98
 
@@ -0,0 +1,155 @@
1
+ import ReactDom from "react-dom/client";
2
+ import React, { useEffect, useState } from "react";
3
+
4
+ import 'bootstrap/dist/css/bootstrap.min.css';
5
+ import "./style.css"
6
+
7
+ import { IRunTime, ITestTypes, IBuiltConfig } from "./lib";
8
+ import { Footer } from "./Footer";
9
+
10
+
11
+ type ICollation = {
12
+ name: string;
13
+ runTime: IRunTime;
14
+ tr: {
15
+ ports: number;
16
+ };
17
+ sidecars: ITestTypes[];
18
+ status: string;
19
+ staticAnalysis: string;
20
+ typeErrors: string;
21
+ bddErrors: string;
22
+ };
23
+
24
+ type ICollations = ICollation[];
25
+
26
+ const BigBoard = () => {
27
+
28
+ const [configs, setConfigs] = useState<IBuiltConfig>();
29
+ useEffect(() => {
30
+ (async () => {
31
+ fetch('/kokomoBay/docs/testeranto.json')
32
+ .then(response => response.json())
33
+ .then(json => {
34
+ setConfigs(json)
35
+ })
36
+ .catch(error => console.error(error));
37
+
38
+ })();
39
+ }, []);
40
+
41
+ const [bigBoard, setBigBoard] = useState<Record<string, object>>({});
42
+ useEffect(() => {
43
+ (async () => {
44
+ fetch('/kokomoBay/docs/bigBoard.json')
45
+ .then(response => response.json())
46
+ .then(json => {
47
+ setBigBoard(json)
48
+ })
49
+ .catch(error => console.error(error));
50
+
51
+ })();
52
+ }, []);
53
+
54
+ const [staticAnalysis, setStaticAnalysis] = useState<Record<string, string>>({});
55
+ useEffect(() => {
56
+ (async () => {
57
+
58
+ let accumulator = {};
59
+ for (const t of (configs || { tests: [] as ITestTypes[] }).tests) {
60
+ accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/lint_errors.txt`)).text()
61
+ }
62
+ setStaticAnalysis(accumulator);
63
+
64
+
65
+ })();
66
+ }, [configs, bigBoard]);
67
+
68
+ const [typeErrors, setTypeErrors] = useState<Record<string, string>>({});
69
+ useEffect(() => {
70
+ (async () => {
71
+
72
+ let accumulator = {};
73
+ for (const t of (configs || { tests: [] as ITestTypes[] }).tests) {
74
+ accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/type_errors.txt`)).text()
75
+ }
76
+ setTypeErrors(accumulator);
77
+
78
+
79
+ })();
80
+ }, [configs, bigBoard]);
81
+
82
+ const [bddErrors, setBddErrors] = useState<Record<string, string>>({});
83
+ useEffect(() => {
84
+ (async () => {
85
+
86
+ let accumulator = {};
87
+ for (const t of (configs || { tests: [] as ITestTypes[] }).tests) {
88
+ accumulator[t[0]] = await (await fetch(`/kokomoBay/docs/${t[1]}/${t[0].split(".").slice(0, -1).join(".")}/bdd_errors.txt`)).text()
89
+ }
90
+ setBddErrors(accumulator);
91
+
92
+
93
+ })();
94
+ }, [configs, bigBoard]);
95
+
96
+ if (!configs || !staticAnalysis || !typeErrors || !bddErrors) {
97
+ return <div>loading...</div>
98
+ }
99
+
100
+ const collated: ICollations = configs.tests.map((c) => {
101
+ return {
102
+ ...bigBoard[c[0]],
103
+ name: c[0],
104
+ runTime: c[1],
105
+ tr: c[2],
106
+ sidecars: c[3],
107
+ staticAnalysis: staticAnalysis[c[0]],
108
+ typeErrors: typeErrors[c[0]],
109
+ bddErrors: bddErrors[c[0]],
110
+ } as ICollation
111
+ });
112
+
113
+ return <div >
114
+ <table>
115
+ <tr>
116
+ <td>name</td>
117
+ <td>run time</td>
118
+ <td>BDD errors</td>
119
+ <td>Lint errors</td>
120
+ <td>Type errors</td>
121
+ <td>prompt</td>
122
+ </tr>
123
+ {
124
+ ...collated.map((c) => {
125
+ return <tr>
126
+ <td>{c.name}</td>
127
+ <td>{c.runTime}</td>
128
+ <td><a href={`${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/littleBoard.html`}>{c.bddErrors}</a></td>
129
+ <td><a href={`${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/lint_errors.json`}>{c.staticAnalysis}</a></td>
130
+ <td><a href={`${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/type_errors.txt`}>{c.typeErrors}</a></td>
131
+
132
+
133
+ <td>
134
+ <pre>
135
+ aider --model deepseek/deepseek-chat --load {`docs/${c.runTime}/${c.name.split(".").slice(0, -1).join(".")}/prompt.txt`}
136
+ </pre>
137
+ </td>
138
+
139
+
140
+ </tr>
141
+ })
142
+ }
143
+ </table>
144
+ <Footer />
145
+ </div>
146
+ }
147
+
148
+ document.addEventListener("DOMContentLoaded", function () {
149
+ const elem = document.getElementById("root");
150
+ if (elem) {
151
+ ReactDom.createRoot(elem).render(React.createElement(BigBoard, {}, []));
152
+ }
153
+ });
154
+
155
+ console.log("hello BigBoard!")
@@ -0,0 +1,21 @@
1
+ import staticServer from "node-static";
2
+ import http from "http";
3
+
4
+ const main = async () => {
5
+ process.chdir("../"); // Navigate one level up
6
+
7
+ const fileServer = new staticServer.Server(".", {});
8
+
9
+ http
10
+ .createServer(function (request, response) {
11
+ request
12
+ .addListener("end", function () {
13
+ fileServer.serve(request, response);
14
+ })
15
+ .resume();
16
+ })
17
+ .listen(8080);
18
+
19
+ console.log("Server running on port 8080");
20
+ };
21
+ main();
@@ -3,7 +3,8 @@ import React from "react";
3
3
  import Testeranto from "../../../Node.js";
4
4
 
5
5
  import {
6
- IBaseTest,
6
+ Ibdd_in,
7
+ Ibdd_out,
7
8
  ITestImplementation,
8
9
  ITestSpecification,
9
10
  } from "../../../Types";
@@ -13,31 +14,74 @@ type ISelection = React.CElement<any, any>;
13
14
  type IStore = React.CElement<any, any>;
14
15
  type ISubject = React.CElement<any, any>;
15
16
 
16
- export type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<
17
- ISpec,
18
- object
19
- >;
17
+ export type IImpl<
18
+ I extends Ibdd_in<
19
+ unknown,
20
+ unknown,
21
+ unknown,
22
+ unknown,
23
+ unknown,
24
+ unknown,
25
+ unknown
26
+ >,
27
+ O extends Ibdd_out<
28
+ Record<string, any>,
29
+ Record<string, any>,
30
+ Record<string, any>,
31
+ Record<string, any>,
32
+ Record<string, any>
33
+ >
34
+ > = ITestImplementation<I, O>;
20
35
 
21
- export type ISpec<T extends IBaseTest> = ITestSpecification<T>;
36
+ export type ISpec<
37
+ I extends Ibdd_in<
38
+ unknown,
39
+ unknown,
40
+ unknown,
41
+ unknown,
42
+ unknown,
43
+ unknown,
44
+ unknown
45
+ >,
46
+ O extends Ibdd_out<
47
+ Record<string, any>,
48
+ Record<string, any>,
49
+ Record<string, any>,
50
+ Record<string, any>,
51
+ Record<string, any>
52
+ >
53
+ > = ITestSpecification<I, O>;
22
54
 
23
- export default <ITestShape extends IBaseTest, IState>(
24
- testImplementations: ITestImplementation<ITestShape>,
25
- testSpecifications: ISpec<ITestShape>,
55
+ export default <
56
+ I extends Ibdd_in<
57
+ unknown,
58
+ unknown,
59
+ unknown,
60
+ unknown,
61
+ unknown,
62
+ unknown,
63
+ unknown
64
+ >,
65
+ O extends Ibdd_out<
66
+ Record<string, any>,
67
+ Record<string, any>,
68
+ Record<string, any>,
69
+ Record<string, any>,
70
+ Record<string, any>
71
+ >
72
+ >(
73
+ testImplementations: ITestImplementation<I, O>,
74
+ testSpecifications: ISpec<I, O>,
26
75
  testInput: IInput
27
76
  ) => {
28
- return Testeranto<ITestShape>(
29
- testInput,
30
- testSpecifications,
31
- testImplementations,
32
- {
33
- beforeEach: async (): Promise<IStore> => {
34
- return new Promise((resolve, rej) => {
35
- resolve(React.createElement(testInput, {}, []));
36
- });
37
- },
38
- andWhen: function (s: IStore, whenCB): Promise<ISelection> {
39
- return whenCB()(s);
40
- },
41
- }
42
- );
77
+ return Testeranto<I, O>(testInput, testSpecifications, testImplementations, {
78
+ beforeEach: async (): Promise<IStore> => {
79
+ return new Promise((resolve, rej) => {
80
+ resolve(React.createElement(testInput, {}, []));
81
+ });
82
+ },
83
+ andWhen: function (s: IStore, whenCB): Promise<ISelection> {
84
+ return whenCB()(s);
85
+ },
86
+ });
43
87
  };
@@ -3,7 +3,8 @@ import React from "react";
3
3
  import Testeranto from "../../../Web.js";
4
4
 
5
5
  import {
6
- IBaseTest,
6
+ Ibdd_in,
7
+ Ibdd_out,
7
8
  ITestImplementation,
8
9
  ITestSpecification,
9
10
  } from "../../../Types";
@@ -11,33 +12,75 @@ import {
11
12
  type IInput = typeof React.Component;
12
13
  type ISelection = React.CElement<any, any>;
13
14
  type Store = React.CElement<any, any>;
14
- // type Subject = React.CElement<any, any>;
15
15
 
16
- export type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<
17
- ISpec,
18
- object
19
- >;
16
+ export type IImpl<
17
+ I extends Ibdd_in<
18
+ unknown,
19
+ unknown,
20
+ unknown,
21
+ unknown,
22
+ unknown,
23
+ unknown,
24
+ unknown
25
+ >,
26
+ O extends Ibdd_out<
27
+ Record<string, any>,
28
+ Record<string, any>,
29
+ Record<string, any>,
30
+ Record<string, any>,
31
+ Record<string, any>
32
+ >
33
+ > = ITestImplementation<I, O>;
20
34
 
21
- export type ISpec<T extends IBaseTest> = ITestSpecification<T>;
35
+ export type ISpec<
36
+ I extends Ibdd_in<
37
+ unknown,
38
+ unknown,
39
+ unknown,
40
+ unknown,
41
+ unknown,
42
+ unknown,
43
+ unknown
44
+ >,
45
+ O extends Ibdd_out<
46
+ Record<string, any>,
47
+ Record<string, any>,
48
+ Record<string, any>,
49
+ Record<string, any>,
50
+ Record<string, any>
51
+ >
52
+ > = ITestSpecification<I, O>;
22
53
 
23
- export default <ITestShape extends IBaseTest>(
24
- testImplementations: ITestImplementation<ITestShape>,
25
- testSpecifications: ISpec<ITestShape>,
54
+ export default <
55
+ I extends Ibdd_in<
56
+ unknown,
57
+ unknown,
58
+ unknown,
59
+ unknown,
60
+ unknown,
61
+ unknown,
62
+ unknown
63
+ >,
64
+ O extends Ibdd_out<
65
+ Record<string, any>,
66
+ Record<string, any>,
67
+ Record<string, any>,
68
+ Record<string, any>,
69
+ Record<string, any>
70
+ >
71
+ >(
72
+ testImplementations: ITestImplementation<I, O>,
73
+ testSpecifications: ISpec<I, O>,
26
74
  testInput: IInput
27
75
  ) => {
28
- return Testeranto<ITestShape>(
29
- testInput,
30
- testSpecifications,
31
- testImplementations,
32
- {
33
- beforeEach: async (): Promise<Store> => {
34
- return new Promise((resolve, rej) => {
35
- resolve(React.createElement(testInput, {}, []));
36
- });
37
- },
38
- andWhen: function (s: Store, whenCB): Promise<ISelection> {
39
- return whenCB()(s);
40
- },
41
- }
42
- );
76
+ return Testeranto<I, O>(testInput, testSpecifications, testImplementations, {
77
+ beforeEach: async (): Promise<Store> => {
78
+ return new Promise((resolve, rej) => {
79
+ resolve(React.createElement(testInput, {}, []));
80
+ });
81
+ },
82
+ andWhen: function (s: Store, whenCB): Promise<ISelection> {
83
+ return whenCB()(s);
84
+ },
85
+ });
43
86
  };
@@ -2,7 +2,8 @@ import { CElement } from "react";
2
2
  import React from "react";
3
3
 
4
4
  import {
5
- IBaseTest,
5
+ Ibdd_in,
6
+ Ibdd_out,
6
7
  IPartialInterface,
7
8
  ITestImplementation,
8
9
  ITestSpecification,
@@ -16,30 +17,50 @@ export type ISelection = CElement<any, any>;
16
17
  export type IStore = CElement<any, any>;
17
18
  export type ISubject = CElement<any, any>;
18
19
 
19
- export type ITestImpl<ITestShape extends IBaseTest> =
20
- ITestImplementation<ITestShape>;
20
+ export type ITestImpl<
21
+ I extends Ibdd_in<
22
+ unknown,
23
+ unknown,
24
+ unknown,
25
+ unknown,
26
+ unknown,
27
+ unknown,
28
+ unknown
29
+ >,
30
+ O extends Ibdd_out<
31
+ Record<string, any>,
32
+ Record<string, any>,
33
+ Record<string, any>,
34
+ Record<string, any>,
35
+ Record<string, any>
36
+ >
37
+ > = ITestImplementation<I, O>;
21
38
 
22
- export type ITestSpec<ITestShape extends IBaseTest> =
23
- ITestSpecification<ITestShape>;
39
+ export type ITestSpec<
40
+ I extends Ibdd_in<
41
+ unknown,
42
+ unknown,
43
+ unknown,
44
+ unknown,
45
+ unknown,
46
+ unknown,
47
+ unknown
48
+ >,
49
+ O extends Ibdd_out<
50
+ Record<string, any>,
51
+ Record<string, any>,
52
+ Record<string, any>,
53
+ Record<string, any>,
54
+ Record<string, any>
55
+ >
56
+ > = ITestSpecification<I, O>;
24
57
 
25
58
  export const testInterface: IPartialInterface<any> = {
26
- // beforeAll: async (proto, testResource, artificer, pm): Promise<IStore> => {
27
- // return React.createElement(proto);
28
- // // return new Promise((resolve, rej) => {
29
- // // resolve(x());
30
- // // });
31
- // },
32
- // beforeEach: async (subject, initializer, artificer): Promise<IStore> => {
33
- // return new Promise((resolve, rej) => {
34
- // resolve(React.createElement(subject));
35
- // });
36
- // },
37
- andWhen: async (s: IStore, whenCB): Promise<IStore> => {
59
+ andWhen: async (s, whenCB) => {
38
60
  await whenCB(s());
39
61
  return new Promise((resolve, rej) => {
40
62
  resolve(React.createElement(s));
41
63
  });
42
- // return whenCB(s);
43
64
  },
44
65
  butThen: async (subject, thenCB) => {
45
66
  await thenCB(subject());
@@ -1,5 +1,5 @@
1
1
  import Testeranto from "../../../Node.js";
2
- import { IBaseTest, IPartialInterface } from "../../../Types";
2
+ import { Ibdd_in, Ibdd_out, IPartialInterface } from "../../../Types";
3
3
 
4
4
  import {
5
5
  ITestImpl,
@@ -8,20 +8,33 @@ import {
8
8
  testInterface as baseInterface,
9
9
  } from "./index.js";
10
10
 
11
- export default <ITestShape extends IBaseTest>(
12
- testImplementations: ITestImpl<ITestShape>,
13
- testSpecifications: ITestSpec<ITestShape>,
11
+ export default <
12
+ I extends Ibdd_in<
13
+ unknown,
14
+ unknown,
15
+ unknown,
16
+ unknown,
17
+ unknown,
18
+ unknown,
19
+ unknown
20
+ >,
21
+ O extends Ibdd_out<
22
+ Record<string, any>,
23
+ Record<string, any>,
24
+ Record<string, any>,
25
+ Record<string, any>,
26
+ Record<string, any>
27
+ >
28
+ >(
29
+ testImplementations: ITestImpl<I, O>,
30
+ testSpecifications: ITestSpec<I, O>,
14
31
  testInput: IInput,
15
- testInterface: IPartialInterface<ITestShape> = baseInterface
32
+ testInterface: IPartialInterface<I> = baseInterface
16
33
  ) => {
17
- return Testeranto<ITestShape>(
34
+ return Testeranto<I, O>(
18
35
  testInput,
19
36
  testSpecifications,
20
37
  testImplementations,
21
38
  testInterface
22
- // {
23
- // ...baseInterface,
24
- // ...testInterface,
25
- // }
26
39
  );
27
40
  };