testeranto 0.173.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.
- package/dist/common/src/PM/base.js +5 -5
- package/dist/common/src/PM/main.js +48 -52
- package/dist/common/src/PM/node.js +4 -1
- package/dist/common/src/PM/pure.js +4 -1
- package/dist/common/src/PM/web.js +4 -1
- package/dist/common/src/Pure.js +0 -4
- package/dist/common/src/Pure.test.js +1 -1
- package/dist/common/src/ReportServerLib.js +11 -5
- package/dist/common/src/esbuildConfigs/node.js +1 -3
- package/dist/common/src/lib/BaseSuite.js +13 -11
- package/dist/common/src/lib/abstractBase.js +39 -42
- package/dist/common/src/lib/basebuilder.js +5 -0
- package/dist/common/src/lib/core.js +1 -0
- package/dist/common/src/lib/pmProxy.js +210 -100
- package/dist/common/src/lib/pmProxy.test/adapter.js +2 -2
- package/dist/common/src/lib/pmProxy.test/implementation.js +1 -1
- package/dist/common/testeranto.config.js +39 -39
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/PM/base.js +5 -5
- package/dist/module/src/PM/main.js +13 -17
- package/dist/module/src/PM/node.js +4 -1
- package/dist/module/src/PM/pure.js +4 -1
- package/dist/module/src/PM/web.js +4 -1
- package/dist/module/src/Pure.js +0 -4
- package/dist/module/src/Pure.test.js +1 -1
- package/dist/module/src/ReportServerLib.js +11 -5
- package/dist/module/src/esbuildConfigs/node.js +1 -3
- package/dist/module/src/lib/BaseSuite.js +13 -11
- package/dist/module/src/lib/abstractBase.js +39 -42
- package/dist/module/src/lib/basebuilder.js +5 -0
- package/dist/module/src/lib/core.js +1 -0
- package/dist/module/src/lib/pmProxy.js +210 -100
- package/dist/module/src/lib/pmProxy.test/adapter.js +2 -2
- package/dist/module/src/lib/pmProxy.test/implementation.js +1 -1
- package/dist/module/testeranto.config.js +39 -39
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/ReportServer.mjs +10 -4
- package/dist/prebuild/build.mjs +1 -1
- package/dist/prebuild/run.mjs +19 -22
- package/dist/types/src/PM/base.d.ts +1 -1
- package/dist/types/src/PM/node.d.ts +1 -1
- package/dist/types/src/PM/pure.d.ts +1 -1
- package/dist/types/src/PM/web.d.ts +1 -1
- package/dist/types/src/ReportServerLib.d.ts +1 -2
- package/dist/types/src/lib/BaseSuite.d.ts +2 -0
- package/dist/types/src/lib/abstractBase.d.ts +4 -6
- package/dist/types/src/lib/pmProxy.d.ts +3 -3
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/PM/base.ts +6 -9
- package/src/PM/main.ts +17 -20
- package/src/PM/node.ts +6 -1
- package/src/PM/pure.ts +6 -1
- package/src/PM/web.ts +5 -1
- package/src/Pure.test.ts +6 -6
- package/src/Pure.ts +0 -8
- package/src/ReportServerLib.ts +10 -7
- package/src/esbuildConfigs/node.ts +1 -1
- package/src/lib/BaseSuite.ts +16 -21
- package/src/lib/abstractBase.ts +57 -49
- package/src/lib/basebuilder.ts +6 -0
- package/src/lib/core.ts +1 -0
- package/src/lib/pmProxy.test/adapter.ts +2 -2
- package/src/lib/pmProxy.test/implementation.ts +3 -3
- package/src/lib/pmProxy.test/types.ts +0 -2
- package/src/lib/pmProxy.ts +224 -92
- package/testeranto/bundles/node/core/metafile.json +2 -480
- package/testeranto/bundles/pure/core/metafile.json +3 -621
- package/testeranto/bundles/web/core/metafile.json +14384 -78
- package/testeranto/bundles/web/core/src/{lib/baseBuilder.test/baseBuilder.test.web.html → components/pure/ProjectPageView.test/index.html} +2 -2
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +39991 -0
- package/testeranto/projects.json +0 -1
- package/testeranto/reports/core/config.json +5 -5
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +18 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/logs.txt +59 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +27 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/suite-0/given-basicRender/then-0/butThen/happyPath.png +0 -0
- package/testeranto/reports/{staticSite/src/ReportServer.test.ts/index/node → core/src/components/pure/ProjectPageView.test/index/web}/type_errors.txt +20 -22
- package/testeranto/reports/core/summary.json +5 -19
- package/testeranto.config.ts +39 -39
- package/tsc.log +78 -92
- package/testeranto/bundles/node/allTests/metafile.json +0 -486
- package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -1182
- package/testeranto/bundles/node/core/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -1182
- package/testeranto/bundles/node/staticSite/metafile.json +0 -593
- package/testeranto/bundles/node/staticSite/src/ReportServer.test.ts/index.mjs +0 -1594
- package/testeranto/bundles/pure/allTests/metafile.json +0 -626
- package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -1094
- package/testeranto/bundles/pure/core/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -1094
- package/testeranto/bundles/pure/staticSite/metafile.json +0 -8
- package/testeranto/bundles/web/allTests/metafile.json +0 -780
- package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.html +0 -19
- package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +0 -1092
- package/testeranto/bundles/web/core/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +0 -1092
- package/testeranto/bundles/web/staticSite/metafile.json +0 -8
- package/testeranto/reports/allTests/config.json +0 -40
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -2
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -33
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -26
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -69
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -74
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -2
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -26
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -74
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +0 -2
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -63
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +0 -26
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -69
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -74
- package/testeranto/reports/allTests/summary.json +0 -23
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/bdd_errors.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +0 -2
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -32
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +0 -2
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +0 -26
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -69
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -74
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -2
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +0 -2
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +0 -26
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -74
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/bdd_errors.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +0 -2
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -61
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +0 -2
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +0 -26
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -69
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -74
- package/testeranto/reports/staticSite/config.json +0 -24
- package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/lint_errors.txt +0 -5
- package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/logs.txt +0 -44
- package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/message.txt +0 -2
- package/testeranto/reports/staticSite/src/ReportServer.test.ts/index/node/prompt.txt +0 -23
- package/testeranto/reports/staticSite/summary.json +0 -9
- package/testeranto/reportsnode_build_errors +0 -17
package/src/lib/pmProxy.ts
CHANGED
|
@@ -8,9 +8,14 @@ export type IProxyBase = (
|
|
|
8
8
|
mappings: [string, (...x: any) => any][]
|
|
9
9
|
) => IPM;
|
|
10
10
|
|
|
11
|
-
export type IProxy = (pm: IPM, filepath: string) => IPM;
|
|
12
|
-
export type IProxyAfterEach = (
|
|
13
|
-
|
|
11
|
+
export type IProxy = (pm: IPM, filepath: string, step: any) => IPM;
|
|
12
|
+
export type IProxyAfterEach = (
|
|
13
|
+
pm: IPM,
|
|
14
|
+
suite: string,
|
|
15
|
+
given: string,
|
|
16
|
+
step: any
|
|
17
|
+
) => IPM;
|
|
18
|
+
export type IProxyBeforeEach = (pm: IPM, suite: string, step: any) => IPM;
|
|
14
19
|
|
|
15
20
|
export type IProxiedFunctions =
|
|
16
21
|
| "screencast"
|
|
@@ -38,13 +43,31 @@ const baseProxy: IProxyBase = function (
|
|
|
38
43
|
});
|
|
39
44
|
};
|
|
40
45
|
|
|
41
|
-
export const butThenProxy: IProxy = (
|
|
46
|
+
export const butThenProxy: IProxy = (
|
|
47
|
+
pm: IPM,
|
|
48
|
+
filepath: string,
|
|
49
|
+
addArtifact
|
|
50
|
+
) => {
|
|
42
51
|
return baseProxy(pm, [
|
|
43
52
|
[
|
|
44
53
|
"screencast",
|
|
45
54
|
(opts, p) => {
|
|
46
55
|
const path = `${filepath}/butThen/${opts.path}`;
|
|
47
|
-
(
|
|
56
|
+
addArtifact(path);
|
|
57
|
+
// console.log(
|
|
58
|
+
// `[ARTIFACT] Preparing to add to ${step.constructor.name}:`,
|
|
59
|
+
// path
|
|
60
|
+
// );
|
|
61
|
+
// try {
|
|
62
|
+
|
|
63
|
+
// console.log(
|
|
64
|
+
// `[ARTIFACT] Successfully added to ${step.constructor.name}`
|
|
65
|
+
// );
|
|
66
|
+
// console.log(`[ARTIFACT] Current artifacts:`, JSON.stringify(step.artifacts));
|
|
67
|
+
// } catch (e) {
|
|
68
|
+
// console.error(`[ARTIFACT] Failed to add ${path}:`, e);
|
|
69
|
+
// throw e;
|
|
70
|
+
// }
|
|
48
71
|
return [
|
|
49
72
|
{
|
|
50
73
|
...opts,
|
|
@@ -54,30 +77,27 @@ export const butThenProxy: IProxy = (pm: IPM, filepath: string) => {
|
|
|
54
77
|
];
|
|
55
78
|
},
|
|
56
79
|
],
|
|
57
|
-
|
|
58
80
|
[
|
|
59
81
|
"createWriteStream",
|
|
60
82
|
(fp) => {
|
|
61
83
|
const path = `${filepath}/butThen/${fp}`;
|
|
62
|
-
(
|
|
84
|
+
addArtifact(path);
|
|
63
85
|
return [path];
|
|
64
86
|
},
|
|
65
87
|
],
|
|
66
|
-
|
|
67
88
|
[
|
|
68
89
|
"writeFileSync",
|
|
69
90
|
(fp, contents) => {
|
|
70
91
|
const path = `${filepath}/butThen/${fp}`;
|
|
71
|
-
(
|
|
92
|
+
addArtifact(path);
|
|
72
93
|
return [path, contents];
|
|
73
94
|
},
|
|
74
95
|
],
|
|
75
|
-
|
|
76
96
|
[
|
|
77
97
|
"customScreenShot",
|
|
78
98
|
(opts, p) => {
|
|
79
99
|
const path = `${filepath}/butThen/${opts.path}`;
|
|
80
|
-
(
|
|
100
|
+
addArtifact(path);
|
|
81
101
|
return [
|
|
82
102
|
{
|
|
83
103
|
...opts,
|
|
@@ -90,146 +110,258 @@ export const butThenProxy: IProxy = (pm: IPM, filepath: string) => {
|
|
|
90
110
|
]);
|
|
91
111
|
};
|
|
92
112
|
|
|
93
|
-
export const andWhenProxy: IProxy = (
|
|
94
|
-
|
|
113
|
+
export const andWhenProxy: IProxy = (
|
|
114
|
+
pm: IPM,
|
|
115
|
+
filepath: string,
|
|
116
|
+
addArtifact
|
|
117
|
+
) => {
|
|
118
|
+
return baseProxy(pm, [
|
|
95
119
|
[
|
|
96
120
|
"screencast",
|
|
97
|
-
(opts, p) =>
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
121
|
+
(opts, p) => {
|
|
122
|
+
const path = `${filepath}/andWhen/${opts.path}`;
|
|
123
|
+
addArtifact(path);
|
|
124
|
+
return [
|
|
125
|
+
{
|
|
126
|
+
...opts,
|
|
127
|
+
path,
|
|
128
|
+
},
|
|
129
|
+
p,
|
|
130
|
+
];
|
|
131
|
+
},
|
|
104
132
|
],
|
|
105
133
|
|
|
106
|
-
[
|
|
134
|
+
[
|
|
135
|
+
"createWriteStream",
|
|
136
|
+
(fp) => {
|
|
137
|
+
const path = `${filepath}/andWhen/${fp}`;
|
|
138
|
+
addArtifact(path);
|
|
139
|
+
return [path];
|
|
140
|
+
},
|
|
141
|
+
],
|
|
107
142
|
|
|
108
|
-
[
|
|
143
|
+
[
|
|
144
|
+
"writeFileSync",
|
|
145
|
+
(fp, contents) => {
|
|
146
|
+
const path = `${filepath}/andWhen/${fp}`;
|
|
147
|
+
addArtifact(path);
|
|
148
|
+
return [path, contents];
|
|
149
|
+
},
|
|
150
|
+
],
|
|
109
151
|
|
|
110
152
|
[
|
|
111
153
|
"customScreenShot",
|
|
112
|
-
(opts, p) =>
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
154
|
+
(opts, p) => {
|
|
155
|
+
const path = `${filepath}/andWhen/${opts.path}`;
|
|
156
|
+
// console.log("STEP2", JSON.stringify(step));
|
|
157
|
+
addArtifact(path);
|
|
158
|
+
return [
|
|
159
|
+
{
|
|
160
|
+
...opts,
|
|
161
|
+
path,
|
|
162
|
+
},
|
|
163
|
+
p,
|
|
164
|
+
];
|
|
165
|
+
},
|
|
119
166
|
],
|
|
120
167
|
]);
|
|
168
|
+
};
|
|
121
169
|
|
|
122
170
|
export const afterEachProxy: IProxyAfterEach = (
|
|
123
171
|
pm: IPM,
|
|
124
172
|
suite: string,
|
|
125
|
-
given: string
|
|
126
|
-
|
|
127
|
-
|
|
173
|
+
given: string,
|
|
174
|
+
addArtifact
|
|
175
|
+
): IPM => {
|
|
176
|
+
return baseProxy(pm, [
|
|
128
177
|
[
|
|
129
178
|
"screencast",
|
|
130
|
-
(opts, p) =>
|
|
131
|
-
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
179
|
+
(opts, p) => {
|
|
180
|
+
const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
|
|
181
|
+
addArtifact(path);
|
|
182
|
+
return [
|
|
183
|
+
{
|
|
184
|
+
...opts,
|
|
185
|
+
path,
|
|
186
|
+
},
|
|
187
|
+
p,
|
|
188
|
+
];
|
|
189
|
+
},
|
|
137
190
|
],
|
|
138
191
|
|
|
139
|
-
[
|
|
192
|
+
[
|
|
193
|
+
"createWriteStream",
|
|
194
|
+
(fp) => {
|
|
195
|
+
const path = `suite-${suite}/afterEach/${fp}`;
|
|
196
|
+
addArtifact(path);
|
|
197
|
+
return [path];
|
|
198
|
+
},
|
|
199
|
+
],
|
|
140
200
|
[
|
|
141
201
|
"writeFileSync",
|
|
142
|
-
(fp, contents) =>
|
|
143
|
-
`suite-${suite}/given-${given}/afterEach/${fp}
|
|
144
|
-
|
|
145
|
-
|
|
202
|
+
(fp, contents) => {
|
|
203
|
+
const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
|
|
204
|
+
addArtifact(path);
|
|
205
|
+
return [path, contents];
|
|
206
|
+
},
|
|
146
207
|
],
|
|
147
208
|
|
|
148
209
|
[
|
|
149
210
|
"customScreenShot",
|
|
150
|
-
(opts, p) =>
|
|
151
|
-
{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
211
|
+
(opts, p) => {
|
|
212
|
+
const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
|
|
213
|
+
addArtifact(path);
|
|
214
|
+
// console.log("STEP3", JSON.stringify(step));
|
|
215
|
+
return [
|
|
216
|
+
{
|
|
217
|
+
...opts,
|
|
218
|
+
path,
|
|
219
|
+
},
|
|
220
|
+
p,
|
|
221
|
+
];
|
|
222
|
+
},
|
|
157
223
|
],
|
|
158
224
|
]);
|
|
225
|
+
};
|
|
159
226
|
|
|
160
227
|
export const beforeEachProxy: IProxyBeforeEach = (
|
|
161
228
|
pm: IPM,
|
|
162
|
-
suite: string
|
|
163
|
-
|
|
164
|
-
|
|
229
|
+
suite: string,
|
|
230
|
+
addArtifact
|
|
231
|
+
): IPM => {
|
|
232
|
+
return baseProxy(pm, [
|
|
165
233
|
[
|
|
166
234
|
"screencast",
|
|
167
|
-
(opts, p) =>
|
|
168
|
-
{
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
235
|
+
(opts, p) => {
|
|
236
|
+
const path = `suite-${suite}/beforeEach/${opts.path}`;
|
|
237
|
+
addArtifact(path);
|
|
238
|
+
|
|
239
|
+
return [
|
|
240
|
+
{
|
|
241
|
+
...opts,
|
|
242
|
+
path,
|
|
243
|
+
},
|
|
244
|
+
p,
|
|
245
|
+
];
|
|
246
|
+
},
|
|
174
247
|
],
|
|
175
248
|
|
|
176
249
|
[
|
|
177
250
|
"writeFileSync",
|
|
178
|
-
(fp, contents) =>
|
|
251
|
+
(fp, contents) => {
|
|
252
|
+
const path = `suite-${suite}/beforeEach/${fp}`;
|
|
253
|
+
addArtifact(path);
|
|
254
|
+
return [path, contents];
|
|
255
|
+
},
|
|
179
256
|
],
|
|
180
257
|
|
|
181
258
|
[
|
|
182
259
|
"customScreenShot",
|
|
183
|
-
(opts, p) =>
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
260
|
+
(opts, p) => {
|
|
261
|
+
const path = `suite-${suite}/beforeEach/${opts.path}`;
|
|
262
|
+
addArtifact(path);
|
|
263
|
+
return [
|
|
264
|
+
{
|
|
265
|
+
...opts,
|
|
266
|
+
path,
|
|
267
|
+
},
|
|
268
|
+
p,
|
|
269
|
+
];
|
|
270
|
+
},
|
|
190
271
|
],
|
|
191
272
|
|
|
192
|
-
[
|
|
273
|
+
[
|
|
274
|
+
"createWriteStream",
|
|
275
|
+
(fp) => {
|
|
276
|
+
const path = `suite-${suite}/beforeEach/${fp}`;
|
|
277
|
+
addArtifact(path);
|
|
278
|
+
return [path];
|
|
279
|
+
},
|
|
280
|
+
],
|
|
193
281
|
]);
|
|
282
|
+
};
|
|
194
283
|
|
|
195
|
-
export const beforeAllProxy: IProxy = (
|
|
196
|
-
|
|
284
|
+
export const beforeAllProxy: IProxy = (
|
|
285
|
+
pm: IPM,
|
|
286
|
+
suite: string,
|
|
287
|
+
addArtifact
|
|
288
|
+
): IPM => {
|
|
289
|
+
return baseProxy(pm, [
|
|
197
290
|
[
|
|
198
291
|
"writeFileSync",
|
|
199
|
-
(fp, contents) =>
|
|
292
|
+
(fp, contents) => {
|
|
293
|
+
const path = `suite-${suite}/beforeAll/${fp}`;
|
|
294
|
+
addArtifact(path);
|
|
295
|
+
|
|
296
|
+
return [path, contents];
|
|
297
|
+
},
|
|
200
298
|
],
|
|
201
299
|
|
|
202
300
|
[
|
|
203
301
|
"customScreenShot",
|
|
204
|
-
(opts, p) =>
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
302
|
+
(opts, p) => {
|
|
303
|
+
const path = `suite-${suite}/beforeAll/${opts.path}`;
|
|
304
|
+
addArtifact(path);
|
|
305
|
+
return [
|
|
306
|
+
{
|
|
307
|
+
...opts,
|
|
308
|
+
path,
|
|
309
|
+
},
|
|
310
|
+
p,
|
|
311
|
+
];
|
|
312
|
+
},
|
|
211
313
|
],
|
|
212
314
|
|
|
213
|
-
[
|
|
315
|
+
[
|
|
316
|
+
"createWriteStream",
|
|
317
|
+
(fp) => {
|
|
318
|
+
const path = `suite-${suite}/beforeAll/${fp}`;
|
|
319
|
+
addArtifact(path);
|
|
320
|
+
return [path];
|
|
321
|
+
},
|
|
322
|
+
],
|
|
214
323
|
]);
|
|
324
|
+
};
|
|
215
325
|
|
|
216
|
-
export const afterAllProxy: IProxy = (
|
|
217
|
-
|
|
218
|
-
|
|
326
|
+
export const afterAllProxy: IProxy = (
|
|
327
|
+
pm: IPM,
|
|
328
|
+
suite: string,
|
|
329
|
+
addArtifact
|
|
330
|
+
): IPM => {
|
|
331
|
+
return baseProxy(pm, [
|
|
332
|
+
[
|
|
333
|
+
"createWriteStream",
|
|
334
|
+
(fp) => {
|
|
335
|
+
const path = `suite-${suite}/afterAll/${fp}`;
|
|
336
|
+
addArtifact(path);
|
|
337
|
+
return [path];
|
|
338
|
+
},
|
|
339
|
+
],
|
|
219
340
|
|
|
220
341
|
[
|
|
221
342
|
"writeFileSync",
|
|
222
|
-
(fp, contents) =>
|
|
343
|
+
(fp, contents) => {
|
|
344
|
+
const path = `suite-${suite}/afterAll/${fp}`;
|
|
345
|
+
console.log("MARK10");
|
|
346
|
+
addArtifact(path);
|
|
347
|
+
return [path, contents];
|
|
348
|
+
},
|
|
223
349
|
],
|
|
224
350
|
|
|
225
351
|
[
|
|
226
352
|
"customScreenShot",
|
|
227
|
-
(opts, p) =>
|
|
228
|
-
{
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
353
|
+
(opts, p) => {
|
|
354
|
+
const path = `suite-${suite}/afterAll/${opts.path}`;
|
|
355
|
+
addArtifact(path);
|
|
356
|
+
console.log("MARK9");
|
|
357
|
+
return [
|
|
358
|
+
{
|
|
359
|
+
...opts,
|
|
360
|
+
path,
|
|
361
|
+
},
|
|
362
|
+
p,
|
|
363
|
+
];
|
|
364
|
+
},
|
|
234
365
|
],
|
|
235
366
|
]);
|
|
367
|
+
};
|