testeranto 0.172.0 → 0.177.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +2 -4
  2. package/dist/common/src/PM/base.js +5 -1
  3. package/dist/common/src/PM/main.js +57 -54
  4. package/dist/common/src/PM/node.js +4 -1
  5. package/dist/common/src/PM/pure.js +4 -1
  6. package/dist/common/src/PM/web.js +6 -3
  7. package/dist/common/src/Pure.js +0 -4
  8. package/dist/common/src/Pure.test.js +1 -1
  9. package/dist/common/src/ReportServer.js +2 -126
  10. package/dist/common/src/ReportServer.test.ts/index.js +78 -0
  11. package/dist/common/src/ReportServerLib.js +141 -0
  12. package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +1 -1
  13. package/dist/common/src/esbuildConfigs/node.js +1 -3
  14. package/dist/common/src/lib/BaseSuite.js +13 -11
  15. package/dist/common/src/lib/abstractBase.js +39 -40
  16. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +10 -9
  17. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.specification.js +7 -7
  18. package/dist/common/src/lib/basebuilder.js +13 -2
  19. package/dist/common/src/lib/core.js +1 -0
  20. package/dist/common/src/lib/pmProxy.js +215 -201
  21. package/dist/common/src/lib/pmProxy.test/adapter.js +2 -2
  22. package/dist/common/src/lib/pmProxy.test/implementation.js +1 -1
  23. package/dist/common/testeranto.config.js +47 -32
  24. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  25. package/dist/module/src/PM/base.js +5 -1
  26. package/dist/module/src/PM/main.js +22 -19
  27. package/dist/module/src/PM/node.js +4 -1
  28. package/dist/module/src/PM/pure.js +4 -1
  29. package/dist/module/src/PM/web.js +6 -3
  30. package/dist/module/src/Pure.js +0 -4
  31. package/dist/module/src/Pure.test.js +1 -1
  32. package/dist/module/src/ReportServer.js +2 -123
  33. package/dist/module/src/ReportServer.test.ts/index.js +73 -0
  34. package/dist/module/src/ReportServerLib.js +134 -0
  35. package/dist/module/src/TestPage.js +29 -17
  36. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +1 -1
  37. package/dist/module/src/components/pure/TestPageView.js +29 -17
  38. package/dist/module/src/esbuildConfigs/node.js +1 -3
  39. package/dist/module/src/lib/BaseSuite.js +13 -11
  40. package/dist/module/src/lib/abstractBase.js +39 -40
  41. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +10 -9
  42. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.specification.js +7 -7
  43. package/dist/module/src/lib/basebuilder.js +13 -2
  44. package/dist/module/src/lib/core.js +1 -0
  45. package/dist/module/src/lib/pmProxy.js +215 -201
  46. package/dist/module/src/lib/pmProxy.test/adapter.js +2 -2
  47. package/dist/module/src/lib/pmProxy.test/implementation.js +1 -1
  48. package/dist/module/testeranto.config.js +47 -32
  49. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  50. package/dist/prebuild/App.js +3 -3
  51. package/dist/prebuild/ReportServer.mjs +21 -9
  52. package/dist/prebuild/build.mjs +1 -1
  53. package/dist/prebuild/run.mjs +27 -20
  54. package/dist/types/src/PM/base.d.ts +1 -1
  55. package/dist/types/src/PM/node.d.ts +1 -1
  56. package/dist/types/src/PM/pure.d.ts +1 -1
  57. package/dist/types/src/PM/web.d.ts +1 -1
  58. package/dist/types/src/ReportServer.test.ts/index.d.ts +29 -0
  59. package/dist/types/src/ReportServerLib.d.ts +1 -0
  60. package/dist/types/src/Types.d.ts +0 -1
  61. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +2 -1
  62. package/dist/types/src/lib/BaseSuite.d.ts +2 -0
  63. package/dist/types/src/lib/abstractBase.d.ts +5 -7
  64. package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.types.d.ts +7 -4
  65. package/dist/types/src/lib/pmProxy.d.ts +3 -3
  66. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  67. package/package.json +3 -3
  68. package/src/PM/base.ts +7 -5
  69. package/src/PM/main.ts +26 -21
  70. package/src/PM/node.ts +6 -1
  71. package/src/PM/pure.ts +6 -1
  72. package/src/PM/web.ts +7 -3
  73. package/src/Pure.test.ts +6 -6
  74. package/src/Pure.ts +0 -8
  75. package/src/ReportServer.test.ts/index.ts +194 -0
  76. package/src/ReportServer.ts +2 -132
  77. package/src/ReportServerLib.ts +147 -0
  78. package/src/TestPage.tsx +65 -5
  79. package/src/Types.ts +0 -1
  80. package/src/components/pure/ProjectPageView.test/implementation.tsx +1 -1
  81. package/src/components/pure/TestPageView.tsx +65 -5
  82. package/src/esbuildConfigs/node.ts +1 -1
  83. package/src/lib/BaseSuite.ts +16 -21
  84. package/src/lib/abstractBase.ts +59 -48
  85. package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +22 -10
  86. package/src/lib/baseBuilder.test/baseBuilder.test.specification.ts +9 -9
  87. package/src/lib/baseBuilder.test/baseBuilder.test.types.ts +7 -4
  88. package/src/lib/basebuilder.ts +13 -4
  89. package/src/lib/core.ts +1 -0
  90. package/src/lib/pmProxy.test/adapter.ts +2 -2
  91. package/src/lib/pmProxy.test/implementation.ts +3 -3
  92. package/src/lib/pmProxy.test/types.ts +0 -2
  93. package/src/lib/pmProxy.ts +135 -80
  94. package/testeranto/App.js +3 -3
  95. package/testeranto/bundles/node/core/metafile.json +8 -0
  96. package/testeranto/bundles/pure/core/metafile.json +8 -0
  97. package/testeranto/bundles/web/core/metafile.json +15086 -0
  98. package/testeranto/bundles/web/{allTests → core}/src/components/pure/ProjectPageView.test/index.html +1 -1
  99. package/testeranto/bundles/web/{allTests → core}/src/components/pure/ProjectPageView.test/index.mjs +4109 -1642
  100. package/testeranto/projects.json +1 -1
  101. package/testeranto/reports/core/config.json +24 -0
  102. package/testeranto/reports/{allTests → core}/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +6 -1
  103. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/logs.txt +59 -0
  104. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
  105. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +27 -0
  106. package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/suite-0/given-basicRender/then-0/butThen/happyPath.png +0 -0
  107. package/testeranto/reports/{allTests → core}/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +15 -33
  108. package/testeranto/reports/core/summary.json +9 -0
  109. package/testeranto.config.ts +49 -32
  110. package/tsc.log +78 -92
  111. package/testeranto/bundles/node/allTests/chunk-3EUGBAOM.mjs +0 -113
  112. package/testeranto/bundles/node/allTests/chunk-E75CSRER.mjs +0 -800
  113. package/testeranto/bundles/node/allTests/chunk-M6DO7VMB.mjs +0 -252
  114. package/testeranto/bundles/node/allTests/metafile.json +0 -1229
  115. package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +0 -323
  116. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -223
  117. package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +0 -411
  118. package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +0 -528
  119. package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +0 -4752
  120. package/testeranto/bundles/pure/allTests/chunk-KHDVEHF7.mjs +0 -185
  121. package/testeranto/bundles/pure/allTests/chunk-VMUSFSZM.mjs +0 -797
  122. package/testeranto/bundles/pure/allTests/metafile.json +0 -1054
  123. package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +0 -429
  124. package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +0 -425
  125. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -381
  126. package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +0 -2283
  127. package/testeranto/bundles/web/allTests/chunk-U7AW26HL.mjs +0 -997
  128. package/testeranto/bundles/web/allTests/metafile.json +0 -25
  129. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.html +0 -19
  130. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +0 -440
  131. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.html +0 -19
  132. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +0 -244
  133. package/testeranto/reports/allTests/config.json +0 -104
  134. package/testeranto/reports/allTests/src/Pure.test/pure/lint_errors.txt +0 -0
  135. package/testeranto/reports/allTests/src/Pure.test/pure/message.txt +0 -2
  136. package/testeranto/reports/allTests/src/Pure.test/pure/prompt.txt +0 -13
  137. package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +0 -101
  138. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +0 -1
  139. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +0 -50
  140. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +0 -2
  141. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +0 -17
  142. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -32
  143. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/bdd_errors.txt +0 -1
  144. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/lint_errors.txt +0 -0
  145. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +0 -52
  146. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/message.txt +0 -2
  147. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/prompt.txt +0 -13
  148. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +0 -31
  149. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +0 -111
  150. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/bdd_errors.txt +0 -1
  151. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -0
  152. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/message.txt +0 -2
  153. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +0 -14
  154. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +0 -31
  155. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +0 -111
  156. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/bdd_errors.txt +0 -1
  157. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/lint_errors.txt +0 -0
  158. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +0 -108
  159. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/message.txt +0 -2
  160. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +0 -14
  161. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +0 -31
  162. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +0 -111
  163. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/bdd_errors.txt +0 -1
  164. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -0
  165. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -35
  166. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +0 -2
  167. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -16
  168. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -77
  169. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -62
  170. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -0
  171. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +0 -2
  172. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -18
  173. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -62
  174. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/bdd_errors.txt +0 -1
  175. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +0 -0
  176. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -69
  177. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +0 -2
  178. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +0 -16
  179. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -77
  180. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -62
  181. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/bdd_errors.txt +0 -1
  182. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/lint_errors.txt +0 -0
  183. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +0 -700
  184. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/message.txt +0 -2
  185. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +0 -16
  186. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +0 -164
  187. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +0 -138
  188. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/lint_errors.txt +0 -21
  189. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +0 -7
  190. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/message.txt +0 -2
  191. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/prompt.txt +0 -18
  192. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +0 -63
  193. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/bdd_errors.txt +0 -1
  194. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/lint_errors.txt +0 -20
  195. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +0 -31
  196. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/message.txt +0 -2
  197. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/prompt.txt +0 -16
  198. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +0 -134
  199. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +0 -76
  200. package/testeranto/reports/allTests/summary.json +0 -79
  201. package/testeranto/reportsnode_build_errors +0 -20
  202. package/testeranto/reportspure_build_errors +0 -343
  203. package/testeranto/reportsweb_build_errors +0 -25
@@ -14,53 +14,245 @@ const baseProxy = function (pm, mappings) {
14
14
  },
15
15
  });
16
16
  };
17
- export const butThenProxy = (pm, filepath) => {
17
+ export const butThenProxy = (pm, filepath, addArtifact) => {
18
18
  return baseProxy(pm, [
19
19
  [
20
20
  "screencast",
21
21
  (opts, p) => {
22
- var _a;
23
22
  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
- }
23
+ addArtifact(path);
24
+ // console.log(
25
+ // `[ARTIFACT] Preparing to add to ${step.constructor.name}:`,
26
+ // path
27
+ // );
28
+ // try {
29
+ // console.log(
30
+ // `[ARTIFACT] Successfully added to ${step.constructor.name}`
31
+ // );
32
+ // console.log(`[ARTIFACT] Current artifacts:`, JSON.stringify(step.artifacts));
33
+ // } catch (e) {
34
+ // console.error(`[ARTIFACT] Failed to add ${path}:`, e);
35
+ // throw e;
36
+ // }
31
37
  return [
32
38
  Object.assign(Object.assign({}, opts), { path }),
33
39
  p,
34
40
  ];
35
41
  },
36
42
  ],
37
- ["createWriteStream", (fp) => {
38
- var _a;
43
+ [
44
+ "createWriteStream",
45
+ (fp) => {
39
46
  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
+ addArtifact(path);
47
48
  return [path];
48
- }],
49
+ },
50
+ ],
49
51
  [
50
52
  "writeFileSync",
51
53
  (fp, contents) => {
52
- var _a, _b;
53
54
  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
+ addArtifact(path);
55
56
  return [path, contents];
56
57
  },
57
58
  ],
58
59
  [
59
60
  "customScreenShot",
60
61
  (opts, p) => {
61
- var _a, _b;
62
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);
63
+ addArtifact(path);
64
+ return [
65
+ Object.assign(Object.assign({}, opts), { path }),
66
+ p,
67
+ ];
68
+ },
69
+ ],
70
+ ]);
71
+ };
72
+ export const andWhenProxy = (pm, filepath, addArtifact) => {
73
+ return baseProxy(pm, [
74
+ [
75
+ "screencast",
76
+ (opts, p) => {
77
+ const path = `${filepath}/andWhen/${opts.path}`;
78
+ addArtifact(path);
79
+ return [
80
+ Object.assign(Object.assign({}, opts), { path }),
81
+ p,
82
+ ];
83
+ },
84
+ ],
85
+ [
86
+ "createWriteStream",
87
+ (fp) => {
88
+ const path = `${filepath}/andWhen/${fp}`;
89
+ addArtifact(path);
90
+ return [path];
91
+ },
92
+ ],
93
+ [
94
+ "writeFileSync",
95
+ (fp, contents) => {
96
+ const path = `${filepath}/andWhen/${fp}`;
97
+ addArtifact(path);
98
+ return [path, contents];
99
+ },
100
+ ],
101
+ [
102
+ "customScreenShot",
103
+ (opts, p) => {
104
+ const path = `${filepath}/andWhen/${opts.path}`;
105
+ // console.log("STEP2", JSON.stringify(step));
106
+ addArtifact(path);
107
+ return [
108
+ Object.assign(Object.assign({}, opts), { path }),
109
+ p,
110
+ ];
111
+ },
112
+ ],
113
+ ]);
114
+ };
115
+ export const afterEachProxy = (pm, suite, given, addArtifact) => {
116
+ return baseProxy(pm, [
117
+ [
118
+ "screencast",
119
+ (opts, p) => {
120
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
121
+ addArtifact(path);
122
+ return [
123
+ Object.assign(Object.assign({}, opts), { path }),
124
+ p,
125
+ ];
126
+ },
127
+ ],
128
+ [
129
+ "createWriteStream",
130
+ (fp) => {
131
+ const path = `suite-${suite}/afterEach/${fp}`;
132
+ addArtifact(path);
133
+ return [path];
134
+ },
135
+ ],
136
+ [
137
+ "writeFileSync",
138
+ (fp, contents) => {
139
+ const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
140
+ addArtifact(path);
141
+ return [path, contents];
142
+ },
143
+ ],
144
+ [
145
+ "customScreenShot",
146
+ (opts, p) => {
147
+ const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
148
+ addArtifact(path);
149
+ // console.log("STEP3", JSON.stringify(step));
150
+ return [
151
+ Object.assign(Object.assign({}, opts), { path }),
152
+ p,
153
+ ];
154
+ },
155
+ ],
156
+ ]);
157
+ };
158
+ export const beforeEachProxy = (pm, suite, addArtifact) => {
159
+ return baseProxy(pm, [
160
+ [
161
+ "screencast",
162
+ (opts, p) => {
163
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
164
+ addArtifact(path);
165
+ return [
166
+ Object.assign(Object.assign({}, opts), { path }),
167
+ p,
168
+ ];
169
+ },
170
+ ],
171
+ [
172
+ "writeFileSync",
173
+ (fp, contents) => {
174
+ const path = `suite-${suite}/beforeEach/${fp}`;
175
+ addArtifact(path);
176
+ return [path, contents];
177
+ },
178
+ ],
179
+ [
180
+ "customScreenShot",
181
+ (opts, p) => {
182
+ const path = `suite-${suite}/beforeEach/${opts.path}`;
183
+ addArtifact(path);
184
+ return [
185
+ Object.assign(Object.assign({}, opts), { path }),
186
+ p,
187
+ ];
188
+ },
189
+ ],
190
+ [
191
+ "createWriteStream",
192
+ (fp) => {
193
+ const path = `suite-${suite}/beforeEach/${fp}`;
194
+ addArtifact(path);
195
+ return [path];
196
+ },
197
+ ],
198
+ ]);
199
+ };
200
+ export const beforeAllProxy = (pm, suite, addArtifact) => {
201
+ return baseProxy(pm, [
202
+ [
203
+ "writeFileSync",
204
+ (fp, contents) => {
205
+ const path = `suite-${suite}/beforeAll/${fp}`;
206
+ addArtifact(path);
207
+ return [path, contents];
208
+ },
209
+ ],
210
+ [
211
+ "customScreenShot",
212
+ (opts, p) => {
213
+ const path = `suite-${suite}/beforeAll/${opts.path}`;
214
+ addArtifact(path);
215
+ return [
216
+ Object.assign(Object.assign({}, opts), { path }),
217
+ p,
218
+ ];
219
+ },
220
+ ],
221
+ [
222
+ "createWriteStream",
223
+ (fp) => {
224
+ const path = `suite-${suite}/beforeAll/${fp}`;
225
+ addArtifact(path);
226
+ return [path];
227
+ },
228
+ ],
229
+ ]);
230
+ };
231
+ export const afterAllProxy = (pm, suite, addArtifact) => {
232
+ return baseProxy(pm, [
233
+ [
234
+ "createWriteStream",
235
+ (fp) => {
236
+ const path = `suite-${suite}/afterAll/${fp}`;
237
+ addArtifact(path);
238
+ return [path];
239
+ },
240
+ ],
241
+ [
242
+ "writeFileSync",
243
+ (fp, contents) => {
244
+ const path = `suite-${suite}/afterAll/${fp}`;
245
+ console.log("MARK10");
246
+ addArtifact(path);
247
+ return [path, contents];
248
+ },
249
+ ],
250
+ [
251
+ "customScreenShot",
252
+ (opts, p) => {
253
+ const path = `suite-${suite}/afterAll/${opts.path}`;
254
+ addArtifact(path);
255
+ console.log("MARK9");
64
256
  return [
65
257
  Object.assign(Object.assign({}, opts), { path }),
66
258
  p,
@@ -69,181 +261,3 @@ export const butThenProxy = (pm, filepath) => {
69
261
  ],
70
262
  ]);
71
263
  };
72
- export const andWhenProxy = (pm, filepath) => baseProxy(pm, [
73
- [
74
- "screencast",
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
- },
84
- ],
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
- }],
97
- [
98
- "customScreenShot",
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
- },
108
- ],
109
- ]);
110
- export const afterEachProxy = (pm, suite, given) => baseProxy(pm, [
111
- [
112
- "screencast",
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
- },
122
- ],
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
- }],
129
- [
130
- "writeFileSync",
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
- },
137
- ],
138
- [
139
- "customScreenShot",
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
- },
149
- ],
150
- ]);
151
- export const beforeEachProxy = (pm, suite) => baseProxy(pm, [
152
- [
153
- "screencast",
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
- },
163
- ],
164
- [
165
- "writeFileSync",
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
- },
172
- ],
173
- [
174
- "customScreenShot",
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
- },
184
- ],
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
- }],
191
- ]);
192
- export const beforeAllProxy = (pm, suite) => baseProxy(pm, [
193
- [
194
- "writeFileSync",
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
- },
201
- ],
202
- [
203
- "customScreenShot",
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
- },
213
- ],
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
- }],
220
- ]);
221
- export const afterAllProxy = (pm, suite) => baseProxy(pm, [
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
- }],
228
- [
229
- "writeFileSync",
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
- },
236
- ],
237
- [
238
- "customScreenShot",
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
- },
248
- ],
249
- ]);
@@ -15,11 +15,11 @@ export const testAdapter = {
15
15
  // };
16
16
  },
17
17
  andWhen: async (store, whenCB, testResource, pm) => {
18
- const proxiedPM = andWhenProxy(pm, "some/path");
18
+ const proxiedPM = andWhenProxy(pm, "some/path", store);
19
19
  return whenCB(store, proxiedPM);
20
20
  },
21
21
  butThen: async (store, thenCB, testResource, pm) => {
22
- const proxiedPM = butThenProxy(pm, "some/path");
22
+ const proxiedPM = butThenProxy(pm, "some/path", store);
23
23
  return thenCB(store, proxiedPM);
24
24
  },
25
25
  afterEach: async (store, key, pm) => store,
@@ -14,7 +14,7 @@ export const implementation = {
14
14
  var _a, _b, _c, _d, _e, _f, _g, _h;
15
15
  const mockPm = new MockPMBase();
16
16
  const filepath = "test/path";
17
- const proxiedPm = store.butThenProxy(mockPm, filepath);
17
+ const rewritePath = createPathRewriter(`${filepath}/butThen`);
18
18
  let actualPath;
19
19
  let actualContent;
20
20
  try {
@@ -1,6 +1,22 @@
1
+ // TODO- this config file is horrible. I need to redo how config files are handled.
1
2
  const config = {
2
3
  projects: {
3
- allTests: {
4
+ // staticSite: {
5
+ // tests: [["src/ReportServer.test.ts/index.ts", "node", { ports: 1 }, []]],
6
+ // clearScreen: false,
7
+ // debugger: false,
8
+ // externals: [],
9
+ // featureIngestor: function (s: string): Promise<string> {
10
+ // throw new Error("Function not implemented.");
11
+ // },
12
+ // importPlugins: [],
13
+ // minify: false,
14
+ // nodePlugins: [],
15
+ // ports: ["3334"],
16
+ // src: "",
17
+ // webPlugins: [],
18
+ // },
19
+ core: {
4
20
  tests: [
5
21
  [
6
22
  "src/components/pure/ProjectPageView.test/index.ts",
@@ -8,36 +24,36 @@ const config = {
8
24
  { ports: 0 },
9
25
  [],
10
26
  ],
11
- ["src/lib/BaseSuite.test/node.test.ts", "node", { ports: 0 }, []],
12
- ["src/lib/BaseSuite.test/pure.test.ts", "pure", { ports: 0 }, []],
13
- ["src/lib/BaseSuite.test/web.test.ts", "web", { ports: 0 }, []],
14
- ["src/Pure.test.ts", "pure", { ports: 0 }, []],
15
- ["src/lib/pmProxy.test/index.ts", "node", { ports: 0 }, []],
16
- ["src/lib/core.test/core.test.ts", "node", { ports: 0 }, []],
17
- [
18
- "src/lib/classBuilder.test/classBuilder.test.ts",
19
- "node",
20
- { ports: 0 },
21
- [],
22
- ],
23
- [
24
- "src/lib/baseBuilder.test/baseBuilder.test.node.ts",
25
- "node",
26
- { ports: 0 },
27
- [],
28
- ],
29
- [
30
- "src/lib/baseBuilder.test/baseBuilder.test.pure.ts",
31
- "pure",
32
- { ports: 0 },
33
- [],
34
- ],
35
- [
36
- "src/lib/baseBuilder.test/baseBuilder.test.web.ts",
37
- "web",
38
- { ports: 0 },
39
- [],
40
- ],
27
+ // ["src/lib/BaseSuite.test/node.test.ts", "node", { ports: 0 }, []],
28
+ // ["src/lib/BaseSuite.test/pure.test.ts", "pure", { ports: 0 }, []],
29
+ // ["src/lib/BaseSuite.test/web.test.ts", "web", { ports: 0 }, []],
30
+ // ["src/Pure.test.ts", "pure", { ports: 0 }, []],
31
+ // ["src/lib/pmProxy.test/index.ts", "node", { ports: 0 }, []],
32
+ // ["src/lib/core.test/core.test.ts", "node", { ports: 0 }, []],
33
+ // [
34
+ // "src/lib/classBuilder.test/classBuilder.test.ts",
35
+ // "node",
36
+ // { ports: 0 },
37
+ // [],
38
+ // ],
39
+ // [
40
+ // "src/lib/baseBuilder.test/baseBuilder.test.node.ts",
41
+ // "node",
42
+ // { ports: 0 },
43
+ // [],
44
+ // ],
45
+ // [
46
+ // "src/lib/baseBuilder.test/baseBuilder.test.pure.ts",
47
+ // "pure",
48
+ // { ports: 0 },
49
+ // [],
50
+ // ],
51
+ // [
52
+ // "src/lib/baseBuilder.test/baseBuilder.test.web.ts",
53
+ // "web",
54
+ // { ports: 0 },
55
+ // [],
56
+ // ],
41
57
  // ["src/mothership/test.ts", "node", { ports: 0 }, []],
42
58
  // ["./src/lib/abstractBase/index.ts", "node", { ports: 0 }, []],
43
59
  // [
@@ -68,6 +84,5 @@ const config = {
68
84
  webPlugins: [],
69
85
  },
70
86
  },
71
- reportDomain: "https://adamwong246.github.io/testeranto",
72
87
  };
73
88
  export default config;