testeranto 0.167.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 (181) 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 +16 -14
  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/pmProxy.js +185 -64
  22. package/dist/common/testeranto.config.js +6 -0
  23. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  24. package/dist/module/src/App.js +3 -3
  25. package/dist/module/src/PM/main.js +81 -59
  26. package/dist/module/src/ProjectsPage.js +1 -110
  27. package/dist/module/src/Pure.js +16 -14
  28. package/dist/module/src/ReportServer.js +48 -5
  29. package/dist/module/src/TestPage.js +45 -16
  30. package/dist/module/src/Web.js +35 -20
  31. package/dist/module/src/components/SunriseAnimation.test/implementation.js +1 -0
  32. package/dist/module/src/components/SunriseAnimation.test/index.js +1 -0
  33. package/dist/module/src/components/SunriseAnimation.test/interface.js +1 -0
  34. package/dist/module/src/components/SunriseAnimation.test/specification.js +1 -0
  35. package/dist/module/src/components/pure/ProjectPageView.js +197 -0
  36. package/dist/module/src/components/pure/ProjectPageView.test/adapter.js +17 -0
  37. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +68 -0
  38. package/dist/module/src/components/pure/ProjectPageView.test/index.js +5 -0
  39. package/dist/module/src/components/pure/ProjectPageView.test/specification.js +15 -0
  40. package/dist/module/src/components/pure/ProjectPageView.test/types.js +1 -0
  41. package/dist/module/src/components/pure/ProjectsPageView.js +58 -0
  42. package/dist/module/src/components/pure/TestPageView.js +136 -0
  43. package/dist/module/src/components/stateful/ProjectPage.js +63 -0
  44. package/dist/module/src/components/stateful/ProjectsPage.js +55 -0
  45. package/dist/module/src/components/stateful/TestPage.js +82 -0
  46. package/dist/module/src/lib/BaseSuite.js +3 -3
  47. package/dist/module/src/lib/BaseSuite.test/test.js +1 -1
  48. package/dist/module/src/lib/abstractBase.js +41 -14
  49. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +1 -1
  50. package/dist/module/src/lib/pmProxy.js +185 -64
  51. package/dist/module/testeranto.config.js +6 -0
  52. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  53. package/dist/prebuild/App.js +541 -495
  54. package/dist/prebuild/ReportServer.mjs +44 -4
  55. package/dist/prebuild/run.mjs +67 -39
  56. package/dist/types/src/NavBar.d.ts +19 -0
  57. package/dist/types/src/PM/index.d.ts +3 -1
  58. package/dist/types/src/PM/main.d.ts +0 -4
  59. package/dist/types/src/PM/node.d.ts +2 -2
  60. package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -0
  61. package/dist/types/src/components/SunriseAnimation.test/specification.d.ts +0 -0
  62. package/dist/types/src/components/TestStatusBadge.d.ts +15 -0
  63. package/dist/types/src/components/pure/ProjectPageView.d.ts +14 -0
  64. package/dist/types/src/components/pure/ProjectPageView.test/adapter.d.ts +3 -0
  65. package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +3 -0
  66. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +3 -0
  67. package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +3 -0
  68. package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +39 -0
  69. package/dist/types/src/lib/BaseSuite.d.ts +2 -0
  70. package/dist/types/src/lib/abstractBase.d.ts +12 -0
  71. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  72. package/package.json +3 -2
  73. package/src/App.tsx +5 -9
  74. package/src/PM/index.ts +1 -1
  75. package/src/PM/main.ts +87 -82
  76. package/src/PM/node.ts +2 -2
  77. package/src/ProjectsPage.tsx +1 -164
  78. package/src/Pure.ts +16 -16
  79. package/src/ReportServer.ts +49 -6
  80. package/src/TestPage.tsx +78 -5
  81. package/src/Web.ts +35 -35
  82. package/src/components/SunriseAnimation.test/implementation.ts +0 -0
  83. package/src/components/SunriseAnimation.test/index.ts +0 -0
  84. package/src/components/SunriseAnimation.test/interface.ts +0 -0
  85. package/src/components/SunriseAnimation.test/specification.ts +0 -0
  86. package/src/components/pure/ProjectPageView.test/adapter.ts +21 -0
  87. package/src/components/pure/ProjectPageView.test/implementation.tsx +84 -0
  88. package/src/components/pure/ProjectPageView.test/index.ts +8 -0
  89. package/src/components/pure/ProjectPageView.test/specification.ts +31 -0
  90. package/src/components/pure/ProjectPageView.test/types.ts +55 -0
  91. package/src/components/pure/ProjectPageView.tsx +332 -0
  92. package/src/components/pure/ProjectsPageView.tsx +99 -0
  93. package/src/components/pure/TestPageView.tsx +278 -0
  94. package/src/components/stateful/ProjectPage.tsx +83 -0
  95. package/src/components/stateful/ProjectsPage.tsx +73 -0
  96. package/src/components/stateful/TestPage.tsx +107 -0
  97. package/src/lib/BaseSuite.test/test.ts +1 -1
  98. package/src/lib/BaseSuite.ts +9 -4
  99. package/src/lib/abstractBase.ts +45 -14
  100. package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +1 -1
  101. package/src/lib/pmProxy.ts +184 -87
  102. package/testeranto/App.js +541 -495
  103. package/testeranto/bundles/node/allTests/{chunk-4ONUZRZ4.mjs → chunk-3EUGBAOM.mjs} +1 -1
  104. package/testeranto/bundles/node/allTests/{chunk-IDCUSTSM.mjs → chunk-E75CSRER.mjs} +246 -115
  105. package/testeranto/bundles/node/allTests/{chunk-NQEP7SN4.mjs → chunk-M6DO7VMB.mjs} +1 -1
  106. package/testeranto/bundles/node/allTests/metafile.json +34 -34
  107. package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +4 -4
  108. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +3 -3
  109. package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +3 -3
  110. package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +2 -17
  111. package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +2 -2
  112. package/testeranto/bundles/pure/allTests/{chunk-5SBJWHSZ.mjs → chunk-KHDVEHF7.mjs} +2 -17
  113. package/testeranto/bundles/pure/allTests/{chunk-4ULDTZFU.mjs → chunk-VMUSFSZM.mjs} +246 -115
  114. package/testeranto/bundles/pure/allTests/metafile.json +57 -27
  115. package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +2 -2
  116. package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +3 -3
  117. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +2 -29
  118. package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +2283 -0
  119. package/testeranto/bundles/web/allTests/{chunk-TU3MJSSI.mjs → chunk-RLDR6LJN.mjs} +302 -127
  120. package/testeranto/bundles/web/allTests/{chunk-46E6YGGN.mjs → chunk-U7AW26HL.mjs} +292 -142
  121. package/testeranto/bundles/web/allTests/metafile.json +15062 -43
  122. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.html +19 -0
  123. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.mjs +37524 -0
  124. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +20 -2
  125. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +26 -2
  126. package/testeranto/reports/allTests/config.json +8 -0
  127. package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +9 -3
  128. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +1 -0
  129. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +13 -0
  130. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +50 -0
  131. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
  132. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +17 -0
  133. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +32 -0
  134. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +68 -0
  135. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +22 -39
  136. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +6 -3
  137. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +8 -1
  138. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +6 -3
  139. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +9 -3
  140. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +66 -55
  141. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +2 -2
  142. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +6 -3
  143. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +10 -5
  144. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +16 -48
  145. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +18 -9
  146. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +8 -1
  147. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +10 -5
  148. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +62 -33
  149. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +2 -2
  150. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +18 -9
  151. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +10 -5
  152. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +37 -50
  153. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +36 -18
  154. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +8 -1
  155. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +2 -2
  156. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +9 -3
  157. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +21 -36
  158. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +28 -14
  159. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +8 -1
  160. package/testeranto/reports/allTests/summary.json +15 -8
  161. package/testeranto/reportsweb_build_errors +25 -0
  162. package/testeranto.config.ts +7 -0
  163. package/tsc.log +100 -26
  164. package/dist/tsconfig.tsbuildinfo +0 -1
  165. package/testeranto/bundles/node/allTests/chunk-FFBRDUBH.mjs +0 -677
  166. package/testeranto/bundles/node/allTests/chunk-H2IBV7SY.mjs +0 -113
  167. package/testeranto/bundles/node/allTests/chunk-ZHOULXPN.mjs +0 -252
  168. package/testeranto/bundles/pure/allTests/chunk-CSMXYJ65.mjs +0 -200
  169. package/testeranto/bundles/pure/allTests/chunk-QK4IXLF6.mjs +0 -674
  170. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test/manifest.json +0 -1
  171. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/manifest.json +0 -1
  172. package/testeranto/reports/allTests/src/Pure.test/pure/manifest.json +0 -1
  173. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/manifest.json +0 -1
  174. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/manifest.json +0 -1
  175. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/manifest.json +0 -1
  176. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/manifest.json +0 -1
  177. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/manifest.json +0 -1
  178. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/manifest.json +0 -1
  179. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/manifest.json +0 -1
  180. /package/{testeranto/reports/allTests/src/Pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/implementation.d.ts} +0 -0
  181. /package/{testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/index.d.ts} +0 -0
@@ -1,4 +1,18 @@
1
+ import {
2
+ init_buffer,
3
+ init_dirname,
4
+ init_process
5
+ } from "./chunk-HPYA4YZC.mjs";
6
+
7
+ // src/lib/BaseSuite.ts
8
+ init_dirname();
9
+ init_buffer();
10
+ init_process();
11
+
1
12
  // src/lib/pmProxy.ts
13
+ init_dirname();
14
+ init_buffer();
15
+ init_process();
2
16
  var baseProxy = function(pm, mappings) {
3
17
  return new Proxy(pm, {
4
18
  get: (target, prop, receiver) => {
@@ -13,146 +27,243 @@ var baseProxy = function(pm, mappings) {
13
27
  }
14
28
  });
15
29
  };
16
- var butThenProxy = (pm, filepath) => baseProxy(pm, [
17
- [
18
- "screencast",
19
- (opts2, p) => [
20
- {
21
- ...opts2,
22
- path: `${filepath}/butThen/${opts2.path}`
23
- },
24
- p
25
- ]
26
- ],
27
- ["createWriteStream", (fp) => [`${filepath}/butThen/${fp}`]],
28
- [
29
- "writeFileSync",
30
- (fp, contents) => [`${filepath}/butThen/${fp}`, contents]
31
- ],
32
- [
33
- "customScreenShot",
34
- (opts2, p) => [
35
- {
36
- ...opts2,
37
- path: `${filepath}/butThen/${opts2.path}`
38
- },
39
- p
30
+ var butThenProxy = (pm, filepath) => {
31
+ return baseProxy(pm, [
32
+ [
33
+ "screencast",
34
+ (opts2, p) => {
35
+ const path = `${filepath}/butThen/${opts2.path}`;
36
+ console.log(`[Proxy] Captured artifact path for butThen:`, path);
37
+ if (pm.currentStep?.addArtifact) {
38
+ pm.currentStep.addArtifact(path);
39
+ } else {
40
+ console.warn("No currentStep or addArtifact method found");
41
+ }
42
+ return [
43
+ {
44
+ ...opts2,
45
+ path
46
+ },
47
+ p
48
+ ];
49
+ }
50
+ ],
51
+ ["createWriteStream", (fp) => {
52
+ const path = `${filepath}/butThen/${fp}`;
53
+ console.log(`[Proxy] Captured artifact path for butThen:`, path);
54
+ if (pm.currentStep?.addArtifact) {
55
+ pm.currentStep.addArtifact(path);
56
+ } else {
57
+ console.warn("No currentStep or addArtifact method found");
58
+ }
59
+ return [path];
60
+ }],
61
+ [
62
+ "writeFileSync",
63
+ (fp, contents) => {
64
+ const path = `${filepath}/butThen/${fp}`;
65
+ pm.currentStep?.artifacts?.push(path);
66
+ return [path, contents];
67
+ }
68
+ ],
69
+ [
70
+ "customScreenShot",
71
+ (opts2, p) => {
72
+ const path = `${filepath}/butThen/${opts2.path}`;
73
+ pm.currentStep?.artifacts?.push(path);
74
+ return [
75
+ {
76
+ ...opts2,
77
+ path
78
+ },
79
+ p
80
+ ];
81
+ }
40
82
  ]
41
- ]
42
- ]);
83
+ ]);
84
+ };
43
85
  var andWhenProxy = (pm, filepath) => baseProxy(pm, [
44
86
  [
45
87
  "screencast",
46
- (opts2, p) => [
47
- {
48
- ...opts2,
49
- path: `${filepath}/andWhen/${opts2.path}`
50
- },
51
- p
52
- ]
88
+ (opts2, p) => {
89
+ const path = `${filepath}/andWhen/${opts2.path}`;
90
+ pm.currentStep?.artifacts?.push(path);
91
+ return [
92
+ {
93
+ ...opts2,
94
+ path
95
+ },
96
+ p
97
+ ];
98
+ }
53
99
  ],
54
- ["createWriteStream", (fp) => [`${filepath}/andWhen/${fp}`]],
55
- ["writeFileSync", (fp, contents) => [`${filepath}/andWhen${fp}`, contents]],
100
+ ["createWriteStream", (fp) => {
101
+ const path = `${filepath}/andWhen/${fp}`;
102
+ pm.currentStep?.artifacts?.push(path);
103
+ return [path];
104
+ }],
105
+ ["writeFileSync", (fp, contents) => {
106
+ const path = `${filepath}/andWhen/${fp}`;
107
+ pm.currentStep?.artifacts?.push(path);
108
+ return [path, contents];
109
+ }],
56
110
  [
57
111
  "customScreenShot",
58
- (opts2, p) => [
59
- {
60
- ...opts2,
61
- path: `${filepath}/andWhen${opts2.path}`
62
- },
63
- p
64
- ]
112
+ (opts2, p) => {
113
+ const path = `${filepath}/andWhen/${opts2.path}`;
114
+ pm.currentStep?.artifacts?.push(path);
115
+ return [
116
+ {
117
+ ...opts2,
118
+ path
119
+ },
120
+ p
121
+ ];
122
+ }
65
123
  ]
66
124
  ]);
67
125
  var afterEachProxy = (pm, suite, given) => baseProxy(pm, [
68
126
  [
69
127
  "screencast",
70
- (opts2, p) => [
71
- {
72
- ...opts2,
73
- path: `suite-${suite}/given-${given}/afterEach/${opts2.path}`
74
- },
75
- p
76
- ]
128
+ (opts2, p) => {
129
+ const path = `suite-${suite}/given-${given}/afterEach/${opts2.path}`;
130
+ pm.currentStep?.artifacts?.push(path);
131
+ return [
132
+ {
133
+ ...opts2,
134
+ path
135
+ },
136
+ p
137
+ ];
138
+ }
77
139
  ],
78
- ["createWriteStream", (fp) => [`suite-${suite}/afterEach/${fp}`]],
140
+ ["createWriteStream", (fp) => {
141
+ const path = `suite-${suite}/afterEach/${fp}`;
142
+ pm.currentStep?.artifacts?.push(path);
143
+ return [path];
144
+ }],
79
145
  [
80
146
  "writeFileSync",
81
- (fp, contents) => [
82
- `suite-${suite}/given-${given}/afterEach/${fp}`,
83
- contents
84
- ]
147
+ (fp, contents) => {
148
+ const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
149
+ pm.currentStep?.artifacts?.push(path);
150
+ return [path, contents];
151
+ }
85
152
  ],
86
153
  [
87
154
  "customScreenShot",
88
- (opts2, p) => [
89
- {
90
- ...opts2,
91
- path: `suite-${suite}/given-${given}/afterEach/${opts2.path}`
92
- },
93
- p
94
- ]
155
+ (opts2, p) => {
156
+ const path = `suite-${suite}/given-${given}/afterEach/${opts2.path}`;
157
+ pm.currentStep?.artifacts?.push(path);
158
+ return [
159
+ {
160
+ ...opts2,
161
+ path
162
+ },
163
+ p
164
+ ];
165
+ }
95
166
  ]
96
167
  ]);
97
168
  var beforeEachProxy = (pm, suite) => baseProxy(pm, [
98
169
  [
99
170
  "screencast",
100
- (opts2, p) => [
101
- {
102
- ...opts2,
103
- path: `suite-${suite}/beforeEach/${opts2.path}`
104
- },
105
- p
106
- ]
171
+ (opts2, p) => {
172
+ const path = `suite-${suite}/beforeEach/${opts2.path}`;
173
+ pm.currentStep?.artifacts?.push(path);
174
+ return [
175
+ {
176
+ ...opts2,
177
+ path
178
+ },
179
+ p
180
+ ];
181
+ }
107
182
  ],
108
183
  [
109
184
  "writeFileSync",
110
- (fp, contents) => [`suite-${suite}/beforeEach/${fp}`, contents]
185
+ (fp, contents) => {
186
+ const path = `suite-${suite}/beforeEach/${fp}`;
187
+ pm.currentStep?.artifacts?.push(path);
188
+ return [path, contents];
189
+ }
111
190
  ],
112
191
  [
113
192
  "customScreenShot",
114
- (opts2, p) => [
115
- {
116
- ...opts2,
117
- path: `suite-${suite}/beforeEach/${opts2.path}`
118
- },
119
- p
120
- ]
193
+ (opts2, p) => {
194
+ const path = `suite-${suite}/beforeEach/${opts2.path}`;
195
+ pm.currentStep?.artifacts?.push(path);
196
+ return [
197
+ {
198
+ ...opts2,
199
+ path
200
+ },
201
+ p
202
+ ];
203
+ }
121
204
  ],
122
- ["createWriteStream", (fp) => [`suite-${suite}/beforeEach/${fp}`]]
205
+ ["createWriteStream", (fp) => {
206
+ const path = `suite-${suite}/beforeEach/${fp}`;
207
+ pm.currentStep?.artifacts?.push(path);
208
+ return [path];
209
+ }]
123
210
  ]);
124
211
  var beforeAllProxy = (pm, suite) => baseProxy(pm, [
125
212
  [
126
213
  "writeFileSync",
127
- (fp, contents) => [`suite-${suite}/beforeAll/${fp}`, contents]
214
+ (fp, contents) => {
215
+ const path = `suite-${suite}/beforeAll/${fp}`;
216
+ pm.currentStep?.artifacts?.push(path);
217
+ return [path, contents];
218
+ }
128
219
  ],
129
220
  [
130
221
  "customScreenShot",
131
- (opts2, p) => [
132
- {
133
- ...opts2,
134
- path: `suite-${suite}/beforeAll/${opts2.path}`
135
- },
136
- p
137
- ]
222
+ (opts2, p) => {
223
+ const path = `suite-${suite}/beforeAll/${opts2.path}`;
224
+ pm.currentStep?.artifacts?.push(path);
225
+ return [
226
+ {
227
+ ...opts2,
228
+ path
229
+ },
230
+ p
231
+ ];
232
+ }
138
233
  ],
139
- ["createWriteStream", (fp) => [`suite-${suite}/beforeAll/${fp}`]]
234
+ ["createWriteStream", (fp) => {
235
+ const path = `suite-${suite}/beforeAll/${fp}`;
236
+ pm.currentStep?.artifacts?.push(path);
237
+ return [path];
238
+ }]
140
239
  ]);
141
240
  var afterAllProxy = (pm, suite) => baseProxy(pm, [
142
- ["createWriteStream", (fp) => [`suite-${suite}/afterAll/${fp}`]],
241
+ ["createWriteStream", (fp) => {
242
+ const path = `suite-${suite}/afterAll/${fp}`;
243
+ pm.currentStep?.artifacts?.push(path);
244
+ return [path];
245
+ }],
143
246
  [
144
247
  "writeFileSync",
145
- (fp, contents) => [`suite-${suite}/afterAll/${fp}`, contents]
248
+ (fp, contents) => {
249
+ const path = `suite-${suite}/afterAll/${fp}`;
250
+ pm.currentStep?.artifacts?.push(path);
251
+ return [path, contents];
252
+ }
146
253
  ],
147
254
  [
148
255
  "customScreenShot",
149
- (opts2, p) => [
150
- {
151
- ...opts2,
152
- path: `suite-${suite}/afterAll/${opts2.path}`
153
- },
154
- p
155
- ]
256
+ (opts2, p) => {
257
+ const path = `suite-${suite}/afterAll/${opts2.path}`;
258
+ pm.currentStep?.artifacts?.push(path);
259
+ return [
260
+ {
261
+ ...opts2,
262
+ path
263
+ },
264
+ p
265
+ ];
266
+ }
156
267
  ]
157
268
  ]);
158
269
 
@@ -163,20 +274,25 @@ var BaseSuite = class {
163
274
  if (!suiteName) {
164
275
  throw new Error("BaseSuite requires a non-empty name");
165
276
  }
166
- console.log("[DEBUG] BaseSuite constructor - name:", suiteName, "index:", index);
277
+ console.log(
278
+ "[DEBUG] BaseSuite constructor - name:",
279
+ suiteName,
280
+ "index:",
281
+ index
282
+ );
167
283
  this.name = suiteName;
168
284
  this.index = index;
169
285
  this.givens = givens;
170
286
  this.fails = 0;
171
287
  console.log("[DEBUG] BaseSuite initialized:", this.name, this.index);
172
- console.log("[DEBUG] BaseSuite givens:", Object.keys(givens));
288
+ console.log("[DEBUG] BaseSuite givens:", Object.keys(givens).toString());
173
289
  }
174
290
  features() {
175
291
  try {
176
292
  const features = Object.keys(this.givens).map((k) => this.givens[k].features).flat().filter((value, index, array) => {
177
293
  return array.indexOf(value) === index;
178
294
  });
179
- console.debug("[DEBUG] Features extracted:", features);
295
+ console.debug("[DEBUG] Features extracted:", features.toString());
180
296
  return features || [];
181
297
  } catch (e) {
182
298
  console.error("[ERROR] Failed to extract features:", e);
@@ -227,7 +343,6 @@ var BaseSuite = class {
227
343
  ).catch((e) => {
228
344
  this.failed = true;
229
345
  this.fails = this.fails + 1;
230
- console.error("Given error 1:", e);
231
346
  throw e;
232
347
  });
233
348
  }
@@ -244,7 +359,20 @@ var BaseSuite = class {
244
359
  }
245
360
  };
246
361
 
362
+ // src/Web.ts
363
+ init_dirname();
364
+ init_buffer();
365
+ init_process();
366
+
367
+ // src/PM/web.ts
368
+ init_dirname();
369
+ init_buffer();
370
+ init_process();
371
+
247
372
  // src/PM/index.ts
373
+ init_dirname();
374
+ init_buffer();
375
+ init_process();
248
376
  var PM = class {
249
377
  };
250
378
 
@@ -377,7 +505,15 @@ var PM_Web = class extends PM {
377
505
  }
378
506
  };
379
507
 
508
+ // src/lib/core.ts
509
+ init_dirname();
510
+ init_buffer();
511
+ init_process();
512
+
380
513
  // src/lib/index.ts
514
+ init_dirname();
515
+ init_buffer();
516
+ init_process();
381
517
  var BaseAdapter = () => ({
382
518
  beforeAll: async (s) => s,
383
519
  beforeEach: async function(subject, initialValues, x, testResource, pm) {
@@ -409,8 +545,12 @@ var defaultTestResourceRequirement = {
409
545
  };
410
546
 
411
547
  // src/lib/abstractBase.ts
548
+ init_dirname();
549
+ init_buffer();
550
+ init_process();
412
551
  var BaseGiven = class {
413
552
  constructor(name, features, whens, thens, givenCB, initialValues) {
553
+ this.artifacts = [];
414
554
  this.name = name;
415
555
  this.features = features;
416
556
  this.whens = whens;
@@ -418,6 +558,10 @@ var BaseGiven = class {
418
558
  this.givenCB = givenCB;
419
559
  this.initialValues = initialValues;
420
560
  }
561
+ addArtifact(path) {
562
+ console.log(`[Artifact] Adding to ${this.constructor.name}:`, path);
563
+ this.artifacts.push(path);
564
+ }
421
565
  beforeAll(store) {
422
566
  return store;
423
567
  }
@@ -428,13 +572,14 @@ var BaseGiven = class {
428
572
  whens: this.whens.map((w) => {
429
573
  if (w && w.toObj)
430
574
  return w.toObj();
431
- console.error("w is not as expected!", w);
575
+ console.error("w is not as expected!", w.toString());
432
576
  return {};
433
577
  }),
434
578
  thens: this.thens.map((t) => t.toObj()),
435
579
  error: this.error ? [this.error, this.error.stack] : null,
436
580
  failed: this.failed,
437
- features: this.features
581
+ features: this.features,
582
+ artifacts: this.artifacts
438
583
  };
439
584
  }
440
585
  async afterEach(store, key, artifactory, pm) {
@@ -448,21 +593,24 @@ var BaseGiven = class {
448
593
  Given: ${this.name}`);
449
594
  const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
450
595
  this.uberCatcher((e) => {
451
- console.error(e);
596
+ console.error(e.toString());
452
597
  this.error = e.error;
453
598
  tLog(e.stack);
454
599
  });
455
600
  try {
601
+ const proxiedPm = beforeEachProxy(pm, suiteNdx.toString());
602
+ console.log(`[Given] Setting currentStep for beforeEach:`, this.name);
603
+ proxiedPm.currentStep = this;
456
604
  this.store = await this.givenThat(
457
605
  subject,
458
606
  testResourceConfiguration,
459
607
  givenArtifactory,
460
608
  this.givenCB,
461
609
  this.initialValues,
462
- beforeEachProxy(pm, suiteNdx.toString())
610
+ proxiedPm
463
611
  );
464
612
  } catch (e) {
465
- console.error("failure 4 ", e);
613
+ console.error("Given failure: ", e.toString());
466
614
  this.error = e;
467
615
  throw e;
468
616
  }
@@ -499,7 +647,7 @@ var BaseGiven = class {
499
647
  afterEachProxy(pm, suiteNdx.toString(), key)
500
648
  );
501
649
  } catch (e) {
502
- console.error("afterEach failed!", e);
650
+ console.error("afterEach failed!", e.toString());
503
651
  this.failed = e;
504
652
  throw e;
505
653
  }
@@ -509,30 +657,46 @@ var BaseGiven = class {
509
657
  };
510
658
  var BaseWhen = class {
511
659
  constructor(name, whenCB) {
660
+ this.artifacts = [];
512
661
  this.name = name;
513
662
  this.whenCB = whenCB;
514
663
  }
515
664
  toObj() {
516
665
  console.log("toObj error", this.error);
517
- return {
518
- name: this.name,
519
- error: this.error && this.error.name + this.error.stack
520
- };
666
+ if (this.error) {
667
+ return {
668
+ name: this.name,
669
+ error: this.error && this.error.name + this.error.stack,
670
+ artifacts: this.artifacts
671
+ };
672
+ } else {
673
+ return {
674
+ name: this.name,
675
+ artifacts: this.artifacts
676
+ };
677
+ }
521
678
  }
522
679
  async test(store, testResourceConfiguration, tLog, pm, filepath) {
523
680
  try {
524
681
  tLog(" When:", this.name);
525
- console.debug("[DEBUG] Executing When step:", this.name);
682
+ console.debug("[DEBUG] Executing When step:", this.name.toString());
683
+ const proxiedPm = andWhenProxy(pm, filepath);
684
+ console.log(`[When] Setting currentStep for andWhen:`, this.name);
685
+ proxiedPm.currentStep = this;
526
686
  const result = await this.andWhen(
527
687
  store,
528
688
  this.whenCB,
529
689
  testResourceConfiguration,
530
- andWhenProxy(pm, filepath)
690
+ proxiedPm
531
691
  );
532
- console.debug("[DEBUG] When step completed:", this.name);
692
+ console.debug("[DEBUG] When step completed:", this.name.toString());
533
693
  return result;
534
694
  } catch (e) {
535
- console.error("[ERROR] When step failed:", this.name, e);
695
+ console.error(
696
+ "[ERROR] When step failed:",
697
+ this.name.toString(),
698
+ e.toString()
699
+ );
536
700
  this.error = e;
537
701
  throw e;
538
702
  }
@@ -540,6 +704,7 @@ var BaseWhen = class {
540
704
  };
541
705
  var BaseThen = class {
542
706
  constructor(name, thenCB) {
707
+ this.artifacts = [];
543
708
  this.name = name;
544
709
  this.thenCB = thenCB;
545
710
  this.error = false;
@@ -547,15 +712,19 @@ var BaseThen = class {
547
712
  toObj() {
548
713
  return {
549
714
  name: this.name,
550
- error: this.error
715
+ error: this.error,
716
+ artifacts: this.artifacts
551
717
  };
552
718
  }
553
719
  async test(store, testResourceConfiguration, tLog, pm, filepath) {
720
+ const proxiedPm = butThenProxy(pm, filepath);
721
+ console.log(`[Then] Setting currentStep for butThen:`, this.name);
722
+ proxiedPm.currentStep = this;
554
723
  return this.butThen(
555
724
  store,
556
725
  async (s) => {
557
726
  if (typeof this.thenCB === "function") {
558
- return await this.thenCB(s);
727
+ return await this.thenCB(s, proxiedPm);
559
728
  } else {
560
729
  return this.thenCB;
561
730
  }
@@ -568,7 +737,15 @@ var BaseThen = class {
568
737
  }
569
738
  };
570
739
 
740
+ // src/lib/classBuilder.ts
741
+ init_dirname();
742
+ init_buffer();
743
+ init_process();
744
+
571
745
  // src/lib/basebuilder.ts
746
+ init_dirname();
747
+ init_buffer();
748
+ init_process();
572
749
  var BaseBuilder = class {
573
750
  constructor(input, suitesOverrides, givenOverides, whenOverides, thenOverides, testResourceRequirement, testSpecification) {
574
751
  this.artifacts = [];
@@ -782,11 +959,6 @@ var TesterantoCore = class extends ClassBuilder {
782
959
  };
783
960
 
784
961
  // src/Web.ts
785
- var errorCallback = (e) => {
786
- };
787
- var unhandledrejectionCallback = (event) => {
788
- console.log("window.addEventListener unhandledrejection", event);
789
- };
790
962
  var WebTesteranto = class extends TesterantoCore {
791
963
  constructor(input, testSpecification, testImplementation, testResourceRequirement, testAdapter) {
792
964
  super(
@@ -796,28 +968,6 @@ var WebTesteranto = class extends TesterantoCore {
796
968
  testResourceRequirement,
797
969
  testAdapter,
798
970
  (cb) => {
799
- window.removeEventListener("error", errorCallback);
800
- errorCallback = (e) => {
801
- console.log("window.addEventListener error", e);
802
- cb(e);
803
- };
804
- window.addEventListener("error", errorCallback);
805
- window.removeEventListener(
806
- "unhandledrejection",
807
- unhandledrejectionCallback
808
- );
809
- window.removeEventListener(
810
- "unhandledrejection",
811
- unhandledrejectionCallback
812
- );
813
- unhandledrejectionCallback = (event) => {
814
- console.log("window.addEventListener unhandledrejection", event);
815
- cb({ error: event.reason.message });
816
- };
817
- window.addEventListener(
818
- "unhandledrejection",
819
- unhandledrejectionCallback
820
- );
821
971
  }
822
972
  );
823
973
  }