testeranto 0.47.34 → 0.47.52

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 (309) hide show
  1. package/.nvmrc +1 -0
  2. package/Bundle.Dockerfile +45 -0
  3. package/README.md +86 -11
  4. package/Report.Dockerfile +43 -0
  5. package/dist/cjs-shim.js +12 -0
  6. package/dist/common/Features.js +3 -37
  7. package/dist/common/Init.js +30 -0
  8. package/dist/common/Node.js +15 -66
  9. package/dist/common/PM/index.js +7 -0
  10. package/dist/common/PM/main.js +641 -0
  11. package/dist/common/PM/node.js +88 -0
  12. package/dist/common/PM/web.js +132 -0
  13. package/dist/common/Project.js +109 -637
  14. package/dist/common/Puppeteer.js +103 -0
  15. package/dist/common/Reporter.js +112 -0
  16. package/dist/common/Scheduler.js +1 -0
  17. package/dist/common/SubPackages/puppeteer.js +21 -0
  18. package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
  19. package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
  20. package/dist/common/SubPackages/react/jsx/index.js +25 -0
  21. package/dist/common/SubPackages/react/jsx/node.js +10 -0
  22. package/dist/common/SubPackages/react/jsx/web.js +10 -0
  23. package/dist/common/{subPackages/react-dom/jsx → SubPackages/react-dom/component}/node.js +6 -6
  24. package/dist/common/SubPackages/react-dom/component/web.js +93 -0
  25. package/dist/common/SubPackages/react-dom/jsx/index.js +2 -0
  26. package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
  27. package/dist/common/SubPackages/react-dom/jsx/web.js +118 -0
  28. package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +44 -0
  29. package/dist/common/SubPackages/react-test-renderer/component/index.js +2 -0
  30. package/dist/common/{subPackages/react-test-renderer/component/index.js → SubPackages/react-test-renderer/component/interface.js} +23 -33
  31. package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
  32. package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
  33. package/dist/common/SubPackages/react-test-renderer/fc/node.js +50 -0
  34. package/dist/common/SubPackages/react-test-renderer/fc/web.js +50 -0
  35. package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
  36. package/dist/common/SubPackages/react-test-renderer/jsx/node.js +10 -0
  37. package/dist/common/SubPackages/react-test-renderer/jsx/web.js +10 -0
  38. package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +42 -0
  39. package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
  40. package/dist/common/TaskManBackEnd.js +174 -0
  41. package/dist/common/Web.js +31 -108
  42. package/dist/common/esbuildConfigs/features.js +14 -0
  43. package/dist/common/esbuildConfigs/index.js +21 -0
  44. package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
  45. package/dist/common/esbuildConfigs/node.js +39 -0
  46. package/dist/common/esbuildConfigs/report.js +14 -0
  47. package/dist/common/esbuildConfigs/tests.js +13 -0
  48. package/dist/common/esbuildConfigs/web.js +57 -0
  49. package/dist/common/lib/abstractBase.js +553 -0
  50. package/dist/common/lib/basebuilder.js +79 -0
  51. package/dist/common/lib/classBuilder.js +42 -0
  52. package/dist/common/lib/core.js +75 -0
  53. package/dist/common/lib/index.js +22 -0
  54. package/dist/common/lib/types.js +2 -0
  55. package/dist/common/mongooseSchemas.js +56 -0
  56. package/dist/common/preload.js +14 -27
  57. package/dist/common/puppeteerConfiger.js +24 -0
  58. package/dist/common/report.html.js +31 -0
  59. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  60. package/dist/common/utils.js +16 -0
  61. package/dist/common/web.html.js +22 -0
  62. package/dist/module/ExampleTab.js +112 -0
  63. package/dist/module/Features.js +2 -35
  64. package/dist/module/Init.js +25 -0
  65. package/dist/module/Node.js +15 -66
  66. package/dist/module/PM/index.js +3 -0
  67. package/dist/module/PM/main.js +611 -0
  68. package/dist/module/PM/node.js +81 -0
  69. package/dist/module/PM/web.js +125 -0
  70. package/dist/module/Project.js +110 -615
  71. package/dist/module/Puppeteer.js +98 -0
  72. package/dist/module/Reporter.js +107 -0
  73. package/dist/module/Scheduler.js +1 -0
  74. package/dist/module/SubPackages/puppeteer.js +16 -0
  75. package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
  76. package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
  77. package/dist/module/SubPackages/react/jsx/index.js +19 -0
  78. package/dist/module/SubPackages/react/jsx/node.js +5 -0
  79. package/dist/module/SubPackages/react/jsx/web.js +5 -0
  80. package/dist/module/{subPackages → SubPackages}/react-dom/component/node.js +7 -7
  81. package/dist/module/SubPackages/react-dom/component/web.js +88 -0
  82. package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
  83. package/dist/module/SubPackages/react-dom/jsx/web.js +90 -0
  84. package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +16 -0
  85. package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -0
  86. package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
  87. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
  88. package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
  89. package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
  90. package/dist/module/SubPackages/react-test-renderer/fc/web.js +22 -0
  91. package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
  92. package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
  93. package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
  94. package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +16 -0
  95. package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
  96. package/dist/module/TaskManBackEnd.js +169 -0
  97. package/dist/module/TaskManFrontEnd.js +600 -0
  98. package/dist/module/Web.js +31 -108
  99. package/dist/module/esbuildConfigs/features.js +12 -0
  100. package/dist/module/esbuildConfigs/index.js +19 -0
  101. package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
  102. package/dist/module/esbuildConfigs/node.js +34 -0
  103. package/dist/module/esbuildConfigs/report.js +14 -0
  104. package/dist/module/esbuildConfigs/tests.js +11 -0
  105. package/dist/module/esbuildConfigs/web.js +52 -0
  106. package/dist/module/lib/abstractBase.js +545 -0
  107. package/dist/module/lib/basebuilder.js +75 -0
  108. package/dist/module/lib/classBuilder.js +38 -0
  109. package/dist/module/lib/core.js +72 -0
  110. package/dist/module/lib/index.js +18 -0
  111. package/dist/module/lib/types.js +1 -0
  112. package/dist/module/mongooseSchemas.js +50 -0
  113. package/dist/module/preload.js +15 -26
  114. package/dist/module/puppeteerConfiger.js +19 -0
  115. package/dist/module/report.html.js +29 -0
  116. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  117. package/dist/module/utils.js +9 -0
  118. package/dist/module/web.html.js +20 -0
  119. package/dist/prebuild/TaskManBackEnd.mjs +174 -0
  120. package/dist/prebuild/TaskManFrontEnd.css +12301 -0
  121. package/dist/prebuild/TaskManFrontEnd.js +81264 -0
  122. package/dist/types/Features.d.ts +1 -34
  123. package/dist/types/Init.d.ts +2 -0
  124. package/dist/types/Node.d.ts +5 -11
  125. package/dist/types/PM/index.d.ts +20 -0
  126. package/dist/types/PM/main.d.ts +31 -0
  127. package/dist/types/PM/node.d.ts +27 -0
  128. package/dist/types/PM/web.d.ts +25 -0
  129. package/dist/types/Project.d.ts +3 -29
  130. package/dist/types/Puppeteer.d.ts +2 -0
  131. package/dist/types/Reporter.d.ts +1 -0
  132. package/dist/types/Scheduler.d.ts +0 -0
  133. package/dist/types/SubPackages/puppeteer.d.ts +6 -0
  134. package/dist/types/SubPackages/react/component/node.d.ts +7 -0
  135. package/dist/types/SubPackages/react/component/web.d.ts +7 -0
  136. package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
  137. package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
  138. package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
  139. package/dist/types/SubPackages/react-dom/component/node.d.ts +12 -0
  140. package/dist/types/SubPackages/react-dom/component/web.d.ts +11 -0
  141. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
  142. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
  143. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
  144. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
  145. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
  146. package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
  147. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +8 -0
  148. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +3 -0
  149. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
  150. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +8 -0
  151. package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
  152. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +8 -0
  153. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +8 -0
  154. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
  155. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +4 -0
  156. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
  157. package/dist/types/TaskManBackEnd.d.ts +3 -0
  158. package/dist/types/Types.d.ts +49 -16
  159. package/dist/types/Web.d.ts +5 -11
  160. package/dist/types/esbuildConfigs/features.d.ts +4 -0
  161. package/dist/types/esbuildConfigs/index.d.ts +4 -0
  162. package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
  163. package/dist/types/esbuildConfigs/node.d.ts +4 -0
  164. package/dist/types/esbuildConfigs/report.d.ts +0 -0
  165. package/dist/types/esbuildConfigs/tests.d.ts +4 -0
  166. package/dist/types/esbuildConfigs/web.d.ts +4 -0
  167. package/dist/types/lib/abstractBase.d.ts +104 -0
  168. package/dist/types/lib/basebuilder.d.ts +27 -0
  169. package/dist/types/lib/classBuilder.d.ts +7 -0
  170. package/dist/types/lib/core.d.ts +8 -0
  171. package/dist/types/lib/index.d.ts +59 -0
  172. package/dist/types/lib/types.d.ts +62 -0
  173. package/dist/types/mongooseSchemas.d.ts +124 -0
  174. package/dist/types/preload.d.ts +0 -1
  175. package/dist/types/puppeteerConfiger.d.ts +4 -0
  176. package/dist/types/report.html.d.ts +2 -0
  177. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  178. package/dist/types/utils.d.ts +2 -0
  179. package/dist/types/web.html.d.ts +2 -0
  180. package/index.html +30 -0
  181. package/package.json +151 -79
  182. package/src/ExampleTab.tsx +219 -0
  183. package/src/Features.ts +2 -58
  184. package/src/Init.ts +51 -0
  185. package/src/Node.ts +71 -157
  186. package/src/PM/index.ts +25 -0
  187. package/src/PM/main.ts +830 -0
  188. package/src/PM/node.ts +128 -0
  189. package/src/PM/web.ts +166 -0
  190. package/src/Project.ts +158 -797
  191. package/src/Puppeteer.ts +141 -0
  192. package/src/Reporter.ts +126 -0
  193. package/src/Scheduler.ts +0 -0
  194. package/src/SubPackages/puppeteer.ts +51 -0
  195. package/src/SubPackages/react/component/node.ts +43 -0
  196. package/src/SubPackages/react/component/web.ts +43 -0
  197. package/src/SubPackages/react/jsx/index.ts +42 -0
  198. package/src/SubPackages/react/jsx/node.ts +26 -0
  199. package/src/SubPackages/react/jsx/web.ts +30 -0
  200. package/src/{subPackages → SubPackages}/react-dom/component/node.ts +24 -44
  201. package/src/SubPackages/react-dom/component/web.ts +143 -0
  202. package/src/SubPackages/react-dom/jsx/index.ts +6 -0
  203. package/src/SubPackages/react-dom/jsx/node.ts +68 -0
  204. package/src/SubPackages/react-dom/jsx/web.ts +139 -0
  205. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +38 -0
  206. package/src/SubPackages/react-test-renderer/component/index.ts +23 -0
  207. package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
  208. package/src/SubPackages/react-test-renderer/component/node.ts +17 -0
  209. package/src/SubPackages/react-test-renderer/component/web.ts +17 -0
  210. package/src/SubPackages/react-test-renderer/fc/node.ts +49 -0
  211. package/src/SubPackages/react-test-renderer/fc/web.ts +48 -0
  212. package/src/SubPackages/react-test-renderer/jsx/index.ts +48 -0
  213. package/src/SubPackages/react-test-renderer/jsx/node.ts +20 -0
  214. package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
  215. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +40 -0
  216. package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
  217. package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
  218. package/src/TaskManBackEnd.ts +228 -0
  219. package/src/TaskManFrontEnd.tsx +1222 -0
  220. package/src/Types.ts +222 -17
  221. package/src/Web.ts +86 -217
  222. package/src/cjs-shim.js +12 -0
  223. package/src/esbuildConfigs/features.ts +17 -0
  224. package/src/esbuildConfigs/index.ts +23 -0
  225. package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
  226. package/src/esbuildConfigs/node.ts +62 -0
  227. package/src/esbuildConfigs/report.ts +15 -0
  228. package/src/esbuildConfigs/tests.ts +14 -0
  229. package/src/esbuildConfigs/web.ts +79 -0
  230. package/src/lib/abstractBase.ts +910 -0
  231. package/src/lib/basebuilder.ts +214 -0
  232. package/src/lib/classBuilder.ts +131 -0
  233. package/src/lib/core.ts +224 -0
  234. package/src/lib/index.ts +226 -0
  235. package/src/lib/types.ts +303 -0
  236. package/src/mongooseSchemas.ts +105 -0
  237. package/src/preload.ts +14 -28
  238. package/src/puppeteerConfiger.ts +26 -0
  239. package/src/report.html.ts +29 -0
  240. package/src/utils.ts +15 -0
  241. package/src/web.html.ts +20 -0
  242. package/tests/Rectangle.test.ts +189 -0
  243. package/trash/TaskMan.Dockerfile +23 -0
  244. package/trash/TaskMan1.Dockerfile +43 -0
  245. package/trash/devBot.dockerfile +12 -0
  246. package/trash/docker-compose-dev.yml +9 -0
  247. package/trash/docker-compose-prod.yml +18 -0
  248. package/trash/electronBuild.ts +32 -0
  249. package/tsconfig.json +18 -6
  250. package/tsconfig.module.json +14 -4
  251. package/tsconfig.types.json +13 -4
  252. package/dist/common/NodeWriter.js +0 -56
  253. package/dist/common/core.js +0 -396
  254. package/dist/common/electron.js +0 -52
  255. package/dist/common/subPackages/react/jsx/index.js +0 -26
  256. package/dist/common/subPackages/react-dom/component/node.js +0 -101
  257. package/dist/common/subPackages/react-dom/component/web.js +0 -61
  258. package/dist/common/subPackages/react-dom/jsx/web.js +0 -76
  259. package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
  260. package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
  261. package/dist/module/NodeWriter.js +0 -50
  262. package/dist/module/Report.js +0 -186
  263. package/dist/module/core.js +0 -387
  264. package/dist/module/electron.js +0 -47
  265. package/dist/module/subPackages/react/jsx/index.js +0 -22
  266. package/dist/module/subPackages/react/jsx/node.js +0 -5
  267. package/dist/module/subPackages/react/jsx/web.js +0 -5
  268. package/dist/module/subPackages/react-dom/component/web.js +0 -56
  269. package/dist/module/subPackages/react-dom/jsx/node.js +0 -93
  270. package/dist/module/subPackages/react-dom/jsx/web.js +0 -48
  271. package/dist/module/subPackages/react-test-renderer/component/index.js +0 -52
  272. package/dist/types/NodeWriter.d.ts +0 -2
  273. package/dist/types/core.d.ts +0 -220
  274. package/dist/types/subPackages/react/component/node.d.ts +0 -12
  275. package/dist/types/subPackages/react/component/web.d.ts +0 -12
  276. package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
  277. package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
  278. package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
  279. package/dist/types/subPackages/react-dom/component/node.d.ts +0 -14
  280. package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
  281. package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -14
  282. package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -15
  283. package/dist/types/subPackages/react-test-renderer/component/index.d.ts +0 -20
  284. package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
  285. package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
  286. package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
  287. package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
  288. package/src/NodeWriter.ts +0 -72
  289. package/src/Report.tsx +0 -392
  290. package/src/core.ts +0 -1396
  291. package/src/electron.ts +0 -59
  292. package/src/subPackages/react/component/node.ts +0 -75
  293. package/src/subPackages/react/component/web.ts +0 -80
  294. package/src/subPackages/react/jsx/index.ts +0 -64
  295. package/src/subPackages/react/jsx/node.ts +0 -29
  296. package/src/subPackages/react/jsx/web.ts +0 -29
  297. package/src/subPackages/react-dom/component/web.ts +0 -129
  298. package/src/subPackages/react-dom/jsx/node.ts +0 -150
  299. package/src/subPackages/react-dom/jsx/web.ts +0 -117
  300. package/src/subPackages/react-test-renderer/component/index.ts +0 -101
  301. package/src/subPackages/react-test-renderer/component/node.ts +0 -30
  302. package/src/subPackages/react-test-renderer/component/web.ts +0 -30
  303. package/src/subPackages/react-test-renderer/fc/node.tsx +0 -77
  304. package/src/subPackages/react-test-renderer/jsx/index.ts +0 -51
  305. package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
  306. package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
  307. /package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
  308. /package/dist/{types/electron.d.ts → module/SubPackages/react-dom/jsx/index.js} +0 -0
  309. /package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
@@ -0,0 +1,226 @@
1
+ import { PM } from "../PM/index.js";
2
+ import { IBaseTest } from "../Types.js";
3
+
4
+ import {
5
+ IGivens,
6
+ BaseCheck,
7
+ BaseSuite,
8
+ BaseWhen,
9
+ BaseThen,
10
+ } from "./abstractBase.js";
11
+ import { ITestInterface } from "./types.js";
12
+
13
+ // import { INodeUtils, ITestInterface, IUtils, IWebUtils } from "./types.js";
14
+
15
+ export const BaseTestInterface: ITestInterface<
16
+ IBaseTest<
17
+ unknown,
18
+ unknown,
19
+ unknown,
20
+ unknown,
21
+ unknown,
22
+ unknown,
23
+ unknown,
24
+ Record<string, any>,
25
+ Record<string, any>,
26
+ Record<string, any>,
27
+ Record<string, any>,
28
+ Record<string, any>
29
+ >
30
+ > = {
31
+ beforeAll: async (s) => s,
32
+ beforeEach: async function (
33
+ subject: any,
34
+ initialValues: any,
35
+ x: any,
36
+ testResource: any,
37
+ pm: PM
38
+ ) {
39
+ return subject as any;
40
+ },
41
+ afterEach: async (s) => s,
42
+ afterAll: (
43
+ store: IBaseTest<
44
+ unknown,
45
+ unknown,
46
+ unknown,
47
+ unknown,
48
+ unknown,
49
+ unknown,
50
+ unknown,
51
+ Record<string, any>,
52
+ Record<string, any>,
53
+ Record<string, any>,
54
+ Record<string, any>,
55
+ Record<string, any>
56
+ >["istore"]
57
+ ) => undefined,
58
+ butThen: async (
59
+ store: IBaseTest<
60
+ unknown,
61
+ unknown,
62
+ unknown,
63
+ unknown,
64
+ unknown,
65
+ unknown,
66
+ unknown,
67
+ Record<string, any>,
68
+ Record<string, any>,
69
+ Record<string, any>,
70
+ Record<string, any>,
71
+ Record<string, any>
72
+ >["istore"],
73
+ thenCb
74
+ ) => thenCb(store),
75
+ andWhen: (a) => a,
76
+ assertThis: () => null,
77
+ };
78
+
79
+ export const DefaultTestInterface = (
80
+ p: Partial<ITestInterface<any>>
81
+ ): ITestInterface<any> => {
82
+ return {
83
+ ...BaseTestInterface,
84
+ ...p,
85
+ };
86
+ };
87
+
88
+ export type ITTestResourceConfiguration = {
89
+ name: string;
90
+ fs: string;
91
+ ports: number[];
92
+ browserWSEndpoint: string;
93
+ };
94
+
95
+ export type ITTestResourceRequirement = {
96
+ name: string;
97
+ ports: number;
98
+ fs: string;
99
+ };
100
+
101
+ export type ITTestResourceRequest = {
102
+ ports: number;
103
+ };
104
+
105
+ export type ITLog = (...string) => void;
106
+
107
+ export type ILogWriter = {
108
+ createWriteStream: (line: string) => any | any;
109
+ writeFileSync: (fp: string, contents: string) => any;
110
+ mkdirSync: () => any;
111
+ testArtiFactoryfileWriter: (
112
+ tLog: ITLog,
113
+ n: (Promise) => void
114
+ ) => (fPath: string, value: unknown) => void;
115
+ };
116
+
117
+ export type ITestArtificer = (key: string, data: any) => void;
118
+
119
+ type ITest = {
120
+ toObj(): object;
121
+ name: string;
122
+ givens: IGivens<
123
+ IBaseTest<
124
+ unknown,
125
+ unknown,
126
+ unknown,
127
+ unknown,
128
+ unknown,
129
+ unknown,
130
+ unknown,
131
+ Record<string, any>,
132
+ Record<string, any>,
133
+ Record<string, any>,
134
+ Record<string, any>,
135
+ Record<string, any>
136
+ >
137
+ >;
138
+ checks: BaseCheck<
139
+ IBaseTest<
140
+ unknown,
141
+ unknown,
142
+ unknown,
143
+ unknown,
144
+ unknown,
145
+ unknown,
146
+ unknown,
147
+ Record<string, any>,
148
+ Record<string, any>,
149
+ Record<string, any>,
150
+ Record<string, any>,
151
+ Record<string, any>
152
+ >
153
+ >[];
154
+ testResourceConfiguration: ITTestResourceConfiguration;
155
+ };
156
+
157
+ export type ITestJob<T = PM> = {
158
+ toObj(): object;
159
+ test: ITest;
160
+ runner: (
161
+ x: ITTestResourceConfiguration,
162
+ t: ITLog
163
+ ) => Promise<
164
+ BaseSuite<
165
+ IBaseTest<
166
+ unknown,
167
+ unknown,
168
+ unknown,
169
+ unknown,
170
+ unknown,
171
+ unknown,
172
+ unknown,
173
+ Record<string, any>,
174
+ Record<string, any>,
175
+ Record<string, any>,
176
+ Record<string, any>,
177
+ Record<string, any>
178
+ >
179
+ >
180
+ >;
181
+ testResourceRequirement: ITTestResourceRequirement;
182
+ receiveTestResourceConfig: (pm: PM) => Promise<{
183
+ failed: number;
184
+ artifacts: Promise<unknown>[];
185
+ logPromise: Promise<unknown>;
186
+ }>;
187
+ };
188
+
189
+ export type ITestResults = Promise<{ test: ITest }>[];
190
+
191
+ export const defaultTestResourceRequirement: ITTestResourceRequest = {
192
+ ports: 0,
193
+ };
194
+
195
+ export type ITestArtifactory = (key: string, value: unknown) => unknown;
196
+
197
+ export type ITestCheckCallback<
198
+ ITestShape extends IBaseTest<
199
+ unknown,
200
+ unknown,
201
+ unknown,
202
+ unknown,
203
+ unknown,
204
+ unknown,
205
+ unknown,
206
+ Record<string, any>,
207
+ Record<string, any>,
208
+ Record<string, any>,
209
+ Record<string, any>,
210
+ Record<string, any>
211
+ >
212
+ > = {
213
+ [K in keyof ITestShape["checks"]]: (
214
+ name: string,
215
+ features: string[],
216
+ callbackA: (
217
+ whens: {
218
+ [K in keyof ITestShape["whens"]]: (...unknown) => BaseWhen<ITestShape>;
219
+ },
220
+ thens: {
221
+ [K in keyof ITestShape["thens"]]: (...unknown) => BaseThen<ITestShape>;
222
+ }
223
+ ) => Promise<any>,
224
+ ...xtrasA: ITestShape["checks"][K]
225
+ ) => BaseCheck<ITestShape>;
226
+ };
@@ -0,0 +1,303 @@
1
+ import { IBaseTest } from "../Types";
2
+
3
+ // import puppeteer from "puppeteer-core";
4
+ import {
5
+ IGivens,
6
+ BaseCheck,
7
+ BaseSuite,
8
+ BaseGiven,
9
+ BaseWhen,
10
+ BaseThen,
11
+ } from "./abstractBase";
12
+ import { ITTestResourceConfiguration, ITestArtificer } from ".";
13
+ import { PM } from "../PM/index";
14
+
15
+ export type IRunTime = `node` | `web`;
16
+
17
+ export type ITestTypes = [string, IRunTime, { ports: number }, ITestTypes[]];
18
+
19
+ export type IJsonConfig = {
20
+ outdir: string;
21
+ tests: ITestTypes[];
22
+ botEmail: string;
23
+ };
24
+
25
+ export type IBaseConfig = {
26
+ clearScreen: boolean;
27
+ debugger: boolean;
28
+ devMode: boolean;
29
+ externals: string[];
30
+ minify: boolean;
31
+ nodePlugins: any[];
32
+ outbase: string;
33
+ outdir: string;
34
+ ports: string[];
35
+ tests: ITestTypes[];
36
+ webPlugins: any[];
37
+ botEmail: string;
38
+ };
39
+
40
+ export type IBuiltConfig = { buildDir: string } & IBaseConfig;
41
+
42
+ export type IWebTestInterface<
43
+ ITestShape extends IBaseTest<
44
+ unknown,
45
+ unknown,
46
+ unknown,
47
+ unknown,
48
+ unknown,
49
+ unknown,
50
+ unknown,
51
+ Record<string, any>,
52
+ Record<string, any>,
53
+ Record<string, any>,
54
+ Record<string, any>,
55
+ Record<string, any>
56
+ >
57
+ > = {
58
+ assertThis: (x: ITestShape["then"]) => void;
59
+
60
+ andWhen: (
61
+ store: ITestShape["istore"],
62
+ whenCB: ITestShape["when"],
63
+ testResource: ITTestResourceConfiguration,
64
+ utils: PM
65
+ ) => Promise<ITestShape["istore"]>;
66
+ butThen: (
67
+ store: ITestShape["istore"],
68
+ thenCB,
69
+ testResource: ITTestResourceConfiguration
70
+ ) => Promise<ITestShape["iselection"]>;
71
+
72
+ afterAll: (
73
+ store: ITestShape["istore"],
74
+ artificer: ITestArtificer,
75
+ utils: PM
76
+ ) => any;
77
+ afterEach: (
78
+ store: ITestShape["istore"],
79
+ key: string,
80
+ artificer: ITestArtificer,
81
+ utils: PM
82
+ ) => Promise<unknown>;
83
+ beforeAll: (
84
+ input: ITestShape["iinput"],
85
+ testResource: ITTestResourceConfiguration,
86
+ artificer: ITestArtificer,
87
+ utils: PM
88
+ ) => Promise<ITestShape["isubject"]>;
89
+ beforeEach: (
90
+ subject: ITestShape["isubject"],
91
+ initializer: (c?) => ITestShape["given"],
92
+ artificer: ITestArtificer,
93
+ testResource: ITTestResourceConfiguration,
94
+ initialValues,
95
+ utils: PM
96
+ ) => Promise<ITestShape["istore"]>;
97
+ };
98
+ // & ITestInterface<ITestShape>;
99
+
100
+ export type INodeTestInterface<
101
+ ITestShape extends IBaseTest<
102
+ unknown,
103
+ unknown,
104
+ unknown,
105
+ unknown,
106
+ unknown,
107
+ unknown,
108
+ unknown,
109
+ Record<string, any>,
110
+ Record<string, any>,
111
+ Record<string, any>,
112
+ Record<string, any>,
113
+ Record<string, any>
114
+ >
115
+ > = {
116
+ assertThis: (x: ITestShape["then"]) => void;
117
+ andWhen: (
118
+ store: ITestShape["istore"],
119
+ whenCB: ITestShape["when"],
120
+ testResource: ITTestResourceConfiguration,
121
+ utils: PM
122
+ ) => Promise<ITestShape["istore"]>;
123
+ butThen: (
124
+ store: ITestShape["istore"],
125
+ thenCB,
126
+ testResource: ITTestResourceConfiguration,
127
+ utils: PM
128
+ ) => Promise<ITestShape["iselection"]>;
129
+ afterAll: (
130
+ store: ITestShape["istore"],
131
+ artificer: ITestArtificer,
132
+ pm: PM
133
+ ) => any;
134
+ afterEach: (
135
+ store: ITestShape["istore"],
136
+ key: string,
137
+ artificer: ITestArtificer,
138
+ pm: PM
139
+ ) => Promise<unknown>;
140
+ beforeAll: (
141
+ input: ITestShape["iinput"],
142
+ testResource: ITTestResourceConfiguration,
143
+ artificer: ITestArtificer,
144
+ pm: PM
145
+ ) => Promise<ITestShape["isubject"]>;
146
+ beforeEach: (
147
+ subject: ITestShape["isubject"],
148
+ initializer: (c?) => ITestShape["given"],
149
+ artificer: ITestArtificer,
150
+ testResource: ITTestResourceConfiguration,
151
+ initialValues,
152
+ pm: PM
153
+ ) => Promise<ITestShape["istore"]>;
154
+ };
155
+ // & ITestInterface<ITestShape>;
156
+
157
+ export type ITestInterface<
158
+ ITestShape extends IBaseTest<
159
+ unknown,
160
+ unknown,
161
+ unknown,
162
+ unknown,
163
+ unknown,
164
+ unknown,
165
+ unknown,
166
+ Record<string, any>,
167
+ Record<string, any>,
168
+ Record<string, any>,
169
+ Record<string, any>,
170
+ Record<string, any>
171
+ >
172
+ > = {
173
+ assertThis: (x: ITestShape["then"]) => void;
174
+
175
+ andWhen: (
176
+ store: ITestShape["istore"],
177
+ whenCB: ITestShape["when"],
178
+ testResource: ITTestResourceConfiguration,
179
+ pm: PM
180
+ ) => Promise<ITestShape["istore"]>;
181
+ butThen: (
182
+ store: ITestShape["istore"],
183
+ thenCB,
184
+ testResource: ITTestResourceConfiguration,
185
+ pm: PM
186
+ ) => Promise<ITestShape["iselection"]>;
187
+
188
+ afterAll: (
189
+ store: ITestShape["istore"],
190
+ artificer: ITestArtificer,
191
+ pm: PM
192
+ ) => any;
193
+ afterEach: (
194
+ store: ITestShape["istore"],
195
+ key: string,
196
+ artificer: ITestArtificer,
197
+ pm: PM
198
+ ) => Promise<unknown>;
199
+ beforeAll: (
200
+ input: ITestShape["iinput"],
201
+ testResource: ITTestResourceConfiguration,
202
+ artificer: ITestArtificer,
203
+ pm: PM
204
+ ) => Promise<ITestShape["isubject"]>;
205
+ beforeEach: (
206
+ subject: ITestShape["isubject"],
207
+ initializer: (c?) => ITestShape["given"],
208
+ artificer: ITestArtificer,
209
+ testResource: ITTestResourceConfiguration,
210
+ initialValues,
211
+ pm: PM
212
+ ) => Promise<ITestShape["istore"]>;
213
+ };
214
+
215
+ export type ISuiteKlasser<
216
+ ITestShape extends IBaseTest<
217
+ unknown,
218
+ unknown,
219
+ unknown,
220
+ unknown,
221
+ unknown,
222
+ unknown,
223
+ unknown,
224
+ Record<string, any>,
225
+ Record<string, any>,
226
+ Record<string, any>,
227
+ Record<string, any>,
228
+ Record<string, any>
229
+ >
230
+ > = (
231
+ name: string,
232
+ index: number,
233
+ givens: IGivens<ITestShape>,
234
+ checks: BaseCheck<ITestShape>[]
235
+ ) => BaseSuite<ITestShape>;
236
+
237
+ export type IGivenKlasser<
238
+ ITestShape extends IBaseTest<
239
+ unknown,
240
+ unknown,
241
+ unknown,
242
+ unknown,
243
+ unknown,
244
+ unknown,
245
+ unknown,
246
+ Record<string, any>,
247
+ Record<string, any>,
248
+ Record<string, any>,
249
+ Record<string, any>,
250
+ Record<string, any>
251
+ >
252
+ > = (name, features, whens, thens, givenCB) => BaseGiven<ITestShape>;
253
+
254
+ export type IWhenKlasser<
255
+ ITestShape extends IBaseTest<
256
+ unknown,
257
+ unknown,
258
+ unknown,
259
+ unknown,
260
+ unknown,
261
+ unknown,
262
+ unknown,
263
+ Record<string, any>,
264
+ Record<string, any>,
265
+ Record<string, any>,
266
+ Record<string, any>,
267
+ Record<string, any>
268
+ >
269
+ > = (s, o) => BaseWhen<ITestShape>;
270
+
271
+ export type IThenKlasser<
272
+ ITestShape extends IBaseTest<
273
+ unknown,
274
+ unknown,
275
+ unknown,
276
+ unknown,
277
+ unknown,
278
+ unknown,
279
+ unknown,
280
+ Record<string, any>,
281
+ Record<string, any>,
282
+ Record<string, any>,
283
+ Record<string, any>,
284
+ Record<string, any>
285
+ >
286
+ > = (s, o) => BaseThen<ITestShape>;
287
+
288
+ export type ICheckKlasser<
289
+ ITestShape extends IBaseTest<
290
+ unknown,
291
+ unknown,
292
+ unknown,
293
+ unknown,
294
+ unknown,
295
+ unknown,
296
+ unknown,
297
+ Record<string, any>,
298
+ Record<string, any>,
299
+ Record<string, any>,
300
+ Record<string, any>,
301
+ Record<string, any>
302
+ >
303
+ > = (n, f, cb, w, t) => BaseCheck<ITestShape>;
@@ -0,0 +1,105 @@
1
+ import mongoose from "mongoose";
2
+
3
+ export interface IUser {
4
+ email: string;
5
+ channels: string[];
6
+ dmgroups: string[];
7
+ }
8
+
9
+ export const userSchema = new mongoose.Schema<IUser>({
10
+ email: String,
11
+ channels: [{ type: mongoose.Schema.Types.ObjectId, ref: "Channel" }],
12
+ dmgroups: [{ type: mongoose.Schema.Types.ObjectId, ref: "Dmgroup" }],
13
+ });
14
+
15
+ userSchema.virtual("features", {
16
+ ref: "Feature",
17
+ localField: "_id",
18
+ foreignField: "owner",
19
+ });
20
+
21
+ export interface IKanban {
22
+ title: string;
23
+ }
24
+
25
+ export const kanbanSchema = new mongoose.Schema<IKanban>({
26
+ title: String,
27
+ });
28
+
29
+ export interface IGantt {
30
+ name: string;
31
+ type: "task" | "milestone" | "project";
32
+ start: Date;
33
+ end: Date;
34
+ }
35
+
36
+ export const ganttSchema = new mongoose.Schema<IGantt>({
37
+ name: String,
38
+ type: String,
39
+ start: Date,
40
+ end: Date,
41
+ });
42
+
43
+ export interface IFeature {
44
+ title: string;
45
+ state: string;
46
+ owner: {
47
+ type: mongoose.Schema.Types.ObjectId;
48
+ required: true;
49
+ ref: "User";
50
+ };
51
+ }
52
+
53
+ export const featuresSchema = new mongoose.Schema<IFeature>({
54
+ title: String,
55
+ state: String,
56
+ });
57
+
58
+ export const channelsFeature = new mongoose.Schema<IChatChannel>({});
59
+
60
+ export const chatCatMessageSchema = new mongoose.Schema({
61
+ user: {
62
+ type: mongoose.Schema.Types.ObjectId,
63
+ ref: "User",
64
+ required: true,
65
+ },
66
+ room: {
67
+ type: mongoose.Schema.Types.ObjectId,
68
+ ref: "ChatCatRoom",
69
+ required: true,
70
+ maxlength: 100,
71
+ },
72
+ timestamp: {
73
+ type: Date,
74
+ default: Date.now(),
75
+ },
76
+ text: {
77
+ type: String,
78
+ maxlength: 1000,
79
+ },
80
+ });
81
+
82
+ // A channel is a base type, extended by both a huddle and room
83
+ export interface IChatChannel {
84
+ users: string[];
85
+ messages: [{ type: mongoose.Schema.Types.ObjectId; ref: "Message" }];
86
+ }
87
+
88
+ export interface IChatCatHuddle {
89
+ users: {
90
+ type: String;
91
+ unique: true;
92
+ required: true;
93
+ }[];
94
+ }
95
+
96
+ export const HuddleSchema = new mongoose.Schema<IChatCatHuddle>({});
97
+
98
+ // a room is just a channel with a name
99
+ export interface IChatCatRoom {
100
+ name: string;
101
+ }
102
+
103
+ export const RoomSchema = new mongoose.Schema<IChatCatRoom>({
104
+ name: { type: String, required: true },
105
+ });
package/src/preload.ts CHANGED
@@ -1,31 +1,17 @@
1
- import { NodeWriter } from "./NodeWriter";
2
- import { ipcRenderer } from "electron";
1
+ // import puppeteer from "puppeteer-core";
3
2
 
4
- (window as any).NodeWriter = NodeWriter;
5
- (window as any).exit = (x) => {
6
- ipcRenderer.invoke('quit-app', x);
7
- }
3
+ // import { NodeWriter } from "./NodeWriter";
4
+ // import puppeteerConfiger from "./puppeteerConfiger";
8
5
 
9
- var oldLog = console.log;
10
- console.log = function (message) {
11
- ipcRenderer.invoke('web-log', message);
12
- oldLog.apply(console, arguments);
13
- };
6
+ // (window as any).NodeWriter = NodeWriter;
14
7
 
15
- var oldLog = console.error;
16
- console.error = function (message) {
17
- ipcRenderer.invoke('web-error', message);
18
- oldLog.apply(console, arguments);
19
- };
20
-
21
- var oldLog = console.warn;
22
- console.warn = function (message) {
23
- ipcRenderer.invoke('web-warn', message);
24
- oldLog.apply(console, arguments);
25
- };
26
-
27
- var oldLog = console.info;
28
- console.info = function (message) {
29
- ipcRenderer.invoke('web-info', message);
30
- oldLog.apply(console, arguments);
31
- };
8
+ // (window as any).browser = new Promise(async (res, rej) => {
9
+ // const browser = await puppeteerConfiger("2999").then(async (json) => {
10
+ // const b = await puppeteer.connect({
11
+ // browserWSEndpoint: json.webSocketDebuggerUrl,
12
+ // defaultViewport: null,
13
+ // });
14
+ // console.log("connected!", b.isConnected());
15
+ // return res(b);
16
+ // });
17
+ // });
@@ -0,0 +1,26 @@
1
+ import http from "http";
2
+
3
+ export default async (
4
+ port: string
5
+ ): Promise<{ webSocketDebuggerUrl: string }> =>
6
+ new Promise((resolve, reject) => {
7
+ let json = "";
8
+ const request = http.request(
9
+ {
10
+ host: "127.0.0.1",
11
+ path: "/json/version",
12
+ port,
13
+ },
14
+ (response) => {
15
+ response.on("error", reject);
16
+ response.on("data", (chunk: Buffer) => {
17
+ json += chunk.toString();
18
+ });
19
+ response.on("end", () => {
20
+ resolve(JSON.parse(json));
21
+ });
22
+ }
23
+ );
24
+ request.on("error", reject);
25
+ request.end();
26
+ });