testeranto 0.166.0 → 0.171.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 (187) hide show
  1. package/dist/common/src/NavBar.js +45 -0
  2. package/dist/common/src/PM/main.js +81 -59
  3. package/dist/common/src/Pure.js +17 -15
  4. package/dist/common/src/ReportServer.js +48 -5
  5. package/dist/common/src/Web.js +35 -20
  6. package/dist/common/src/components/SunriseAnimation.test/implementation.js +1 -0
  7. package/dist/common/src/components/SunriseAnimation.test/index.js +1 -0
  8. package/dist/common/src/components/SunriseAnimation.test/interface.js +1 -0
  9. package/dist/common/src/components/SunriseAnimation.test/specification.js +1 -0
  10. package/dist/common/src/components/TestStatusBadge.js +55 -0
  11. package/dist/common/src/components/pure/ProjectPageView.js +204 -0
  12. package/dist/common/src/components/pure/ProjectPageView.test/adapter.js +20 -0
  13. package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +71 -0
  14. package/dist/common/src/components/pure/ProjectPageView.test/index.js +10 -0
  15. package/dist/common/src/components/pure/ProjectPageView.test/specification.js +19 -0
  16. package/dist/common/src/components/pure/ProjectPageView.test/types.js +2 -0
  17. package/dist/common/src/lib/BaseSuite.js +3 -3
  18. package/dist/common/src/lib/BaseSuite.test/test.js +1 -1
  19. package/dist/common/src/lib/abstractBase.js +41 -14
  20. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +1 -1
  21. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.mock.js +1 -1
  22. package/dist/common/src/lib/basebuilder.js +9 -7
  23. package/dist/common/src/lib/core.test/MockCore.js +17 -15
  24. package/dist/common/src/lib/pmProxy.js +185 -64
  25. package/dist/common/testeranto.config.js +6 -0
  26. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  27. package/dist/module/src/App.js +3 -3
  28. package/dist/module/src/PM/main.js +81 -59
  29. package/dist/module/src/ProjectsPage.js +1 -110
  30. package/dist/module/src/Pure.js +17 -15
  31. package/dist/module/src/ReportServer.js +48 -5
  32. package/dist/module/src/TestPage.js +45 -16
  33. package/dist/module/src/Web.js +35 -20
  34. package/dist/module/src/components/SunriseAnimation.test/implementation.js +1 -0
  35. package/dist/module/src/components/SunriseAnimation.test/index.js +1 -0
  36. package/dist/module/src/components/SunriseAnimation.test/interface.js +1 -0
  37. package/dist/module/src/components/SunriseAnimation.test/specification.js +1 -0
  38. package/dist/module/src/components/pure/ProjectPageView.js +197 -0
  39. package/dist/module/src/components/pure/ProjectPageView.test/adapter.js +17 -0
  40. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +68 -0
  41. package/dist/module/src/components/pure/ProjectPageView.test/index.js +5 -0
  42. package/dist/module/src/components/pure/ProjectPageView.test/specification.js +15 -0
  43. package/dist/module/src/components/pure/ProjectPageView.test/types.js +1 -0
  44. package/dist/module/src/components/pure/ProjectsPageView.js +58 -0
  45. package/dist/module/src/components/pure/TestPageView.js +136 -0
  46. package/dist/module/src/components/stateful/ProjectPage.js +63 -0
  47. package/dist/module/src/components/stateful/ProjectsPage.js +55 -0
  48. package/dist/module/src/components/stateful/TestPage.js +82 -0
  49. package/dist/module/src/lib/BaseSuite.js +3 -3
  50. package/dist/module/src/lib/BaseSuite.test/test.js +1 -1
  51. package/dist/module/src/lib/abstractBase.js +41 -14
  52. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +1 -1
  53. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.mock.js +1 -1
  54. package/dist/module/src/lib/basebuilder.js +9 -7
  55. package/dist/module/src/lib/core.test/MockCore.js +17 -15
  56. package/dist/module/src/lib/pmProxy.js +185 -64
  57. package/dist/module/testeranto.config.js +6 -0
  58. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  59. package/dist/prebuild/App.js +541 -495
  60. package/dist/prebuild/ReportServer.mjs +44 -4
  61. package/dist/prebuild/run.mjs +67 -39
  62. package/dist/types/src/NavBar.d.ts +19 -0
  63. package/dist/types/src/PM/index.d.ts +3 -1
  64. package/dist/types/src/PM/main.d.ts +0 -4
  65. package/dist/types/src/PM/node.d.ts +2 -2
  66. package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -0
  67. package/dist/types/src/components/SunriseAnimation.test/specification.d.ts +0 -0
  68. package/dist/types/src/components/TestStatusBadge.d.ts +15 -0
  69. package/dist/types/src/components/pure/ProjectPageView.d.ts +14 -0
  70. package/dist/types/src/components/pure/ProjectPageView.test/adapter.d.ts +3 -0
  71. package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +3 -0
  72. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +3 -0
  73. package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +3 -0
  74. package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +39 -0
  75. package/dist/types/src/lib/BaseSuite.d.ts +2 -0
  76. package/dist/types/src/lib/abstractBase.d.ts +12 -0
  77. package/dist/types/src/lib/index.d.ts +0 -1
  78. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  79. package/package.json +3 -2
  80. package/src/App.tsx +5 -9
  81. package/src/PM/index.ts +1 -1
  82. package/src/PM/main.ts +87 -82
  83. package/src/PM/node.ts +2 -2
  84. package/src/ProjectsPage.tsx +1 -164
  85. package/src/Pure.ts +17 -17
  86. package/src/ReportServer.ts +49 -6
  87. package/src/TestPage.tsx +78 -5
  88. package/src/Web.ts +35 -35
  89. package/src/components/SunriseAnimation.test/implementation.ts +0 -0
  90. package/src/components/SunriseAnimation.test/index.ts +0 -0
  91. package/src/components/SunriseAnimation.test/interface.ts +0 -0
  92. package/src/components/SunriseAnimation.test/specification.ts +0 -0
  93. package/src/components/pure/ProjectPageView.test/adapter.ts +21 -0
  94. package/src/components/pure/ProjectPageView.test/implementation.tsx +84 -0
  95. package/src/components/pure/ProjectPageView.test/index.ts +8 -0
  96. package/src/components/pure/ProjectPageView.test/specification.ts +31 -0
  97. package/src/components/pure/ProjectPageView.test/types.ts +55 -0
  98. package/src/components/pure/ProjectPageView.tsx +332 -0
  99. package/src/components/pure/ProjectsPageView.tsx +99 -0
  100. package/src/components/pure/TestPageView.tsx +278 -0
  101. package/src/components/stateful/ProjectPage.tsx +83 -0
  102. package/src/components/stateful/ProjectsPage.tsx +73 -0
  103. package/src/components/stateful/TestPage.tsx +107 -0
  104. package/src/lib/BaseSuite.test/test.ts +1 -1
  105. package/src/lib/BaseSuite.ts +9 -4
  106. package/src/lib/abstractBase.ts +45 -14
  107. package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +1 -1
  108. package/src/lib/baseBuilder.test/baseBuilder.test.mock.ts +1 -1
  109. package/src/lib/basebuilder.ts +9 -9
  110. package/src/lib/core.test/MockCore.ts +26 -19
  111. package/src/lib/index.ts +1 -1
  112. package/src/lib/pmProxy.ts +184 -87
  113. package/testeranto/App.js +541 -495
  114. package/testeranto/bundles/node/allTests/{chunk-4ONUZRZ4.mjs → chunk-3EUGBAOM.mjs} +1 -1
  115. package/testeranto/bundles/node/allTests/{chunk-FFBRDUBH.mjs → chunk-E75CSRER.mjs} +247 -124
  116. package/testeranto/bundles/node/allTests/{chunk-NQEP7SN4.mjs → chunk-M6DO7VMB.mjs} +1 -1
  117. package/testeranto/bundles/node/allTests/metafile.json +41 -41
  118. package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +4 -4
  119. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +4 -4
  120. package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +3 -3
  121. package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +11 -23
  122. package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +2 -2
  123. package/testeranto/bundles/pure/allTests/{chunk-CSMXYJ65.mjs → chunk-KHDVEHF7.mjs} +3 -18
  124. package/testeranto/bundles/pure/allTests/{chunk-QK4IXLF6.mjs → chunk-VMUSFSZM.mjs} +247 -124
  125. package/testeranto/bundles/pure/allTests/metafile.json +77 -47
  126. package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +2 -2
  127. package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +3 -3
  128. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +3 -30
  129. package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +2283 -0
  130. package/testeranto/bundles/web/allTests/{chunk-TU3MJSSI.mjs → chunk-RLDR6LJN.mjs} +302 -127
  131. package/testeranto/bundles/web/allTests/chunk-U7AW26HL.mjs +997 -0
  132. package/testeranto/bundles/web/allTests/metafile.json +15065 -46
  133. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.html +19 -0
  134. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.mjs +37524 -0
  135. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +20 -2
  136. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +27 -3
  137. package/testeranto/reports/allTests/config.json +8 -0
  138. package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +9 -3
  139. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +1 -0
  140. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +13 -0
  141. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +50 -0
  142. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
  143. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +17 -0
  144. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +32 -0
  145. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +68 -0
  146. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +0 -0
  147. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +6 -3
  148. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +8 -1
  149. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +6 -3
  150. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +9 -3
  151. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +0 -0
  152. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +2 -2
  153. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +6 -3
  154. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +10 -5
  155. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -0
  156. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +18 -9
  157. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +8 -1
  158. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +10 -5
  159. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -0
  160. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +2 -2
  161. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +18 -9
  162. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +10 -5
  163. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +0 -0
  164. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +36 -18
  165. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +8 -1
  166. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/lint_errors.txt +0 -12
  167. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +2 -2
  168. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +11 -8
  169. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +0 -0
  170. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +28 -14
  171. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +8 -1
  172. package/testeranto/reports/allTests/summary.json +16 -9
  173. package/testeranto/reportsweb_build_errors +25 -0
  174. package/testeranto.config.ts +7 -0
  175. package/tsc.log +313 -237
  176. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test/manifest.json +0 -1
  177. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/manifest.json +0 -1
  178. package/testeranto/reports/allTests/src/Pure.test/pure/manifest.json +0 -1
  179. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/manifest.json +0 -1
  180. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/manifest.json +0 -1
  181. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/manifest.json +0 -1
  182. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/manifest.json +0 -1
  183. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/manifest.json +0 -1
  184. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/manifest.json +0 -1
  185. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/manifest.json +0 -1
  186. /package/{testeranto/reports/allTests/src/Pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/implementation.d.ts} +0 -0
  187. /package/{testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/index.d.ts} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  BaseSuite,
5
5
  BaseThen,
6
6
  BaseWhen
7
- } from "./chunk-FFBRDUBH.mjs";
7
+ } from "./chunk-E75CSRER.mjs";
8
8
 
9
9
  // src/lib/BaseSuite.test/mock.ts
10
10
  var MockGiven = class extends BaseGiven {
@@ -15,146 +15,243 @@ var baseProxy = function(pm, mappings) {
15
15
  }
16
16
  });
17
17
  };
18
- var butThenProxy = (pm, filepath) => baseProxy(pm, [
19
- [
20
- "screencast",
21
- (opts, p) => [
22
- {
23
- ...opts,
24
- path: `${filepath}/butThen/${opts.path}`
25
- },
26
- p
27
- ]
28
- ],
29
- ["createWriteStream", (fp) => [`${filepath}/butThen/${fp}`]],
30
- [
31
- "writeFileSync",
32
- (fp, contents) => [`${filepath}/butThen/${fp}`, contents]
33
- ],
34
- [
35
- "customScreenShot",
36
- (opts, p) => [
37
- {
38
- ...opts,
39
- path: `${filepath}/butThen/${opts.path}`
40
- },
41
- p
18
+ var butThenProxy = (pm, filepath) => {
19
+ return baseProxy(pm, [
20
+ [
21
+ "screencast",
22
+ (opts, p) => {
23
+ const path = `${filepath}/butThen/${opts.path}`;
24
+ console.log(`[Proxy] Captured artifact path for butThen:`, path);
25
+ if (pm.currentStep?.addArtifact) {
26
+ pm.currentStep.addArtifact(path);
27
+ } else {
28
+ console.warn("No currentStep or addArtifact method found");
29
+ }
30
+ return [
31
+ {
32
+ ...opts,
33
+ path
34
+ },
35
+ p
36
+ ];
37
+ }
38
+ ],
39
+ ["createWriteStream", (fp) => {
40
+ const path = `${filepath}/butThen/${fp}`;
41
+ console.log(`[Proxy] Captured artifact path for butThen:`, path);
42
+ if (pm.currentStep?.addArtifact) {
43
+ pm.currentStep.addArtifact(path);
44
+ } else {
45
+ console.warn("No currentStep or addArtifact method found");
46
+ }
47
+ return [path];
48
+ }],
49
+ [
50
+ "writeFileSync",
51
+ (fp, contents) => {
52
+ const path = `${filepath}/butThen/${fp}`;
53
+ pm.currentStep?.artifacts?.push(path);
54
+ return [path, contents];
55
+ }
56
+ ],
57
+ [
58
+ "customScreenShot",
59
+ (opts, p) => {
60
+ const path = `${filepath}/butThen/${opts.path}`;
61
+ pm.currentStep?.artifacts?.push(path);
62
+ return [
63
+ {
64
+ ...opts,
65
+ path
66
+ },
67
+ p
68
+ ];
69
+ }
42
70
  ]
43
- ]
44
- ]);
71
+ ]);
72
+ };
45
73
  var andWhenProxy = (pm, filepath) => baseProxy(pm, [
46
74
  [
47
75
  "screencast",
48
- (opts, p) => [
49
- {
50
- ...opts,
51
- path: `${filepath}/andWhen/${opts.path}`
52
- },
53
- p
54
- ]
76
+ (opts, p) => {
77
+ const path = `${filepath}/andWhen/${opts.path}`;
78
+ pm.currentStep?.artifacts?.push(path);
79
+ return [
80
+ {
81
+ ...opts,
82
+ path
83
+ },
84
+ p
85
+ ];
86
+ }
55
87
  ],
56
- ["createWriteStream", (fp) => [`${filepath}/andWhen/${fp}`]],
57
- ["writeFileSync", (fp, contents) => [`${filepath}/andWhen${fp}`, contents]],
88
+ ["createWriteStream", (fp) => {
89
+ const path = `${filepath}/andWhen/${fp}`;
90
+ pm.currentStep?.artifacts?.push(path);
91
+ return [path];
92
+ }],
93
+ ["writeFileSync", (fp, contents) => {
94
+ const path = `${filepath}/andWhen/${fp}`;
95
+ pm.currentStep?.artifacts?.push(path);
96
+ return [path, contents];
97
+ }],
58
98
  [
59
99
  "customScreenShot",
60
- (opts, p) => [
61
- {
62
- ...opts,
63
- path: `${filepath}/andWhen${opts.path}`
64
- },
65
- p
66
- ]
100
+ (opts, p) => {
101
+ const path = `${filepath}/andWhen/${opts.path}`;
102
+ pm.currentStep?.artifacts?.push(path);
103
+ return [
104
+ {
105
+ ...opts,
106
+ path
107
+ },
108
+ p
109
+ ];
110
+ }
67
111
  ]
68
112
  ]);
69
113
  var afterEachProxy = (pm, suite, given) => baseProxy(pm, [
70
114
  [
71
115
  "screencast",
72
- (opts, p) => [
73
- {
74
- ...opts,
75
- path: `suite-${suite}/given-${given}/afterEach/${opts.path}`
76
- },
77
- p
78
- ]
116
+ (opts, p) => {
117
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
118
+ pm.currentStep?.artifacts?.push(path);
119
+ return [
120
+ {
121
+ ...opts,
122
+ path
123
+ },
124
+ p
125
+ ];
126
+ }
79
127
  ],
80
- ["createWriteStream", (fp) => [`suite-${suite}/afterEach/${fp}`]],
128
+ ["createWriteStream", (fp) => {
129
+ const path = `suite-${suite}/afterEach/${fp}`;
130
+ pm.currentStep?.artifacts?.push(path);
131
+ return [path];
132
+ }],
81
133
  [
82
134
  "writeFileSync",
83
- (fp, contents) => [
84
- `suite-${suite}/given-${given}/afterEach/${fp}`,
85
- contents
86
- ]
135
+ (fp, contents) => {
136
+ const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
137
+ pm.currentStep?.artifacts?.push(path);
138
+ return [path, contents];
139
+ }
87
140
  ],
88
141
  [
89
142
  "customScreenShot",
90
- (opts, p) => [
91
- {
92
- ...opts,
93
- path: `suite-${suite}/given-${given}/afterEach/${opts.path}`
94
- },
95
- p
96
- ]
143
+ (opts, p) => {
144
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
145
+ pm.currentStep?.artifacts?.push(path);
146
+ return [
147
+ {
148
+ ...opts,
149
+ path
150
+ },
151
+ p
152
+ ];
153
+ }
97
154
  ]
98
155
  ]);
99
156
  var beforeEachProxy = (pm, suite) => baseProxy(pm, [
100
157
  [
101
158
  "screencast",
102
- (opts, p) => [
103
- {
104
- ...opts,
105
- path: `suite-${suite}/beforeEach/${opts.path}`
106
- },
107
- p
108
- ]
159
+ (opts, p) => {
160
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
161
+ pm.currentStep?.artifacts?.push(path);
162
+ return [
163
+ {
164
+ ...opts,
165
+ path
166
+ },
167
+ p
168
+ ];
169
+ }
109
170
  ],
110
171
  [
111
172
  "writeFileSync",
112
- (fp, contents) => [`suite-${suite}/beforeEach/${fp}`, contents]
173
+ (fp, contents) => {
174
+ const path = `suite-${suite}/beforeEach/${fp}`;
175
+ pm.currentStep?.artifacts?.push(path);
176
+ return [path, contents];
177
+ }
113
178
  ],
114
179
  [
115
180
  "customScreenShot",
116
- (opts, p) => [
117
- {
118
- ...opts,
119
- path: `suite-${suite}/beforeEach/${opts.path}`
120
- },
121
- p
122
- ]
181
+ (opts, p) => {
182
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
183
+ pm.currentStep?.artifacts?.push(path);
184
+ return [
185
+ {
186
+ ...opts,
187
+ path
188
+ },
189
+ p
190
+ ];
191
+ }
123
192
  ],
124
- ["createWriteStream", (fp) => [`suite-${suite}/beforeEach/${fp}`]]
193
+ ["createWriteStream", (fp) => {
194
+ const path = `suite-${suite}/beforeEach/${fp}`;
195
+ pm.currentStep?.artifacts?.push(path);
196
+ return [path];
197
+ }]
125
198
  ]);
126
199
  var beforeAllProxy = (pm, suite) => baseProxy(pm, [
127
200
  [
128
201
  "writeFileSync",
129
- (fp, contents) => [`suite-${suite}/beforeAll/${fp}`, contents]
202
+ (fp, contents) => {
203
+ const path = `suite-${suite}/beforeAll/${fp}`;
204
+ pm.currentStep?.artifacts?.push(path);
205
+ return [path, contents];
206
+ }
130
207
  ],
131
208
  [
132
209
  "customScreenShot",
133
- (opts, p) => [
134
- {
135
- ...opts,
136
- path: `suite-${suite}/beforeAll/${opts.path}`
137
- },
138
- p
139
- ]
210
+ (opts, p) => {
211
+ const path = `suite-${suite}/beforeAll/${opts.path}`;
212
+ pm.currentStep?.artifacts?.push(path);
213
+ return [
214
+ {
215
+ ...opts,
216
+ path
217
+ },
218
+ p
219
+ ];
220
+ }
140
221
  ],
141
- ["createWriteStream", (fp) => [`suite-${suite}/beforeAll/${fp}`]]
222
+ ["createWriteStream", (fp) => {
223
+ const path = `suite-${suite}/beforeAll/${fp}`;
224
+ pm.currentStep?.artifacts?.push(path);
225
+ return [path];
226
+ }]
142
227
  ]);
143
228
  var afterAllProxy = (pm, suite) => baseProxy(pm, [
144
- ["createWriteStream", (fp) => [`suite-${suite}/afterAll/${fp}`]],
229
+ ["createWriteStream", (fp) => {
230
+ const path = `suite-${suite}/afterAll/${fp}`;
231
+ pm.currentStep?.artifacts?.push(path);
232
+ return [path];
233
+ }],
145
234
  [
146
235
  "writeFileSync",
147
- (fp, contents) => [`suite-${suite}/afterAll/${fp}`, contents]
236
+ (fp, contents) => {
237
+ const path = `suite-${suite}/afterAll/${fp}`;
238
+ pm.currentStep?.artifacts?.push(path);
239
+ return [path, contents];
240
+ }
148
241
  ],
149
242
  [
150
243
  "customScreenShot",
151
- (opts, p) => [
152
- {
153
- ...opts,
154
- path: `suite-${suite}/afterAll/${opts.path}`
155
- },
156
- p
157
- ]
244
+ (opts, p) => {
245
+ const path = `suite-${suite}/afterAll/${opts.path}`;
246
+ pm.currentStep?.artifacts?.push(path);
247
+ return [
248
+ {
249
+ ...opts,
250
+ path
251
+ },
252
+ p
253
+ ];
254
+ }
158
255
  ]
159
256
  ]);
160
257
 
@@ -199,17 +296,9 @@ var BaseBuilder = class {
199
296
  },
200
297
  runner,
201
298
  receiveTestResourceConfig: async function(puppetMaster) {
202
- const logFilePath = "logs.txt";
203
- const access = await puppetMaster.createWriteStream(
204
- logFilePath
205
- );
206
299
  const tLog = async (...l) => {
207
300
  };
208
301
  const suiteDone = await runner(puppetMaster, tLog);
209
- const logPromise = new Promise(async (res) => {
210
- await puppetMaster.end(access);
211
- res(true);
212
- });
213
302
  const fails = suiteDone.fails;
214
303
  await puppetMaster.writeFileSync(`bdd_errors.txt`, fails.toString());
215
304
  await puppetMaster.writeFileSync(
@@ -220,7 +309,7 @@ var BaseBuilder = class {
220
309
  failed: fails > 0,
221
310
  fails,
222
311
  artifacts: this.artifacts || [],
223
- logPromise,
312
+ // logPromise,
224
313
  features: suiteDone.features()
225
314
  };
226
315
  }
@@ -327,20 +416,25 @@ var BaseSuite = class {
327
416
  if (!suiteName) {
328
417
  throw new Error("BaseSuite requires a non-empty name");
329
418
  }
330
- console.log("[DEBUG] BaseSuite constructor - name:", suiteName, "index:", index);
419
+ console.log(
420
+ "[DEBUG] BaseSuite constructor - name:",
421
+ suiteName,
422
+ "index:",
423
+ index
424
+ );
331
425
  this.name = suiteName;
332
426
  this.index = index;
333
427
  this.givens = givens;
334
428
  this.fails = 0;
335
429
  console.log("[DEBUG] BaseSuite initialized:", this.name, this.index);
336
- console.log("[DEBUG] BaseSuite givens:", Object.keys(givens));
430
+ console.log("[DEBUG] BaseSuite givens:", Object.keys(givens).toString());
337
431
  }
338
432
  features() {
339
433
  try {
340
434
  const features = Object.keys(this.givens).map((k) => this.givens[k].features).flat().filter((value, index, array) => {
341
435
  return array.indexOf(value) === index;
342
436
  });
343
- console.debug("[DEBUG] Features extracted:", features);
437
+ console.debug("[DEBUG] Features extracted:", features.toString());
344
438
  return features || [];
345
439
  } catch (e) {
346
440
  console.error("[ERROR] Failed to extract features:", e);
@@ -391,7 +485,6 @@ var BaseSuite = class {
391
485
  ).catch((e) => {
392
486
  this.failed = true;
393
487
  this.fails = this.fails + 1;
394
- console.error("Given error 1:", e);
395
488
  throw e;
396
489
  });
397
490
  }
@@ -442,6 +535,7 @@ var defaultTestResourceRequirement = {
442
535
  // src/lib/abstractBase.ts
443
536
  var BaseGiven = class {
444
537
  constructor(name, features, whens, thens, givenCB, initialValues) {
538
+ this.artifacts = [];
445
539
  this.name = name;
446
540
  this.features = features;
447
541
  this.whens = whens;
@@ -449,6 +543,10 @@ var BaseGiven = class {
449
543
  this.givenCB = givenCB;
450
544
  this.initialValues = initialValues;
451
545
  }
546
+ addArtifact(path) {
547
+ console.log(`[Artifact] Adding to ${this.constructor.name}:`, path);
548
+ this.artifacts.push(path);
549
+ }
452
550
  beforeAll(store) {
453
551
  return store;
454
552
  }
@@ -459,13 +557,14 @@ var BaseGiven = class {
459
557
  whens: this.whens.map((w) => {
460
558
  if (w && w.toObj)
461
559
  return w.toObj();
462
- console.error("w is not as expected!", w);
560
+ console.error("w is not as expected!", w.toString());
463
561
  return {};
464
562
  }),
465
563
  thens: this.thens.map((t) => t.toObj()),
466
564
  error: this.error ? [this.error, this.error.stack] : null,
467
565
  failed: this.failed,
468
- features: this.features
566
+ features: this.features,
567
+ artifacts: this.artifacts
469
568
  };
470
569
  }
471
570
  async afterEach(store, key, artifactory, pm) {
@@ -479,21 +578,24 @@ var BaseGiven = class {
479
578
  Given: ${this.name}`);
480
579
  const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
481
580
  this.uberCatcher((e) => {
482
- console.error(e);
581
+ console.error(e.toString());
483
582
  this.error = e.error;
484
583
  tLog(e.stack);
485
584
  });
486
585
  try {
586
+ const proxiedPm = beforeEachProxy(pm, suiteNdx.toString());
587
+ console.log(`[Given] Setting currentStep for beforeEach:`, this.name);
588
+ proxiedPm.currentStep = this;
487
589
  this.store = await this.givenThat(
488
590
  subject,
489
591
  testResourceConfiguration,
490
592
  givenArtifactory,
491
593
  this.givenCB,
492
594
  this.initialValues,
493
- beforeEachProxy(pm, suiteNdx.toString())
595
+ proxiedPm
494
596
  );
495
597
  } catch (e) {
496
- console.error("failure 4 ", e);
598
+ console.error("Given failure: ", e.toString());
497
599
  this.error = e;
498
600
  throw e;
499
601
  }
@@ -530,7 +632,7 @@ var BaseGiven = class {
530
632
  afterEachProxy(pm, suiteNdx.toString(), key)
531
633
  );
532
634
  } catch (e) {
533
- console.error("afterEach failed!", e);
635
+ console.error("afterEach failed!", e.toString());
534
636
  this.failed = e;
535
637
  throw e;
536
638
  }
@@ -540,30 +642,46 @@ var BaseGiven = class {
540
642
  };
541
643
  var BaseWhen = class {
542
644
  constructor(name, whenCB) {
645
+ this.artifacts = [];
543
646
  this.name = name;
544
647
  this.whenCB = whenCB;
545
648
  }
546
649
  toObj() {
547
650
  console.log("toObj error", this.error);
548
- return {
549
- name: this.name,
550
- error: this.error && this.error.name + this.error.stack
551
- };
651
+ if (this.error) {
652
+ return {
653
+ name: this.name,
654
+ error: this.error && this.error.name + this.error.stack,
655
+ artifacts: this.artifacts
656
+ };
657
+ } else {
658
+ return {
659
+ name: this.name,
660
+ artifacts: this.artifacts
661
+ };
662
+ }
552
663
  }
553
664
  async test(store, testResourceConfiguration, tLog, pm, filepath) {
554
665
  try {
555
666
  tLog(" When:", this.name);
556
- console.debug("[DEBUG] Executing When step:", this.name);
667
+ console.debug("[DEBUG] Executing When step:", this.name.toString());
668
+ const proxiedPm = andWhenProxy(pm, filepath);
669
+ console.log(`[When] Setting currentStep for andWhen:`, this.name);
670
+ proxiedPm.currentStep = this;
557
671
  const result = await this.andWhen(
558
672
  store,
559
673
  this.whenCB,
560
674
  testResourceConfiguration,
561
- andWhenProxy(pm, filepath)
675
+ proxiedPm
562
676
  );
563
- console.debug("[DEBUG] When step completed:", this.name);
677
+ console.debug("[DEBUG] When step completed:", this.name.toString());
564
678
  return result;
565
679
  } catch (e) {
566
- console.error("[ERROR] When step failed:", this.name, e);
680
+ console.error(
681
+ "[ERROR] When step failed:",
682
+ this.name.toString(),
683
+ e.toString()
684
+ );
567
685
  this.error = e;
568
686
  throw e;
569
687
  }
@@ -571,6 +689,7 @@ var BaseWhen = class {
571
689
  };
572
690
  var BaseThen = class {
573
691
  constructor(name, thenCB) {
692
+ this.artifacts = [];
574
693
  this.name = name;
575
694
  this.thenCB = thenCB;
576
695
  this.error = false;
@@ -578,15 +697,19 @@ var BaseThen = class {
578
697
  toObj() {
579
698
  return {
580
699
  name: this.name,
581
- error: this.error
700
+ error: this.error,
701
+ artifacts: this.artifacts
582
702
  };
583
703
  }
584
704
  async test(store, testResourceConfiguration, tLog, pm, filepath) {
705
+ const proxiedPm = butThenProxy(pm, filepath);
706
+ console.log(`[Then] Setting currentStep for butThen:`, this.name);
707
+ proxiedPm.currentStep = this;
585
708
  return this.butThen(
586
709
  store,
587
710
  async (s) => {
588
711
  if (typeof this.thenCB === "function") {
589
- return await this.thenCB(s);
712
+ return await this.thenCB(s, proxiedPm);
590
713
  } else {
591
714
  return this.thenCB;
592
715
  }
@@ -3,7 +3,7 @@ import {
3
3
  PM,
4
4
  TesterantoCore,
5
5
  defaultTestResourceRequirement
6
- } from "./chunk-FFBRDUBH.mjs";
6
+ } from "./chunk-E75CSRER.mjs";
7
7
 
8
8
  // src/PM/node.ts
9
9
  import net from "net";