testeranto 0.167.0 → 0.172.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 (185) 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.css +13 -9
  54. package/dist/prebuild/App.js +600 -551
  55. package/dist/prebuild/ReportServer.mjs +44 -4
  56. package/dist/prebuild/run.mjs +67 -39
  57. package/dist/types/src/NavBar.d.ts +19 -0
  58. package/dist/types/src/PM/index.d.ts +3 -1
  59. package/dist/types/src/PM/main.d.ts +0 -4
  60. package/dist/types/src/PM/node.d.ts +2 -2
  61. package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -0
  62. package/dist/types/src/components/SunriseAnimation.test/specification.d.ts +0 -0
  63. package/dist/types/src/components/TestStatusBadge.d.ts +15 -0
  64. package/dist/types/src/components/pure/ProjectPageView.d.ts +14 -0
  65. package/dist/types/src/components/pure/ProjectPageView.test/adapter.d.ts +3 -0
  66. package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +3 -0
  67. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +2 -0
  68. package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +3 -0
  69. package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +39 -0
  70. package/dist/types/src/lib/BaseSuite.d.ts +2 -0
  71. package/dist/types/src/lib/abstractBase.d.ts +12 -0
  72. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  73. package/package.json +5 -3
  74. package/src/App.tsx +5 -9
  75. package/src/PM/index.ts +1 -1
  76. package/src/PM/main.ts +87 -82
  77. package/src/PM/node.ts +2 -2
  78. package/src/ProjectsPage.tsx +1 -164
  79. package/src/Pure.ts +16 -16
  80. package/src/ReportServer.ts +49 -6
  81. package/src/TestPage.tsx +78 -5
  82. package/src/Web.ts +35 -35
  83. package/src/components/SunriseAnimation.test/implementation.ts +0 -0
  84. package/src/components/SunriseAnimation.test/index.ts +0 -0
  85. package/src/components/SunriseAnimation.test/interface.ts +0 -0
  86. package/src/components/SunriseAnimation.test/specification.ts +0 -0
  87. package/src/components/pure/ProjectPageView.test/adapter.ts +21 -0
  88. package/src/components/pure/ProjectPageView.test/implementation.tsx +84 -0
  89. package/src/components/pure/ProjectPageView.test/index.ts +8 -0
  90. package/src/components/pure/ProjectPageView.test/specification.ts +31 -0
  91. package/src/components/pure/ProjectPageView.test/types.ts +55 -0
  92. package/src/components/pure/ProjectPageView.tsx +332 -0
  93. package/src/components/pure/ProjectsPageView.tsx +99 -0
  94. package/src/components/pure/TestPageView.tsx +278 -0
  95. package/src/components/stateful/ProjectPage.tsx +83 -0
  96. package/src/components/stateful/ProjectsPage.tsx +73 -0
  97. package/src/components/stateful/TestPage.tsx +107 -0
  98. package/src/lib/BaseSuite.test/test.ts +1 -1
  99. package/src/lib/BaseSuite.ts +9 -4
  100. package/src/lib/abstractBase.ts +45 -14
  101. package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +1 -1
  102. package/src/lib/pmProxy.ts +184 -87
  103. package/testeranto/App.css +13 -9
  104. package/testeranto/App.js +600 -551
  105. package/testeranto/bundles/node/allTests/{chunk-4ONUZRZ4.mjs → chunk-3EUGBAOM.mjs} +1 -1
  106. package/testeranto/bundles/node/allTests/{chunk-IDCUSTSM.mjs → chunk-E75CSRER.mjs} +246 -115
  107. package/testeranto/bundles/node/allTests/{chunk-NQEP7SN4.mjs → chunk-M6DO7VMB.mjs} +1 -1
  108. package/testeranto/bundles/node/allTests/metafile.json +37 -37
  109. package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +4 -4
  110. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +3 -3
  111. package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +3 -3
  112. package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +2 -17
  113. package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +354 -252
  114. package/testeranto/bundles/pure/allTests/{chunk-5SBJWHSZ.mjs → chunk-KHDVEHF7.mjs} +2 -17
  115. package/testeranto/bundles/pure/allTests/{chunk-4ULDTZFU.mjs → chunk-VMUSFSZM.mjs} +246 -115
  116. package/testeranto/bundles/pure/allTests/metafile.json +72 -42
  117. package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +2 -2
  118. package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +3 -3
  119. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +2 -29
  120. package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +2283 -0
  121. package/testeranto/bundles/web/allTests/{chunk-46E6YGGN.mjs → chunk-U7AW26HL.mjs} +292 -142
  122. package/testeranto/bundles/web/allTests/metafile.json +22 -943
  123. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.html +19 -0
  124. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.mjs +37524 -0
  125. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +20 -2
  126. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +26 -2
  127. package/testeranto/reports/allTests/config.json +8 -0
  128. package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +9 -3
  129. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +1 -0
  130. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +13 -0
  131. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +50 -0
  132. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
  133. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +17 -0
  134. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +32 -0
  135. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +68 -0
  136. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +22 -39
  137. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +6 -3
  138. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +8 -1
  139. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +6 -3
  140. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +9 -3
  141. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +66 -55
  142. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +2 -2
  143. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +6 -3
  144. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +10 -5
  145. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +16 -48
  146. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +18 -9
  147. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +8 -1
  148. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +10 -5
  149. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +62 -33
  150. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +2 -2
  151. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +18 -9
  152. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +10 -5
  153. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +37 -50
  154. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +36 -18
  155. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +8 -1
  156. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +2 -2
  157. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +9 -3
  158. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +28 -43
  159. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +28 -14
  160. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +8 -1
  161. package/testeranto/reports/allTests/summary.json +15 -8
  162. package/testeranto/reportsnode_build_errors +20 -0
  163. package/testeranto/reportspure_build_errors +343 -0
  164. package/testeranto/reportsweb_build_errors +25 -0
  165. package/testeranto.config.ts +7 -0
  166. package/tsc.log +100 -26
  167. package/dist/tsconfig.tsbuildinfo +0 -1
  168. package/testeranto/bundles/node/allTests/chunk-FFBRDUBH.mjs +0 -677
  169. package/testeranto/bundles/node/allTests/chunk-H2IBV7SY.mjs +0 -113
  170. package/testeranto/bundles/node/allTests/chunk-ZHOULXPN.mjs +0 -252
  171. package/testeranto/bundles/pure/allTests/chunk-CSMXYJ65.mjs +0 -200
  172. package/testeranto/bundles/pure/allTests/chunk-QK4IXLF6.mjs +0 -674
  173. package/testeranto/bundles/web/allTests/chunk-TU3MJSSI.mjs +0 -855
  174. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test/manifest.json +0 -1
  175. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/manifest.json +0 -1
  176. package/testeranto/reports/allTests/src/Pure.test/pure/manifest.json +0 -1
  177. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/manifest.json +0 -1
  178. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/manifest.json +0 -1
  179. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/manifest.json +0 -1
  180. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/manifest.json +0 -1
  181. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/manifest.json +0 -1
  182. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/manifest.json +0 -1
  183. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/manifest.json +0 -1
  184. /package/{testeranto/reports/allTests/src/Pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/implementation.d.ts} +0 -0
  185. /package/{testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/index.d.ts} +0 -0
@@ -0,0 +1,82 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { useLocation, useNavigate, useParams } from 'react-router-dom';
3
+ import { TestPageView } from '../pure/TestPageView';
4
+ import { fetchTestData } from '../../utils/api';
5
+ export const TestPage = () => {
6
+ const navigate = useNavigate();
7
+ const location = useLocation();
8
+ const [route, setRoute] = useState('results');
9
+ // Sync route with hash changes
10
+ useEffect(() => {
11
+ const hash = location.hash.replace('#', '');
12
+ if (hash && ['results', 'logs', 'types', 'lint', 'coverage'].includes(hash)) {
13
+ setRoute(hash);
14
+ }
15
+ else {
16
+ setRoute('results');
17
+ }
18
+ }, [location.hash]);
19
+ const [testName, setTestName] = useState('');
20
+ const [testData, setTestData] = useState(null);
21
+ const [logs, setLogs] = useState('');
22
+ const [typeErrors, setTypeErrors] = useState('');
23
+ const [lintErrors, setLintErrors] = useState('');
24
+ const [loading, setLoading] = useState(true);
25
+ const [error, setError] = useState(null);
26
+ const [testsExist, setTestsExist] = useState(true);
27
+ const [errorCounts, setErrorCounts] = useState({
28
+ typeErrors: 0,
29
+ staticErrors: 0,
30
+ runTimeErrors: 0
31
+ });
32
+ const [summary, setSummary] = useState(null);
33
+ const { projectName, '*': splat } = useParams();
34
+ const pathParts = splat ? splat.split('/') : [];
35
+ const runtime = pathParts.pop() || '';
36
+ const testPath = pathParts.join('/');
37
+ const decodedTestPath = testPath ? decodeURIComponent(testPath) : '';
38
+ useEffect(() => {
39
+ if (!projectName || !testPath || !runtime)
40
+ return;
41
+ setTestName(testPath);
42
+ const fetchData = async () => {
43
+ try {
44
+ const testResponse = await fetchTestData(projectName, testPath, runtime);
45
+ setTestData(testResponse.testData);
46
+ setTestsExist(!!testResponse.testData);
47
+ setLogs(testResponse.logs === null ? undefined : testResponse.logs);
48
+ setTypeErrors(testResponse.typeErrors);
49
+ setLintErrors(testResponse.lintErrors);
50
+ try {
51
+ const summaryResponse = await fetch(`reports/${projectName}/summary.json`);
52
+ if (!summaryResponse.ok)
53
+ throw new Error('Failed to fetch summary');
54
+ const allSummaries = await summaryResponse.json();
55
+ const testSummary = allSummaries[testPath];
56
+ if (testSummary) {
57
+ const counts = {
58
+ typeErrors: Number(testSummary.typeErrors) || 0,
59
+ staticErrors: Number(testSummary.staticErrors) || 0,
60
+ runTimeErrors: Number(testSummary.runTimeErrors) || 0
61
+ };
62
+ setSummary(testSummary);
63
+ setErrorCounts(counts);
64
+ setTestsExist(testSummary.testsExist !== false);
65
+ }
66
+ }
67
+ catch (err) {
68
+ console.error('Failed to load summary:', err);
69
+ }
70
+ }
71
+ catch (err) {
72
+ setError(err instanceof Error ? err.message : 'Unknown error');
73
+ setTestsExist(false);
74
+ }
75
+ finally {
76
+ setLoading(false);
77
+ }
78
+ };
79
+ fetchData();
80
+ }, []);
81
+ return (React.createElement(TestPageView, { route: route, setRoute: setRoute, navigate: navigate, projectName: projectName, testName: testName, decodedTestPath: decodedTestPath, runtime: runtime, testData: testData, logs: logs, typeErrors: typeErrors, lintErrors: lintErrors, loading: loading, error: error, testsExist: testsExist, errorCounts: errorCounts, summary: summary }));
82
+ };
@@ -11,7 +11,7 @@ export class BaseSuite {
11
11
  this.givens = givens;
12
12
  this.fails = 0;
13
13
  console.log("[DEBUG] BaseSuite initialized:", this.name, this.index);
14
- console.log("[DEBUG] BaseSuite givens:", Object.keys(givens));
14
+ console.log("[DEBUG] BaseSuite givens:", Object.keys(givens).toString());
15
15
  }
16
16
  features() {
17
17
  try {
@@ -21,7 +21,7 @@ export class BaseSuite {
21
21
  .filter((value, index, array) => {
22
22
  return array.indexOf(value) === index;
23
23
  });
24
- console.debug("[DEBUG] Features extracted:", features);
24
+ console.debug("[DEBUG] Features extracted:", features.toString());
25
25
  return features || [];
26
26
  }
27
27
  catch (e) {
@@ -64,7 +64,7 @@ export class BaseSuite {
64
64
  .catch((e) => {
65
65
  this.failed = true;
66
66
  this.fails = this.fails + 1;
67
- console.error("Given error 1:", e);
67
+ // console.error("Given error 1:", e.toString());
68
68
  throw e;
69
69
  });
70
70
  }
@@ -246,7 +246,7 @@ export const testAdapter = {
246
246
  return result;
247
247
  }
248
248
  catch (e) {
249
- console.error("Then error:", e);
249
+ console.error("Then error:", e.toString());
250
250
  console.error("Full store state:", JSON.stringify(store, null, 2));
251
251
  throw e;
252
252
  }
@@ -2,7 +2,12 @@
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
  import { afterEachProxy, andWhenProxy, beforeEachProxy, butThenProxy, } from "./pmProxy.js";
4
4
  export class BaseGiven {
5
+ addArtifact(path) {
6
+ console.log(`[Artifact] Adding to ${this.constructor.name}:`, path);
7
+ this.artifacts.push(path);
8
+ }
5
9
  constructor(name, features, whens, thens, givenCB, initialValues) {
10
+ this.artifacts = [];
6
11
  this.name = name;
7
12
  this.features = features;
8
13
  this.whens = whens;
@@ -20,13 +25,14 @@ export class BaseGiven {
20
25
  whens: this.whens.map((w) => {
21
26
  if (w && w.toObj)
22
27
  return w.toObj();
23
- console.error("w is not as expected!", w);
28
+ console.error("w is not as expected!", w.toString());
24
29
  return {};
25
30
  }),
26
31
  thens: this.thens.map((t) => t.toObj()),
27
32
  error: this.error ? [this.error, this.error.stack] : null,
28
33
  failed: this.failed,
29
34
  features: this.features,
35
+ artifacts: this.artifacts,
30
36
  };
31
37
  }
32
38
  async afterEach(store, key, artifactory, pm) {
@@ -38,15 +44,18 @@ export class BaseGiven {
38
44
  tLog(`\n Given: ${this.name}`);
39
45
  const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
40
46
  this.uberCatcher((e) => {
41
- console.error(e);
47
+ console.error(e.toString());
42
48
  this.error = e.error;
43
49
  tLog(e.stack);
44
50
  });
45
51
  try {
46
- this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, beforeEachProxy(pm, suiteNdx.toString()));
52
+ const proxiedPm = beforeEachProxy(pm, suiteNdx.toString());
53
+ console.log(`[Given] Setting currentStep for beforeEach:`, this.name);
54
+ proxiedPm.currentStep = this;
55
+ this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, proxiedPm);
47
56
  }
48
57
  catch (e) {
49
- console.error("failure 4 ", e);
58
+ console.error("Given failure: ", e.toString());
50
59
  this.error = e;
51
60
  throw e;
52
61
  }
@@ -73,7 +82,7 @@ export class BaseGiven {
73
82
  await this.afterEach(this.store, this.key, givenArtifactory, afterEachProxy(pm, suiteNdx.toString(), key));
74
83
  }
75
84
  catch (e) {
76
- console.error("afterEach failed!", e);
85
+ console.error("afterEach failed!", e.toString());
77
86
  this.failed = e;
78
87
  throw e;
79
88
  // this.error = e.message;
@@ -84,26 +93,39 @@ export class BaseGiven {
84
93
  }
85
94
  export class BaseWhen {
86
95
  constructor(name, whenCB) {
96
+ this.artifacts = [];
87
97
  this.name = name;
88
98
  this.whenCB = whenCB;
89
99
  }
90
100
  toObj() {
91
101
  console.log("toObj error", this.error);
92
- return {
93
- name: this.name,
94
- error: this.error && this.error.name + this.error.stack,
95
- };
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
+ }
96
115
  }
97
116
  async test(store, testResourceConfiguration, tLog, pm, filepath) {
98
117
  try {
99
118
  tLog(" When:", this.name);
100
- console.debug("[DEBUG] Executing When step:", this.name);
101
- const result = await this.andWhen(store, this.whenCB, testResourceConfiguration, andWhenProxy(pm, filepath));
102
- console.debug("[DEBUG] When step completed:", 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;
123
+ const result = await this.andWhen(store, this.whenCB, testResourceConfiguration, proxiedPm);
124
+ console.debug("[DEBUG] When step completed:", this.name.toString());
103
125
  return result;
104
126
  }
105
127
  catch (e) {
106
- console.error("[ERROR] When step failed:", this.name, e);
128
+ console.error("[ERROR] When step failed:", this.name.toString(), e.toString());
107
129
  this.error = e;
108
130
  throw e;
109
131
  }
@@ -111,6 +133,7 @@ export class BaseWhen {
111
133
  }
112
134
  export class BaseThen {
113
135
  constructor(name, thenCB) {
136
+ this.artifacts = [];
114
137
  this.name = name;
115
138
  this.thenCB = thenCB;
116
139
  this.error = false;
@@ -119,12 +142,16 @@ export class BaseThen {
119
142
  return {
120
143
  name: this.name,
121
144
  error: this.error,
145
+ artifacts: this.artifacts,
122
146
  };
123
147
  }
124
148
  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;
125
152
  return this.butThen(store, async (s) => {
126
153
  if (typeof this.thenCB === "function") {
127
- return await this.thenCB(s);
154
+ return await this.thenCB(s, proxiedPm);
128
155
  }
129
156
  else {
130
157
  return this.thenCB;
@@ -7,7 +7,7 @@ export const testAdapter = {
7
7
  initialValues,
8
8
  });
9
9
  const result = initializer();
10
- console.log("Initialization result:", result);
10
+ console.log("Initialization result:", result.toString());
11
11
  return result;
12
12
  },
13
13
  andWhen: async (store, whenCB, testResource, utils) => {
@@ -14,115 +14,236 @@ const baseProxy = function (pm, mappings) {
14
14
  },
15
15
  });
16
16
  };
17
- export const butThenProxy = (pm, filepath) => baseProxy(pm, [
18
- [
19
- "screencast",
20
- (opts, p) => [
21
- Object.assign(Object.assign({}, opts), { path: `${filepath}/butThen/${opts.path}` }),
22
- p,
17
+ export const butThenProxy = (pm, filepath) => {
18
+ return baseProxy(pm, [
19
+ [
20
+ "screencast",
21
+ (opts, p) => {
22
+ var _a;
23
+ const path = `${filepath}/butThen/${opts.path}`;
24
+ console.log(`[Proxy] Captured artifact path for butThen:`, path);
25
+ if ((_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.addArtifact) {
26
+ pm.currentStep.addArtifact(path);
27
+ }
28
+ else {
29
+ console.warn('No currentStep or addArtifact method found');
30
+ }
31
+ return [
32
+ Object.assign(Object.assign({}, opts), { path }),
33
+ p,
34
+ ];
35
+ },
23
36
  ],
24
- ],
25
- ["createWriteStream", (fp) => [`${filepath}/butThen/${fp}`]],
26
- [
27
- "writeFileSync",
28
- (fp, contents) => [`${filepath}/butThen/${fp}`, contents],
29
- ],
30
- [
31
- "customScreenShot",
32
- (opts, p) => [
33
- Object.assign(Object.assign({}, opts), { path: `${filepath}/butThen/${opts.path}` }),
34
- p,
37
+ ["createWriteStream", (fp) => {
38
+ var _a;
39
+ const path = `${filepath}/butThen/${fp}`;
40
+ console.log(`[Proxy] Captured artifact path for butThen:`, path);
41
+ if ((_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.addArtifact) {
42
+ pm.currentStep.addArtifact(path);
43
+ }
44
+ else {
45
+ console.warn('No currentStep or addArtifact method found');
46
+ }
47
+ return [path];
48
+ }],
49
+ [
50
+ "writeFileSync",
51
+ (fp, contents) => {
52
+ var _a, _b;
53
+ const path = `${filepath}/butThen/${fp}`;
54
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
55
+ return [path, contents];
56
+ },
35
57
  ],
36
- ],
37
- ]);
58
+ [
59
+ "customScreenShot",
60
+ (opts, p) => {
61
+ var _a, _b;
62
+ const path = `${filepath}/butThen/${opts.path}`;
63
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
64
+ return [
65
+ Object.assign(Object.assign({}, opts), { path }),
66
+ p,
67
+ ];
68
+ },
69
+ ],
70
+ ]);
71
+ };
38
72
  export const andWhenProxy = (pm, filepath) => baseProxy(pm, [
39
73
  [
40
74
  "screencast",
41
- (opts, p) => [
42
- Object.assign(Object.assign({}, opts), { path: `${filepath}/andWhen/${opts.path}` }),
43
- p,
44
- ],
75
+ (opts, p) => {
76
+ var _a, _b;
77
+ const path = `${filepath}/andWhen/${opts.path}`;
78
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
79
+ return [
80
+ Object.assign(Object.assign({}, opts), { path }),
81
+ p,
82
+ ];
83
+ },
45
84
  ],
46
- ["createWriteStream", (fp) => [`${filepath}/andWhen/${fp}`]],
47
- ["writeFileSync", (fp, contents) => [`${filepath}/andWhen${fp}`, contents]],
85
+ ["createWriteStream", (fp) => {
86
+ var _a, _b;
87
+ const path = `${filepath}/andWhen/${fp}`;
88
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
89
+ return [path];
90
+ }],
91
+ ["writeFileSync", (fp, contents) => {
92
+ var _a, _b;
93
+ const path = `${filepath}/andWhen/${fp}`;
94
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
95
+ return [path, contents];
96
+ }],
48
97
  [
49
98
  "customScreenShot",
50
- (opts, p) => [
51
- Object.assign(Object.assign({}, opts), { path: `${filepath}/andWhen${opts.path}` }),
52
- p,
53
- ],
99
+ (opts, p) => {
100
+ var _a, _b;
101
+ const path = `${filepath}/andWhen/${opts.path}`;
102
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
103
+ return [
104
+ Object.assign(Object.assign({}, opts), { path }),
105
+ p,
106
+ ];
107
+ },
54
108
  ],
55
109
  ]);
56
110
  export const afterEachProxy = (pm, suite, given) => baseProxy(pm, [
57
111
  [
58
112
  "screencast",
59
- (opts, p) => [
60
- Object.assign(Object.assign({}, opts), { path: `suite-${suite}/given-${given}/afterEach/${opts.path}` }),
61
- p,
62
- ],
113
+ (opts, p) => {
114
+ var _a, _b;
115
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
116
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
117
+ return [
118
+ Object.assign(Object.assign({}, opts), { path }),
119
+ p,
120
+ ];
121
+ },
63
122
  ],
64
- ["createWriteStream", (fp) => [`suite-${suite}/afterEach/${fp}`]],
123
+ ["createWriteStream", (fp) => {
124
+ var _a, _b;
125
+ const path = `suite-${suite}/afterEach/${fp}`;
126
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
127
+ return [path];
128
+ }],
65
129
  [
66
130
  "writeFileSync",
67
- (fp, contents) => [
68
- `suite-${suite}/given-${given}/afterEach/${fp}`,
69
- contents,
70
- ],
131
+ (fp, contents) => {
132
+ var _a, _b;
133
+ const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
134
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
135
+ return [path, contents];
136
+ },
71
137
  ],
72
138
  [
73
139
  "customScreenShot",
74
- (opts, p) => [
75
- Object.assign(Object.assign({}, opts), { path: `suite-${suite}/given-${given}/afterEach/${opts.path}` }),
76
- p,
77
- ],
140
+ (opts, p) => {
141
+ var _a, _b;
142
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
143
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
144
+ return [
145
+ Object.assign(Object.assign({}, opts), { path }),
146
+ p,
147
+ ];
148
+ },
78
149
  ],
79
150
  ]);
80
151
  export const beforeEachProxy = (pm, suite) => baseProxy(pm, [
81
152
  [
82
153
  "screencast",
83
- (opts, p) => [
84
- Object.assign(Object.assign({}, opts), { path: `suite-${suite}/beforeEach/${opts.path}` }),
85
- p,
86
- ],
154
+ (opts, p) => {
155
+ var _a, _b;
156
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
157
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
158
+ return [
159
+ Object.assign(Object.assign({}, opts), { path }),
160
+ p,
161
+ ];
162
+ },
87
163
  ],
88
164
  [
89
165
  "writeFileSync",
90
- (fp, contents) => [`suite-${suite}/beforeEach/${fp}`, contents],
166
+ (fp, contents) => {
167
+ var _a, _b;
168
+ const path = `suite-${suite}/beforeEach/${fp}`;
169
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
170
+ return [path, contents];
171
+ },
91
172
  ],
92
173
  [
93
174
  "customScreenShot",
94
- (opts, p) => [
95
- Object.assign(Object.assign({}, opts), { path: `suite-${suite}/beforeEach/${opts.path}` }),
96
- p,
97
- ],
175
+ (opts, p) => {
176
+ var _a, _b;
177
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
178
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
179
+ return [
180
+ Object.assign(Object.assign({}, opts), { path }),
181
+ p,
182
+ ];
183
+ },
98
184
  ],
99
- ["createWriteStream", (fp) => [`suite-${suite}/beforeEach/${fp}`]],
185
+ ["createWriteStream", (fp) => {
186
+ var _a, _b;
187
+ const path = `suite-${suite}/beforeEach/${fp}`;
188
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
189
+ return [path];
190
+ }],
100
191
  ]);
101
192
  export const beforeAllProxy = (pm, suite) => baseProxy(pm, [
102
193
  [
103
194
  "writeFileSync",
104
- (fp, contents) => [`suite-${suite}/beforeAll/${fp}`, contents],
195
+ (fp, contents) => {
196
+ var _a, _b;
197
+ const path = `suite-${suite}/beforeAll/${fp}`;
198
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
199
+ return [path, contents];
200
+ },
105
201
  ],
106
202
  [
107
203
  "customScreenShot",
108
- (opts, p) => [
109
- Object.assign(Object.assign({}, opts), { path: `suite-${suite}/beforeAll/${opts.path}` }),
110
- p,
111
- ],
204
+ (opts, p) => {
205
+ var _a, _b;
206
+ const path = `suite-${suite}/beforeAll/${opts.path}`;
207
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
208
+ return [
209
+ Object.assign(Object.assign({}, opts), { path }),
210
+ p,
211
+ ];
212
+ },
112
213
  ],
113
- ["createWriteStream", (fp) => [`suite-${suite}/beforeAll/${fp}`]],
214
+ ["createWriteStream", (fp) => {
215
+ var _a, _b;
216
+ const path = `suite-${suite}/beforeAll/${fp}`;
217
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
218
+ return [path];
219
+ }],
114
220
  ]);
115
221
  export const afterAllProxy = (pm, suite) => baseProxy(pm, [
116
- ["createWriteStream", (fp) => [`suite-${suite}/afterAll/${fp}`]],
222
+ ["createWriteStream", (fp) => {
223
+ var _a, _b;
224
+ const path = `suite-${suite}/afterAll/${fp}`;
225
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
226
+ return [path];
227
+ }],
117
228
  [
118
229
  "writeFileSync",
119
- (fp, contents) => [`suite-${suite}/afterAll/${fp}`, contents],
230
+ (fp, contents) => {
231
+ var _a, _b;
232
+ const path = `suite-${suite}/afterAll/${fp}`;
233
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
234
+ return [path, contents];
235
+ },
120
236
  ],
121
237
  [
122
238
  "customScreenShot",
123
- (opts, p) => [
124
- Object.assign(Object.assign({}, opts), { path: `suite-${suite}/afterAll/${opts.path}` }),
125
- p,
126
- ],
239
+ (opts, p) => {
240
+ var _a, _b;
241
+ const path = `suite-${suite}/afterAll/${opts.path}`;
242
+ (_b = (_a = pm.currentStep) === null || _a === void 0 ? void 0 : _a.artifacts) === null || _b === void 0 ? void 0 : _b.push(path);
243
+ return [
244
+ Object.assign(Object.assign({}, opts), { path }),
245
+ p,
246
+ ];
247
+ },
127
248
  ],
128
249
  ]);
@@ -2,6 +2,12 @@ const config = {
2
2
  projects: {
3
3
  allTests: {
4
4
  tests: [
5
+ [
6
+ "src/components/pure/ProjectPageView.test/index.ts",
7
+ "web",
8
+ { ports: 0 },
9
+ [],
10
+ ],
5
11
  ["src/lib/BaseSuite.test/node.test.ts", "node", { ports: 0 }, []],
6
12
  ["src/lib/BaseSuite.test/pure.test.ts", "pure", { ports: 0 }, []],
7
13
  ["src/lib/BaseSuite.test/web.test.ts", "web", { ports: 0 }, []],