testeranto 0.172.0 → 0.177.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 (203) hide show
  1. package/README.md +2 -4
  2. package/dist/common/src/PM/base.js +5 -1
  3. package/dist/common/src/PM/main.js +57 -54
  4. package/dist/common/src/PM/node.js +4 -1
  5. package/dist/common/src/PM/pure.js +4 -1
  6. package/dist/common/src/PM/web.js +6 -3
  7. package/dist/common/src/Pure.js +0 -4
  8. package/dist/common/src/Pure.test.js +1 -1
  9. package/dist/common/src/ReportServer.js +2 -126
  10. package/dist/common/src/ReportServer.test.ts/index.js +78 -0
  11. package/dist/common/src/ReportServerLib.js +141 -0
  12. package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +1 -1
  13. package/dist/common/src/esbuildConfigs/node.js +1 -3
  14. package/dist/common/src/lib/BaseSuite.js +13 -11
  15. package/dist/common/src/lib/abstractBase.js +39 -40
  16. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +10 -9
  17. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.specification.js +7 -7
  18. package/dist/common/src/lib/basebuilder.js +13 -2
  19. package/dist/common/src/lib/core.js +1 -0
  20. package/dist/common/src/lib/pmProxy.js +215 -201
  21. package/dist/common/src/lib/pmProxy.test/adapter.js +2 -2
  22. package/dist/common/src/lib/pmProxy.test/implementation.js +1 -1
  23. package/dist/common/testeranto.config.js +47 -32
  24. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  25. package/dist/module/src/PM/base.js +5 -1
  26. package/dist/module/src/PM/main.js +22 -19
  27. package/dist/module/src/PM/node.js +4 -1
  28. package/dist/module/src/PM/pure.js +4 -1
  29. package/dist/module/src/PM/web.js +6 -3
  30. package/dist/module/src/Pure.js +0 -4
  31. package/dist/module/src/Pure.test.js +1 -1
  32. package/dist/module/src/ReportServer.js +2 -123
  33. package/dist/module/src/ReportServer.test.ts/index.js +73 -0
  34. package/dist/module/src/ReportServerLib.js +134 -0
  35. package/dist/module/src/TestPage.js +29 -17
  36. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +1 -1
  37. package/dist/module/src/components/pure/TestPageView.js +29 -17
  38. package/dist/module/src/esbuildConfigs/node.js +1 -3
  39. package/dist/module/src/lib/BaseSuite.js +13 -11
  40. package/dist/module/src/lib/abstractBase.js +39 -40
  41. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +10 -9
  42. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.specification.js +7 -7
  43. package/dist/module/src/lib/basebuilder.js +13 -2
  44. package/dist/module/src/lib/core.js +1 -0
  45. package/dist/module/src/lib/pmProxy.js +215 -201
  46. package/dist/module/src/lib/pmProxy.test/adapter.js +2 -2
  47. package/dist/module/src/lib/pmProxy.test/implementation.js +1 -1
  48. package/dist/module/testeranto.config.js +47 -32
  49. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  50. package/dist/prebuild/App.js +3 -3
  51. package/dist/prebuild/ReportServer.mjs +21 -9
  52. package/dist/prebuild/build.mjs +1 -1
  53. package/dist/prebuild/run.mjs +27 -20
  54. package/dist/types/src/PM/base.d.ts +1 -1
  55. package/dist/types/src/PM/node.d.ts +1 -1
  56. package/dist/types/src/PM/pure.d.ts +1 -1
  57. package/dist/types/src/PM/web.d.ts +1 -1
  58. package/dist/types/src/ReportServer.test.ts/index.d.ts +29 -0
  59. package/dist/types/src/ReportServerLib.d.ts +1 -0
  60. package/dist/types/src/Types.d.ts +0 -1
  61. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +2 -1
  62. package/dist/types/src/lib/BaseSuite.d.ts +2 -0
  63. package/dist/types/src/lib/abstractBase.d.ts +5 -7
  64. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.types.d.ts +7 -4
  65. package/dist/types/src/lib/pmProxy.d.ts +3 -3
  66. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  67. package/package.json +3 -3
  68. package/src/PM/base.ts +7 -5
  69. package/src/PM/main.ts +26 -21
  70. package/src/PM/node.ts +6 -1
  71. package/src/PM/pure.ts +6 -1
  72. package/src/PM/web.ts +7 -3
  73. package/src/Pure.test.ts +6 -6
  74. package/src/Pure.ts +0 -8
  75. package/src/ReportServer.test.ts/index.ts +194 -0
  76. package/src/ReportServer.ts +2 -132
  77. package/src/ReportServerLib.ts +147 -0
  78. package/src/TestPage.tsx +65 -5
  79. package/src/Types.ts +0 -1
  80. package/src/components/pure/ProjectPageView.test/implementation.tsx +1 -1
  81. package/src/components/pure/TestPageView.tsx +65 -5
  82. package/src/esbuildConfigs/node.ts +1 -1
  83. package/src/lib/BaseSuite.ts +16 -21
  84. package/src/lib/abstractBase.ts +59 -48
  85. package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +22 -10
  86. package/src/lib/baseBuilder.test/baseBuilder.test.specification.ts +9 -9
  87. package/src/lib/baseBuilder.test/baseBuilder.test.types.ts +7 -4
  88. package/src/lib/basebuilder.ts +13 -4
  89. package/src/lib/core.ts +1 -0
  90. package/src/lib/pmProxy.test/adapter.ts +2 -2
  91. package/src/lib/pmProxy.test/implementation.ts +3 -3
  92. package/src/lib/pmProxy.test/types.ts +0 -2
  93. package/src/lib/pmProxy.ts +135 -80
  94. package/testeranto/App.js +3 -3
  95. package/testeranto/bundles/node/core/metafile.json +8 -0
  96. package/testeranto/bundles/pure/core/metafile.json +8 -0
  97. package/testeranto/bundles/web/core/metafile.json +15086 -0
  98. package/testeranto/bundles/web/{allTests → core}/src/components/pure/ProjectPageView.test/index.html +1 -1
  99. package/testeranto/bundles/web/{allTests → core}/src/components/pure/ProjectPageView.test/index.mjs +4109 -1642
  100. package/testeranto/projects.json +1 -1
  101. package/testeranto/reports/core/config.json +24 -0
  102. package/testeranto/reports/{allTests → core}/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +6 -1
  103. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/logs.txt +59 -0
  104. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
  105. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +27 -0
  106. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/suite-0/given-basicRender/then-0/butThen/happyPath.png +0 -0
  107. package/testeranto/reports/{allTests → core}/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +15 -33
  108. package/testeranto/reports/core/summary.json +9 -0
  109. package/testeranto.config.ts +49 -32
  110. package/tsc.log +78 -92
  111. package/testeranto/bundles/node/allTests/chunk-3EUGBAOM.mjs +0 -113
  112. package/testeranto/bundles/node/allTests/chunk-E75CSRER.mjs +0 -800
  113. package/testeranto/bundles/node/allTests/chunk-M6DO7VMB.mjs +0 -252
  114. package/testeranto/bundles/node/allTests/metafile.json +0 -1229
  115. package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +0 -323
  116. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -223
  117. package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +0 -411
  118. package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +0 -528
  119. package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +0 -4752
  120. package/testeranto/bundles/pure/allTests/chunk-KHDVEHF7.mjs +0 -185
  121. package/testeranto/bundles/pure/allTests/chunk-VMUSFSZM.mjs +0 -797
  122. package/testeranto/bundles/pure/allTests/metafile.json +0 -1054
  123. package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +0 -429
  124. package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +0 -425
  125. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -381
  126. package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +0 -2283
  127. package/testeranto/bundles/web/allTests/chunk-U7AW26HL.mjs +0 -997
  128. package/testeranto/bundles/web/allTests/metafile.json +0 -25
  129. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.html +0 -19
  130. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +0 -440
  131. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.html +0 -19
  132. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +0 -244
  133. package/testeranto/reports/allTests/config.json +0 -104
  134. package/testeranto/reports/allTests/src/Pure.test/pure/lint_errors.txt +0 -0
  135. package/testeranto/reports/allTests/src/Pure.test/pure/message.txt +0 -2
  136. package/testeranto/reports/allTests/src/Pure.test/pure/prompt.txt +0 -13
  137. package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +0 -101
  138. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +0 -1
  139. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +0 -50
  140. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +0 -2
  141. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +0 -17
  142. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -32
  143. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/bdd_errors.txt +0 -1
  144. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/lint_errors.txt +0 -0
  145. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +0 -52
  146. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/message.txt +0 -2
  147. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/prompt.txt +0 -13
  148. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +0 -31
  149. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +0 -111
  150. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/bdd_errors.txt +0 -1
  151. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -0
  152. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/message.txt +0 -2
  153. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +0 -14
  154. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +0 -31
  155. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +0 -111
  156. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/bdd_errors.txt +0 -1
  157. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/lint_errors.txt +0 -0
  158. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +0 -108
  159. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/message.txt +0 -2
  160. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +0 -14
  161. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +0 -31
  162. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +0 -111
  163. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/bdd_errors.txt +0 -1
  164. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -0
  165. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -35
  166. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +0 -2
  167. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -16
  168. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -77
  169. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -62
  170. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -0
  171. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +0 -2
  172. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -18
  173. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -62
  174. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/bdd_errors.txt +0 -1
  175. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +0 -0
  176. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -69
  177. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +0 -2
  178. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +0 -16
  179. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -77
  180. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -62
  181. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/bdd_errors.txt +0 -1
  182. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/lint_errors.txt +0 -0
  183. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +0 -700
  184. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/message.txt +0 -2
  185. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +0 -16
  186. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +0 -164
  187. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +0 -138
  188. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/lint_errors.txt +0 -21
  189. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +0 -7
  190. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/message.txt +0 -2
  191. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/prompt.txt +0 -18
  192. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +0 -63
  193. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/bdd_errors.txt +0 -1
  194. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/lint_errors.txt +0 -20
  195. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +0 -31
  196. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/message.txt +0 -2
  197. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/prompt.txt +0 -16
  198. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +0 -134
  199. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +0 -76
  200. package/testeranto/reports/allTests/summary.json +0 -79
  201. package/testeranto/reportsnode_build_errors +0 -20
  202. package/testeranto/reportspure_build_errors +0 -343
  203. package/testeranto/reportsweb_build_errors +0 -25
@@ -68,14 +68,18 @@ export const TestPageView = ({ route, setRoute, navigate, projectName, testName,
68
68
  React.createElement("div", { className: "mt-3" },
69
69
  React.createElement(Button, { variant: "outline-light", onClick: () => setRoute('logs'), className: "me-2" }, "View Runtime Logs"),
70
70
  React.createElement(Button, { variant: "outline-light", onClick: () => navigate(`/projects/${projectName}#${runtime}`) }, "View Build Logs")))) : testData ? (React.createElement("div", { className: "test-results" }, testData.givens.map((given, i) => {
71
- var _a;
71
+ var _a, _b;
72
72
  return (React.createElement("div", { key: i, className: "mb-4 card" },
73
73
  React.createElement("div", { className: "card-header bg-primary text-white" },
74
74
  React.createElement("div", { className: "d-flex justify-content-between align-items-center" },
75
- React.createElement("h4", null,
76
- "Given: ",
77
- given.name),
78
- ((_a = given.artifacts) === null || _a === void 0 ? void 0 : _a.length) > 0 && (React.createElement("div", { className: "dropdown" },
75
+ React.createElement("div", null,
76
+ React.createElement("h4", null,
77
+ "Given: ",
78
+ given.name),
79
+ ((_a = given.features) === null || _a === void 0 ? void 0 : _a.length) > 0 && (React.createElement("div", { className: "mt-1" },
80
+ React.createElement("small", null, "Features:"),
81
+ React.createElement("ul", { className: "list-unstyled" }, given.features.map((feature, fi) => (React.createElement("li", { key: fi }, feature.startsWith('http') ? (React.createElement("a", { href: feature, target: "_blank", rel: "noopener noreferrer", className: "text-white" }, new URL(feature).hostname)) : (React.createElement("span", { className: "text-white" }, feature))))))))),
82
+ ((_b = given.artifacts) === null || _b === void 0 ? void 0 : _b.length) > 0 && (React.createElement("div", { className: "dropdown" },
79
83
  React.createElement("button", { className: "btn btn-sm btn-light dropdown-toggle", type: "button", "data-bs-toggle": "dropdown" },
80
84
  "Artifacts (",
81
85
  given.artifacts.length,
@@ -84,29 +88,37 @@ export const TestPageView = ({ route, setRoute, navigate, projectName, testName,
84
88
  React.createElement("a", { className: "dropdown-item", href: `/testeranto/reports/${projectName}/${testName.split('.').slice(0, -1).join('.')}/${runtime}/${artifact}`, target: "_blank", rel: "noopener noreferrer" }, artifact.split('/').pop()))))))))),
85
89
  React.createElement("div", { className: "card-body" },
86
90
  given.whens.map((when, j) => {
87
- var _a;
91
+ var _a, _b;
88
92
  return (React.createElement("div", { key: `w-${j}`, className: `p-3 mb-2 ${when.error ? 'bg-danger text-white' : 'bg-success text-white'}` },
89
93
  React.createElement("div", { className: "d-flex justify-content-between align-items-start" },
90
94
  React.createElement("div", null,
91
- React.createElement("strong", null, "When:"),
92
- " ",
93
- when.name,
94
- when.error && React.createElement("pre", { className: "mt-2" }, when.error)),
95
- ((_a = when.artifacts) === null || _a === void 0 ? void 0 : _a.length) > 0 && (React.createElement("div", { className: "ms-3" },
95
+ React.createElement("div", null,
96
+ React.createElement("strong", null, "When:"),
97
+ " ",
98
+ when.name,
99
+ ((_a = when.features) === null || _a === void 0 ? void 0 : _a.length) > 0 && (React.createElement("div", { className: "mt-2" },
100
+ React.createElement("small", null, "Features:"),
101
+ React.createElement("ul", { className: "list-unstyled" }, when.features.map((feature, fi) => (React.createElement("li", { key: fi }, feature.startsWith('http') ? (React.createElement("a", { href: feature, target: "_blank", rel: "noopener noreferrer" }, new URL(feature).hostname)) : (feature))))))),
102
+ when.error && React.createElement("pre", { className: "mt-2" }, when.error))),
103
+ ((_b = when.artifacts) === null || _b === void 0 ? void 0 : _b.length) > 0 && (React.createElement("div", { className: "ms-3" },
96
104
  React.createElement("strong", null, "Artifacts:"),
97
105
  React.createElement("ul", { className: "list-unstyled" }, when.artifacts.map((artifact, ai) => (React.createElement("li", { key: ai },
98
106
  React.createElement("a", { href: `/testeranto/reports/${projectName}/${testName.split('.').slice(0, -1).join('.')}/${runtime}/${artifact}`, target: "_blank", className: "text-white", rel: "noopener noreferrer" }, artifact.split('/').pop()))))))))));
99
107
  }),
100
108
  given.thens.map((then, k) => {
101
- var _a;
109
+ var _a, _b;
102
110
  return (React.createElement("div", { key: `t-${k}`, className: `p-3 mb-2 ${then.error ? 'bg-danger text-white' : 'bg-success text-white'}` },
103
111
  React.createElement("div", { className: "d-flex justify-content-between align-items-start" },
104
112
  React.createElement("div", null,
105
- React.createElement("strong", null, "Then:"),
106
- " ",
107
- then.name,
108
- then.error && React.createElement("pre", { className: "mt-2" }, then.error)),
109
- ((_a = then.artifacts) === null || _a === void 0 ? void 0 : _a.length) > 0 && (React.createElement("div", { className: "ms-3" },
113
+ React.createElement("div", null,
114
+ React.createElement("strong", null, "Then:"),
115
+ " ",
116
+ then.name,
117
+ ((_a = then.features) === null || _a === void 0 ? void 0 : _a.length) > 0 && (React.createElement("div", { className: "mt-2" },
118
+ React.createElement("small", null, "Features:"),
119
+ React.createElement("ul", { className: "list-unstyled" }, then.features.map((feature, fi) => (React.createElement("li", { key: fi }, feature.startsWith('http') ? (React.createElement("a", { href: feature, target: "_blank", rel: "noopener noreferrer" }, new URL(feature).hostname)) : (feature))))))),
120
+ then.error && React.createElement("pre", { className: "mt-2" }, then.error))),
121
+ ((_b = then.artifacts) === null || _b === void 0 ? void 0 : _b.length) > 0 && (React.createElement("div", { className: "ms-3" },
110
122
  React.createElement("strong", null, "Artifacts:"),
111
123
  React.createElement("ul", { className: "list-unstyled" }, then.artifacts.map((artifact, ai) => (React.createElement("li", { key: ai },
112
124
  React.createElement("a", { href: `/testeranto/reports/${projectName}/${testName.split('.').slice(0, -1).join('.')}/${runtime}/${artifact}`, target: "_blank", className: "text-white", rel: "noopener noreferrer" }, artifact.split('/').pop()))))))))));
@@ -4,9 +4,7 @@ import featuresPlugin from "./featuresPlugin";
4
4
  import rebuildPlugin from "./rebuildPlugin.js";
5
5
  export default (config, entryPoints, testName) => {
6
6
  const { inputFilesPluginFactory, register } = inputFilesPlugin("node", testName);
7
- return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`,
8
- // inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
9
- metafile: true, supported: {
7
+ return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`, inject: [`./node_modules/testeranto/dist/cjs-shim.js`], metafile: true, supported: {
10
8
  "dynamic-import": true,
11
9
  }, define: {
12
10
  "process.env.FLUENTFFMPEG_COV": "0",
@@ -1,17 +1,20 @@
1
1
  import { beforeAllProxy, afterAllProxy } from "./pmProxy";
2
2
  export class BaseSuite {
3
+ addArtifact(path) {
4
+ console.log("Suite addArtifact", path);
5
+ const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
6
+ this.artifacts.push(normalizedPath);
7
+ }
3
8
  constructor(name, index, givens = {}) {
9
+ this.artifacts = [];
4
10
  const suiteName = name || "testSuite"; // Ensure name is never undefined
5
11
  if (!suiteName) {
6
12
  throw new Error("BaseSuite requires a non-empty name");
7
13
  }
8
- console.log("[DEBUG] BaseSuite constructor - name:", suiteName, "index:", index);
9
14
  this.name = suiteName;
10
15
  this.index = index;
11
16
  this.givens = givens;
12
17
  this.fails = 0;
13
- console.log("[DEBUG] BaseSuite initialized:", this.name, this.index);
14
- console.log("[DEBUG] BaseSuite givens:", Object.keys(givens).toString());
15
18
  }
16
19
  features() {
17
20
  try {
@@ -21,11 +24,10 @@ export class BaseSuite {
21
24
  .filter((value, index, array) => {
22
25
  return array.indexOf(value) === index;
23
26
  });
24
- console.debug("[DEBUG] Features extracted:", features.toString());
25
27
  return features || [];
26
28
  }
27
29
  catch (e) {
28
- console.error("[ERROR] Failed to extract features:", e);
30
+ console.error("[ERROR] Failed to extract features:", JSON.stringify(e));
29
31
  return [];
30
32
  }
31
33
  }
@@ -53,10 +55,10 @@ export class BaseSuite {
53
55
  // tLog("test resources: ", JSON.stringify(testResourceConfiguration));
54
56
  const suiteArtifactory = (fPath, value) => artifactory(`suite-${this.index}-${this.name}/${fPath}`, value);
55
57
  // console.log("\nSuite:", this.index, this.name);
56
- tLog("\nSuite:", this.index, this.name);
58
+ // tLog("\nSuite:", this.index, this.name);
57
59
  const sNdx = this.index;
58
- // const sName = this.name;
59
- const subject = await this.setup(input, suiteArtifactory, testResourceConfiguration, beforeAllProxy(pm, sNdx.toString()));
60
+ const proxiedPm = beforeAllProxy(pm, sNdx.toString(), this);
61
+ const subject = await this.setup(input, suiteArtifactory, testResourceConfiguration, proxiedPm);
60
62
  for (const [gKey, g] of Object.entries(this.givens)) {
61
63
  const giver = this.givens[gKey];
62
64
  this.store = await giver
@@ -64,15 +66,15 @@ export class BaseSuite {
64
66
  .catch((e) => {
65
67
  this.failed = true;
66
68
  this.fails = this.fails + 1;
67
- // console.error("Given error 1:", e.toString());
68
69
  throw e;
69
70
  });
70
71
  }
71
72
  try {
72
- this.afterAll(this.store, artifactory, afterAllProxy(pm, sNdx.toString()));
73
+ const afterAllPm = afterAllProxy(pm, sNdx.toString(), this);
74
+ this.afterAll(this.store, artifactory, afterAllPm);
73
75
  }
74
76
  catch (e) {
75
- console.error(e);
77
+ console.error(JSON.stringify(e));
76
78
  // this.fails.push(this);
77
79
  // return this;
78
80
  }
@@ -3,8 +3,9 @@
3
3
  import { afterEachProxy, andWhenProxy, beforeEachProxy, butThenProxy, } from "./pmProxy.js";
4
4
  export class BaseGiven {
5
5
  addArtifact(path) {
6
- console.log(`[Artifact] Adding to ${this.constructor.name}:`, path);
7
- this.artifacts.push(path);
6
+ console.log("Given addArtifact", path);
7
+ const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
8
+ this.artifacts.push(normalizedPath);
8
9
  }
9
10
  constructor(name, features, whens, thens, givenCB, initialValues) {
10
11
  this.artifacts = [];
@@ -25,7 +26,7 @@ export class BaseGiven {
25
26
  whens: this.whens.map((w) => {
26
27
  if (w && w.toObj)
27
28
  return w.toObj();
28
- console.error("w is not as expected!", w.toString());
29
+ console.error("w is not as expected!", JSON.stringify(w));
29
30
  return {};
30
31
  }),
31
32
  thens: this.thens.map((t) => t.toObj()),
@@ -49,15 +50,13 @@ export class BaseGiven {
49
50
  tLog(e.stack);
50
51
  });
51
52
  try {
52
- const proxiedPm = beforeEachProxy(pm, suiteNdx.toString());
53
- console.log(`[Given] Setting currentStep for beforeEach:`, this.name);
54
- proxiedPm.currentStep = this;
53
+ const proxiedPm = beforeEachProxy(pm, suiteNdx.toString(), this.addArtifact.bind(this));
55
54
  this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, proxiedPm);
56
55
  }
57
56
  catch (e) {
58
- console.error("Given failure: ", e.toString());
59
- this.error = e;
60
- throw e;
57
+ // console.error("Given failure: ", e.stack);
58
+ this.error = e.stack;
59
+ // throw e;
61
60
  }
62
61
  try {
63
62
  // tLog(`\n Given this.store`, this.store);
@@ -67,9 +66,6 @@ export class BaseGiven {
67
66
  for (const [thenNdx, thenStep] of this.thens.entries()) {
68
67
  const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
69
68
  tester(t);
70
- // ((t) => {
71
- // return tester(t);
72
- // })();
73
69
  }
74
70
  }
75
71
  catch (e) {
@@ -79,10 +75,11 @@ export class BaseGiven {
79
75
  }
80
76
  finally {
81
77
  try {
82
- await this.afterEach(this.store, this.key, givenArtifactory, afterEachProxy(pm, suiteNdx.toString(), key));
78
+ const proxiedPm = afterEachProxy(pm, suiteNdx.toString(), key, this.addArtifact.bind(this));
79
+ // (proxiedPm as any).currentStep = this;
80
+ await this.afterEach(this.store, this.key, givenArtifactory, proxiedPm);
83
81
  }
84
82
  catch (e) {
85
- console.error("afterEach failed!", e.toString());
86
83
  this.failed = e;
87
84
  throw e;
88
85
  // this.error = e.message;
@@ -92,36 +89,33 @@ export class BaseGiven {
92
89
  }
93
90
  }
94
91
  export class BaseWhen {
92
+ addArtifact(path) {
93
+ console.log("When addArtifact", path);
94
+ const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
95
+ this.artifacts.push(normalizedPath);
96
+ }
95
97
  constructor(name, whenCB) {
96
98
  this.artifacts = [];
97
99
  this.name = name;
98
100
  this.whenCB = whenCB;
99
101
  }
100
102
  toObj() {
101
- console.log("toObj error", this.error);
102
- if (this.error) {
103
- return {
104
- name: this.name,
105
- error: this.error && this.error.name + this.error.stack,
106
- artifacts: this.artifacts,
107
- };
108
- }
109
- else {
110
- return {
111
- name: this.name,
112
- artifacts: this.artifacts,
113
- };
114
- }
103
+ const obj = {
104
+ name: this.name,
105
+ error: this.error
106
+ ? `${this.error.name}: ${this.error.message}\n${this.error.stack}`
107
+ : null,
108
+ artifacts: this.artifacts || [],
109
+ };
110
+ console.log(`[TOOBJ] Serializing ${this.constructor.name} with artifacts:`, obj.artifacts);
111
+ return obj;
115
112
  }
116
113
  async test(store, testResourceConfiguration, tLog, pm, filepath) {
117
114
  try {
118
- tLog(" When:", this.name);
119
- console.debug("[DEBUG] Executing When step:", this.name.toString());
120
- const proxiedPm = andWhenProxy(pm, filepath);
121
- console.log(`[When] Setting currentStep for andWhen:`, this.name);
122
- proxiedPm.currentStep = this;
115
+ // tLog(" When:", this.name);
116
+ const proxiedPm = andWhenProxy(pm, filepath, this.addArtifact.bind(this));
117
+ // (proxiedPm as any).currentStep = this;
123
118
  const result = await this.andWhen(store, this.whenCB, testResourceConfiguration, proxiedPm);
124
- console.debug("[DEBUG] When step completed:", this.name.toString());
125
119
  return result;
126
120
  }
127
121
  catch (e) {
@@ -137,18 +131,23 @@ export class BaseThen {
137
131
  this.name = name;
138
132
  this.thenCB = thenCB;
139
133
  this.error = false;
134
+ this.artifacts = [];
135
+ }
136
+ addArtifact(path) {
137
+ console.log("Then addArtifact", path);
138
+ const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
139
+ this.artifacts.push(normalizedPath);
140
140
  }
141
141
  toObj() {
142
- return {
142
+ const obj = {
143
143
  name: this.name,
144
144
  error: this.error,
145
145
  artifacts: this.artifacts,
146
146
  };
147
+ return obj;
147
148
  }
148
149
  async test(store, testResourceConfiguration, tLog, pm, filepath) {
149
- const proxiedPm = butThenProxy(pm, filepath);
150
- console.log(`[Then] Setting currentStep for butThen:`, this.name);
151
- proxiedPm.currentStep = this;
150
+ const proxiedPm = butThenProxy(pm, filepath, this.addArtifact.bind(this));
152
151
  return this.butThen(store, async (s) => {
153
152
  if (typeof this.thenCB === "function") {
154
153
  return await this.thenCB(s, proxiedPm);
@@ -156,8 +155,8 @@ export class BaseThen {
156
155
  else {
157
156
  return this.thenCB;
158
157
  }
159
- }, testResourceConfiguration, butThenProxy(pm, filepath)).catch((e) => {
160
- this.error = e.toString();
158
+ }, testResourceConfiguration, proxiedPm).catch((e) => {
159
+ this.error = e.stack;
161
160
  // throw e;
162
161
  });
163
162
  }
@@ -5,7 +5,7 @@ export const implementation = {
5
5
  Default: "BaseBuilder test suite",
6
6
  },
7
7
  givens: {
8
- Default: () => {
8
+ "the default BaseBuilder": () => {
9
9
  return new MockBaseBuilder({}, // input
10
10
  {}, // suitesOverrides
11
11
  {}, // givenOverrides
@@ -15,11 +15,11 @@ export const implementation = {
15
15
  () => [] // testSpecification
16
16
  );
17
17
  },
18
- WithCustomInput: (input) => {
19
- return new MockBaseBuilder(input, {}, {}, {}, {}, {}, { ports: [] });
18
+ "a BaseBuilder with TestInput": (input) => {
19
+ return new MockBaseBuilder(input, {}, {}, {}, {}, { ports: [] }, () => []);
20
20
  },
21
- WithResourceRequirements: (requirements) => {
22
- return new MockBaseBuilder({}, {}, {}, {}, {}, {}, requirements);
21
+ "a BaseBuilder with Test Resource Requirements": (requirements) => {
22
+ return new MockBaseBuilder({}, {}, {}, {}, {}, requirements, () => []);
23
23
  },
24
24
  },
25
25
  whens: {
@@ -33,8 +33,9 @@ export const implementation = {
33
33
  },
34
34
  },
35
35
  thens: {
36
- initializedProperly: () => (builder) => {
36
+ "it is initialized": () => (builder, utils) => {
37
37
  var _a;
38
+ utils.writeFileSync("hello.txt", "world");
38
39
  if (!(builder instanceof BaseBuilder)) {
39
40
  console.error("Builder instance:", builder);
40
41
  throw new Error(`Builder was not properly initialized - expected BaseBuilder instance but got ${(_a = builder === null || builder === void 0 ? void 0 : builder.constructor) === null || _a === void 0 ? void 0 : _a.name}`);
@@ -55,19 +56,19 @@ export const implementation = {
55
56
  });
56
57
  return builder;
57
58
  },
58
- specsGenerated: () => (builder) => {
59
+ "it generates TestSpecifications": () => (builder) => {
59
60
  if (!Array.isArray(builder.specs)) {
60
61
  throw new Error("Specs were not generated");
61
62
  }
62
63
  return builder;
63
64
  },
64
- jobsCreated: () => (builder) => {
65
+ "it creates jobs": () => (builder) => {
65
66
  if (!Array.isArray(builder.testJobs)) {
66
67
  throw new Error("Test jobs were not created");
67
68
  }
68
69
  return builder;
69
70
  },
70
- artifactsTracked: () => (builder) => {
71
+ "it tracks artifacts": () => (builder) => {
71
72
  if (!Array.isArray(builder.artifacts)) {
72
73
  throw new Error("Artifacts array not initialized");
73
74
  }
@@ -1,14 +1,14 @@
1
1
  export const specification = (Suite, Given, When, Then) => {
2
2
  return [
3
3
  Suite.Default("Testing BaseBuilder functionality", {
4
- testInitialization: Given.Default(["BaseBuilder should initialize correctly"], [], [
5
- Then.initializedProperly(),
6
- Then.artifactsTracked(),
7
- Then.jobsCreated(),
8
- Then.specsGenerated(),
4
+ testInitialization: Given["the default BaseBuilder"](["BaseBuilder should initialize correctly"], [], [
5
+ Then["it is initialized"](),
6
+ Then["it tracks artifacts"](),
7
+ // Then["it creates jobs"](),
8
+ // Then["it generates TestSpecifications"](),
9
9
  ]),
10
- testSpecsGeneration: Given.Default(["BaseBuilder should generate specs from test specification"], [], [Then.specsGenerated()]),
11
- testJobsCreation: Given.Default(["BaseBuilder should create test jobs"], [], [Then.jobsCreated()]),
10
+ testSpecsGeneration: Given["the default BaseBuilder"](["BaseBuilder should generate specs from test specification"], [], [Then["it generates TestSpecifications"]()]),
11
+ testJobsCreation: Given["the default BaseBuilder"](["BaseBuilder should create test jobs"], [], [Then["it creates jobs"]()]),
12
12
  }),
13
13
  ];
14
14
  };
@@ -15,9 +15,11 @@ export class BaseBuilder {
15
15
  this.specs = testSpecification(this.Suites(), this.Given(), this.When(), this.Then());
16
16
  this.testJobs = this.specs.map((suite) => {
17
17
  const suiteRunner = (suite) => async (puppetMaster, tLog) => {
18
+ console.log("mark17");
18
19
  const x = await suite.run(input, puppetMaster.testResourceConfiguration, (fPath, value) => puppetMaster.testArtiFactoryfileWriter(tLog, (p) => {
19
20
  this.artifacts.push(p);
20
21
  })(puppetMaster.testResourceConfiguration.fs + "/" + fPath, value), tLog, puppetMaster);
22
+ console.log("mark18");
21
23
  return x;
22
24
  };
23
25
  const runner = suiteRunner(suite);
@@ -36,14 +38,23 @@ export class BaseBuilder {
36
38
  const tLog = async (...l) => {
37
39
  //
38
40
  };
41
+ console.log("mark14");
39
42
  const suiteDone = await runner(puppetMaster, tLog);
43
+ console.log("mark15");
40
44
  // const logPromise = new Promise(async (res) => {
41
45
  // await puppetMaster.end(access);
42
46
  // res(true);
43
47
  // });
44
48
  const fails = suiteDone.fails;
45
- await puppetMaster.writeFileSync(`bdd_errors.txt`, fails.toString());
46
- await puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2));
49
+ await puppetMaster.writeFileSync([
50
+ `bdd_errors.txt`,
51
+ fails.toString(),
52
+ ]);
53
+ await puppetMaster.writeFileSync([
54
+ `tests.json`,
55
+ JSON.stringify(this.toObj(), null, 2),
56
+ ]);
57
+ console.log("mark13");
47
58
  return {
48
59
  failed: fails > 0,
49
60
  fails,
@@ -26,6 +26,7 @@ export default class TesterantoCore extends ClassBuilder {
26
26
  this.uberCatcher = uberCatcher;
27
27
  }
28
28
  async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
29
+ console.log("mark800");
29
30
  return fullAdapter.beforeEach(subject, initializer, testResource, initialValues, pm);
30
31
  }
31
32
  afterEach(store, key, artifactory, pm) {