testeranto 0.90.0 → 0.94.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/Node.js +5 -3
- package/dist/common/src/PM/main.js +102 -92
- package/dist/common/src/Project.js +5 -3
- package/dist/common/src/Puppeteer.js +1 -3
- package/dist/common/src/SubPackages/puppeteer.js +1 -1
- package/dist/common/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/common/src/SubPackages/react/jsx/node.js +7 -2
- package/dist/common/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/common/src/Web.js +25 -21
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -2
- package/dist/common/src/lib/abstractBase.js +29 -184
- package/dist/common/src/lib/basebuilder.js +1 -11
- package/dist/common/src/lib/classBuilder.js +1 -1
- package/dist/common/src/lib/core.js +8 -28
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Node.js +5 -3
- package/dist/module/src/PM/main.js +102 -92
- package/dist/module/src/Project.js +5 -3
- package/dist/module/src/Puppeteer.js +1 -3
- package/dist/module/src/SubPackages/puppeteer.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/module/src/SubPackages/react/jsx/node.js +7 -2
- package/dist/module/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/module/src/Web.js +25 -21
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -2
- package/dist/module/src/lib/abstractBase.js +29 -184
- package/dist/module/src/lib/basebuilder.js +1 -11
- package/dist/module/src/lib/classBuilder.js +1 -1
- package/dist/module/src/lib/core.js +8 -28
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/build-tests.mjs +4 -3
- package/dist/prebuild/run-tests.mjs +30 -66
- package/dist/types/src/Node.d.ts +4 -1
- package/dist/types/src/PM/main.d.ts +2 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +1 -1
- package/dist/types/src/Web.d.ts +2 -2
- package/dist/types/src/lib/abstractBase.d.ts +6 -2
- package/dist/types/src/lib/core.d.ts +3 -3
- package/dist/types/src/lib/types.d.ts +5 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/Node.ts +6 -3
- package/src/PM/main.ts +121 -111
- package/src/Project.ts +6 -5
- package/src/Puppeteer.ts +1 -3
- package/src/SubPackages/puppeteer.ts +1 -1
- package/src/SubPackages/react/jsx/index.ts +15 -7
- package/src/SubPackages/react/jsx/node.ts +6 -5
- package/src/SubPackages/react-dom/component/web.ts +28 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +4 -11
- package/src/Web.ts +45 -23
- package/src/esbuildConfigs/inputFilesPlugin.ts +0 -3
- package/src/lib/abstractBase.ts +38 -188
- package/src/lib/basebuilder.ts +1 -12
- package/src/lib/classBuilder.ts +2 -1
- package/src/lib/core.ts +17 -29
- package/src/lib/types.ts +3 -1
|
@@ -44,11 +44,12 @@ class BaseSuite {
|
|
|
44
44
|
this.testResourceConfiguration = testResourceConfiguration;
|
|
45
45
|
tLog("test resources: ", JSON.stringify(testResourceConfiguration));
|
|
46
46
|
const suiteArtifactory = (fPath, value) => artifactory(`suite-${this.index}-${this.name}/${fPath}`, value);
|
|
47
|
-
console.log("\nSuite:", this.index, this.name);
|
|
47
|
+
// console.log("\nSuite:", this.index, this.name);
|
|
48
48
|
tLog("\nSuite:", this.index, this.name);
|
|
49
49
|
const sNdx = this.index;
|
|
50
50
|
const sName = this.name;
|
|
51
|
-
for (const [
|
|
51
|
+
for (const [gKey, g] of Object.entries(this.givens)) {
|
|
52
|
+
// console.log("gKey", gKey);
|
|
52
53
|
const beforeAllProxy = new Proxy(pm, {
|
|
53
54
|
get(target, prop, receiver) {
|
|
54
55
|
if (prop === "customScreenShot") {
|
|
@@ -59,65 +60,13 @@ class BaseSuite {
|
|
|
59
60
|
if (prop === "writeFileSync") {
|
|
60
61
|
return (fp, contents) => target[prop](`suite-${sNdx}/beforeAll/${fp}`, contents);
|
|
61
62
|
}
|
|
62
|
-
// if (prop === "browser") {
|
|
63
|
-
// return new Proxy(target[prop], {
|
|
64
|
-
// get(bTarget, bProp, bReceiver) {
|
|
65
|
-
// if (bProp === "pages") {
|
|
66
|
-
// return async () => {
|
|
67
|
-
// return bTarget.pages().then((pages) => {
|
|
68
|
-
// return pages.map((page) => {
|
|
69
|
-
// return new Proxy(page, {
|
|
70
|
-
// get(pTarget, pProp, pReciever) {
|
|
71
|
-
// if (pProp === "screenshot") {
|
|
72
|
-
// return async (x) => {
|
|
73
|
-
// return pm.customScreenShot(
|
|
74
|
-
// {
|
|
75
|
-
// ...x,
|
|
76
|
-
// path:
|
|
77
|
-
// `${testResourceConfiguration.fs}/suite-${sNdx}/beforeAll` +
|
|
78
|
-
// "/" +
|
|
79
|
-
// x.path,
|
|
80
|
-
// },
|
|
81
|
-
// page
|
|
82
|
-
// );
|
|
83
|
-
// // return await window["custom-screenshot"]({
|
|
84
|
-
// // ...x,
|
|
85
|
-
// // path:
|
|
86
|
-
// // `${testResourceConfiguration.fs}/suite-${sNdx}/afterAll` +
|
|
87
|
-
// // "/" +
|
|
88
|
-
// // x.path,
|
|
89
|
-
// // });
|
|
90
|
-
// };
|
|
91
|
-
// } else if (pProp === "mainFrame") {
|
|
92
|
-
// return () => pTarget[pProp]();
|
|
93
|
-
// } else if (pProp === "close") {
|
|
94
|
-
// return () => pTarget[pProp]();
|
|
95
|
-
// }
|
|
96
|
-
// // else if (pProp === "mainFrame") {
|
|
97
|
-
// // return () => target[pProp](...arguments);
|
|
98
|
-
// // }
|
|
99
|
-
// else {
|
|
100
|
-
// return Reflect.get(...arguments);
|
|
101
|
-
// }
|
|
102
|
-
// },
|
|
103
|
-
// });
|
|
104
|
-
// });
|
|
105
|
-
// });
|
|
106
|
-
// // return (await target.pages()).map((page) => {
|
|
107
|
-
// // return new Proxy(page, handler2);
|
|
108
|
-
// // });
|
|
109
|
-
// };
|
|
110
|
-
// }
|
|
111
|
-
// },
|
|
112
|
-
// });
|
|
113
|
-
// }
|
|
114
63
|
return Reflect.get(...arguments);
|
|
115
64
|
},
|
|
116
65
|
});
|
|
117
66
|
const subject = await this.setup(input, suiteArtifactory, testResourceConfiguration, beforeAllProxy);
|
|
118
|
-
const giver = this.givens[
|
|
67
|
+
const giver = this.givens[gKey];
|
|
119
68
|
try {
|
|
120
|
-
this.store = await giver.give(subject,
|
|
69
|
+
this.store = await giver.give(subject, gKey, testResourceConfiguration, this.assertThat, suiteArtifactory, tLog, pm, sNdx);
|
|
121
70
|
}
|
|
122
71
|
catch (e) {
|
|
123
72
|
console.error(e);
|
|
@@ -125,64 +74,6 @@ class BaseSuite {
|
|
|
125
74
|
// return this;
|
|
126
75
|
}
|
|
127
76
|
}
|
|
128
|
-
// const afterAllProxy = new Proxy(pm, {
|
|
129
|
-
// get(target, prop, receiver) {
|
|
130
|
-
// if (prop === "writeFileSync") {
|
|
131
|
-
// return (fp, contents) =>
|
|
132
|
-
// target[prop](`suite-${sNdx}/afterAll/${fp}`, contents);
|
|
133
|
-
// }
|
|
134
|
-
// if (prop === "browser") {
|
|
135
|
-
// return new Proxy(target[prop], {
|
|
136
|
-
// get(bTarget, bProp, bReceiver) {
|
|
137
|
-
// if (bProp === "pages") {
|
|
138
|
-
// return async () => {
|
|
139
|
-
// return bTarget.pages().then((pages) => {
|
|
140
|
-
// return pages.map((page) => {
|
|
141
|
-
// return new Proxy(page, {
|
|
142
|
-
// get(pTarget, pProp, pReciever) {
|
|
143
|
-
// if (pProp === "screenshot") {
|
|
144
|
-
// return async (x) => {
|
|
145
|
-
// return pm.customScreenShot({
|
|
146
|
-
// ...x,
|
|
147
|
-
// path:
|
|
148
|
-
// `${testResourceConfiguration.fs}/suite-${sNdx}/afterAll` +
|
|
149
|
-
// "/" +
|
|
150
|
-
// x.path,
|
|
151
|
-
// });
|
|
152
|
-
// // return await window["custom-screenshot"]({
|
|
153
|
-
// // ...x,
|
|
154
|
-
// // path:
|
|
155
|
-
// // `${testResourceConfiguration.fs}/suite-${sNdx}/afterAll` +
|
|
156
|
-
// // "/" +
|
|
157
|
-
// // x.path,
|
|
158
|
-
// // });
|
|
159
|
-
// };
|
|
160
|
-
// } else if (pProp === "mainFrame") {
|
|
161
|
-
// return () => pTarget[pProp]();
|
|
162
|
-
// } else if (pProp === "close") {
|
|
163
|
-
// return () => pTarget[pProp]();
|
|
164
|
-
// }
|
|
165
|
-
// // else if (pProp === "mainFrame") {
|
|
166
|
-
// // return () => target[pProp](...arguments);
|
|
167
|
-
// // }
|
|
168
|
-
// else {
|
|
169
|
-
// return Reflect.get(...arguments);
|
|
170
|
-
// }
|
|
171
|
-
// },
|
|
172
|
-
// });
|
|
173
|
-
// });
|
|
174
|
-
// });
|
|
175
|
-
// // return (await target.pages()).map((page) => {
|
|
176
|
-
// // return new Proxy(page, handler2);
|
|
177
|
-
// // });
|
|
178
|
-
// };
|
|
179
|
-
// }
|
|
180
|
-
// },
|
|
181
|
-
// });
|
|
182
|
-
// }
|
|
183
|
-
// return Reflect.get(...arguments);
|
|
184
|
-
// },
|
|
185
|
-
// });
|
|
186
77
|
try {
|
|
187
78
|
this.afterAll(this.store, artifactory,
|
|
188
79
|
// afterAllProxy
|
|
@@ -221,7 +112,9 @@ class BaseSuite {
|
|
|
221
112
|
}
|
|
222
113
|
exports.BaseSuite = BaseSuite;
|
|
223
114
|
class BaseGiven {
|
|
224
|
-
constructor(name, features, whens, thens, givenCB, initialValues
|
|
115
|
+
constructor(name, features, whens, thens, givenCB, initialValues
|
|
116
|
+
// key: string
|
|
117
|
+
) {
|
|
225
118
|
this.name = name;
|
|
226
119
|
this.features = features;
|
|
227
120
|
this.whens = whens;
|
|
@@ -229,11 +122,15 @@ class BaseGiven {
|
|
|
229
122
|
this.givenCB = givenCB;
|
|
230
123
|
this.initialValues = initialValues;
|
|
231
124
|
}
|
|
232
|
-
beforeAll(store,
|
|
125
|
+
beforeAll(store,
|
|
126
|
+
// artifactory: ITestArtifactory
|
|
127
|
+
// subject,
|
|
128
|
+
initializer, artifactory, testResource, initialValues, pm) {
|
|
233
129
|
return store;
|
|
234
130
|
}
|
|
235
131
|
toObj() {
|
|
236
132
|
return {
|
|
133
|
+
key: this.key,
|
|
237
134
|
name: this.name,
|
|
238
135
|
whens: this.whens.map((w) => w.toObj()),
|
|
239
136
|
thens: this.thens.map((t) => t.toObj()),
|
|
@@ -246,30 +143,34 @@ class BaseGiven {
|
|
|
246
143
|
return store;
|
|
247
144
|
}
|
|
248
145
|
async give(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm, suiteNdx) {
|
|
146
|
+
this.key = key;
|
|
147
|
+
tLog(`\n ${this.key}`);
|
|
249
148
|
tLog(`\n Given: ${this.name}`);
|
|
250
|
-
const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
|
|
149
|
+
const givenArtifactory = (fPath, value) => artifactory(`given-${this.key}/${fPath}`, value);
|
|
251
150
|
try {
|
|
252
151
|
// tLog(`\n Given this.store`, this.store);
|
|
253
152
|
const beforeEachProxy = new Proxy(pm, {
|
|
254
153
|
get(target, prop, receiver) {
|
|
255
154
|
if (prop === "writeFileSync") {
|
|
256
|
-
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/when/beforeEach/${fp}`, contents);
|
|
155
|
+
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${this.key}/when/beforeEach/${fp}`, contents);
|
|
257
156
|
}
|
|
258
157
|
if (prop === "customScreenShot") {
|
|
259
|
-
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), {
|
|
260
|
-
// path: `${filepath}/${opts.path}`,
|
|
261
|
-
path: `suite-${suiteNdx}/given-${key}/when/beforeEach/${opts.path}` }));
|
|
158
|
+
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${this.key}/when/beforeEach/${opts.path}` }));
|
|
262
159
|
}
|
|
263
160
|
return Reflect.get(...arguments);
|
|
264
161
|
},
|
|
265
162
|
});
|
|
266
|
-
this.
|
|
267
|
-
|
|
163
|
+
this.uberCatcher((e) => {
|
|
164
|
+
console.error(e);
|
|
165
|
+
this.error = e.error;
|
|
166
|
+
tLog(e.stack);
|
|
167
|
+
});
|
|
168
|
+
this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues, beforeEachProxy);
|
|
268
169
|
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
269
|
-
await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/when/${whenNdx}`);
|
|
170
|
+
await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${this.key}/when/${whenNdx}`);
|
|
270
171
|
}
|
|
271
172
|
for (const [thenNdx, thenStep] of this.thens.entries()) {
|
|
272
|
-
const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
|
|
173
|
+
const t = await thenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${this.key}/then-${thenNdx}`);
|
|
273
174
|
tester(t);
|
|
274
175
|
}
|
|
275
176
|
}
|
|
@@ -285,15 +186,15 @@ class BaseGiven {
|
|
|
285
186
|
const afterEachProxy = new Proxy(pm, {
|
|
286
187
|
get(target, prop, receiver) {
|
|
287
188
|
if (prop === "customScreenShot") {
|
|
288
|
-
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${key}/afterEach/${opts.path}` }));
|
|
189
|
+
return (opts) => target.customScreenShot(Object.assign(Object.assign({}, opts), { path: `suite-${suiteNdx}/given-${this.key}/afterEach/${opts.path}` }));
|
|
289
190
|
}
|
|
290
191
|
if (prop === "writeFileSync") {
|
|
291
|
-
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${key}/afterEach/${fp}`, contents);
|
|
192
|
+
return (fp, contents) => target[prop](`suite-${suiteNdx}/given-${this.key}/afterEach/${fp}`, contents);
|
|
292
193
|
}
|
|
293
194
|
return Reflect.get(...arguments);
|
|
294
195
|
},
|
|
295
196
|
});
|
|
296
|
-
await this.afterEach(this.store, key, givenArtifactory,
|
|
197
|
+
await this.afterEach(this.store, this.key, givenArtifactory,
|
|
297
198
|
// pm
|
|
298
199
|
afterEachProxy);
|
|
299
200
|
}
|
|
@@ -451,62 +352,6 @@ class BaseThen {
|
|
|
451
352
|
if (prop === "writeFileSync") {
|
|
452
353
|
return (fp, contents) => target[prop](`${filepath}/${fp}`, contents);
|
|
453
354
|
}
|
|
454
|
-
// if (prop === "browser") {
|
|
455
|
-
// return new Proxy(target[prop], {
|
|
456
|
-
// get(bTarget, bProp, bReceiver) {
|
|
457
|
-
// if (bProp === "pages") {
|
|
458
|
-
// return async () => {
|
|
459
|
-
// return bTarget.pages().then((pages) => {
|
|
460
|
-
// return pages.map((page) => {
|
|
461
|
-
// return new Proxy(page, {
|
|
462
|
-
// get(pTarget, pProp, pReciever) {
|
|
463
|
-
// if (pProp === "screenshot") {
|
|
464
|
-
// return async (x) => {
|
|
465
|
-
// return pm.customScreenShot(
|
|
466
|
-
// {
|
|
467
|
-
// ...x,
|
|
468
|
-
// path:
|
|
469
|
-
// `${testResourceConfiguration.fs}/${filepath}/butThen` +
|
|
470
|
-
// "/" +
|
|
471
|
-
// x.path,
|
|
472
|
-
// },
|
|
473
|
-
// page
|
|
474
|
-
// );
|
|
475
|
-
// // return await window["custom-screenshot"]({
|
|
476
|
-
// // ...x,
|
|
477
|
-
// // path:
|
|
478
|
-
// // `${testResourceConfiguration.fs}/suite-${sNdx}/afterAll` +
|
|
479
|
-
// // "/" +
|
|
480
|
-
// // x.path,
|
|
481
|
-
// // });
|
|
482
|
-
// };
|
|
483
|
-
// } else if (pProp === "close") {
|
|
484
|
-
// return () => pTarget[pProp]();
|
|
485
|
-
// } else if (pProp === "mainFrame") {
|
|
486
|
-
// return () => pTarget[pProp]();
|
|
487
|
-
// } else if (pProp === "exposeFunction") {
|
|
488
|
-
// // return Reflect.get(target, prop, receiver);
|
|
489
|
-
// return (...a) => pTarget[pProp](...a);
|
|
490
|
-
// // return target[pProp];
|
|
491
|
-
// } else if (pProp === "removeExposedFunction") {
|
|
492
|
-
// // return Reflect.get(target, prop, receiver);
|
|
493
|
-
// return pTarget[pProp].bind(pTarget);
|
|
494
|
-
// // return target[pProp];
|
|
495
|
-
// } else {
|
|
496
|
-
// return Reflect.get(...arguments);
|
|
497
|
-
// }
|
|
498
|
-
// },
|
|
499
|
-
// });
|
|
500
|
-
// });
|
|
501
|
-
// });
|
|
502
|
-
// // return (await target.pages()).map((page) => {
|
|
503
|
-
// // return new Proxy(page, handler2);
|
|
504
|
-
// // });
|
|
505
|
-
// };
|
|
506
|
-
// }
|
|
507
|
-
// },
|
|
508
|
-
// });
|
|
509
|
-
// }
|
|
510
355
|
return Reflect.get(...arguments);
|
|
511
356
|
},
|
|
512
357
|
});
|
|
@@ -14,21 +14,11 @@ class BaseBuilder {
|
|
|
14
14
|
this.checkOverides = checkOverides;
|
|
15
15
|
this.testSpecification = testSpecification;
|
|
16
16
|
this.specs = testSpecification(this.Suites(), this.Given(), this.When(), this.Then(), this.Check());
|
|
17
|
-
// const f = this.specs[0].features;
|
|
18
17
|
this.testJobs = this.specs.map((suite) => {
|
|
19
18
|
const suiteRunner = (suite) => async (puppetMaster, tLog) => {
|
|
20
|
-
// const puppeteerBrowser = await puppetMaster.startPuppeteer(
|
|
21
|
-
// {
|
|
22
|
-
// browserWSEndpoint:
|
|
23
|
-
// puppetMaster.testResourceConfiguration.browserWSEndpoint,
|
|
24
|
-
// },
|
|
25
|
-
// puppetMaster.testResourceConfiguration.fs
|
|
26
|
-
// );
|
|
27
19
|
const x = await suite.run(input, puppetMaster.testResourceConfiguration, (fPath, value) => puppetMaster.testArtiFactoryfileWriter(tLog, (p) => {
|
|
28
20
|
this.artifacts.push(p);
|
|
29
21
|
})(puppetMaster.testResourceConfiguration.fs + "/" + fPath, value), tLog, puppetMaster);
|
|
30
|
-
// await puppetMaster.browser.disconnect();
|
|
31
|
-
// puppeteerBrowser.close();
|
|
32
22
|
return x;
|
|
33
23
|
};
|
|
34
24
|
const runner = suiteRunner(suite);
|
|
@@ -62,7 +52,7 @@ class BaseBuilder {
|
|
|
62
52
|
// );
|
|
63
53
|
// }
|
|
64
54
|
puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2));
|
|
65
|
-
console.log(`exiting gracefully with ${numberOfFailures} failures.`);
|
|
55
|
+
// console.log(`exiting gracefully with ${numberOfFailures} failures.`);
|
|
66
56
|
return {
|
|
67
57
|
failed: numberOfFailures,
|
|
68
58
|
artifacts: this.artifacts || [],
|
|
@@ -10,7 +10,7 @@ class ClassBuilder extends basebuilder_js_1.BaseBuilder {
|
|
|
10
10
|
};
|
|
11
11
|
return a;
|
|
12
12
|
}, {});
|
|
13
|
-
const classyGivens = Object.entries(testImplementation.givens).reduce((a, [key,
|
|
13
|
+
const classyGivens = Object.entries(testImplementation.givens).reduce((a, [key, g]) => {
|
|
14
14
|
a[key] = (features, whens, thens, givEn) => {
|
|
15
15
|
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key], givEn);
|
|
16
16
|
};
|
|
@@ -4,28 +4,10 @@ const index_js_1 = require("./index.js");
|
|
|
4
4
|
const abstractBase_js_1 = require("./abstractBase.js");
|
|
5
5
|
const classBuilder_js_1 = require("./classBuilder.js");
|
|
6
6
|
class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
7
|
-
constructor(input, testSpecification, testImplementation, testResourceRequirement = index_js_1.defaultTestResourceRequirement, testInterface) {
|
|
7
|
+
constructor(input, testSpecification, testImplementation, testResourceRequirement = index_js_1.defaultTestResourceRequirement, testInterface, uberCatcher) {
|
|
8
8
|
const fullTestInterface = (0, index_js_1.DefaultTestInterface)(testInterface);
|
|
9
9
|
super(testImplementation, testSpecification, input, class extends abstractBase_js_1.BaseSuite {
|
|
10
10
|
afterAll(store, artifactory, pm) {
|
|
11
|
-
// const pagesHandler = {
|
|
12
|
-
// get(target, prop) {
|
|
13
|
-
// console.log(`Getting pages property ${prop}`);
|
|
14
|
-
// return target[prop];
|
|
15
|
-
// },
|
|
16
|
-
// };
|
|
17
|
-
// const browserHandler = {
|
|
18
|
-
// get(target, prop) {
|
|
19
|
-
// console.log(`Getting browser property ${prop}`);
|
|
20
|
-
// if (prop === "pages") {
|
|
21
|
-
// // return target[prop];
|
|
22
|
-
// return new Proxy(target[prop], pagesHandler);
|
|
23
|
-
// } else {
|
|
24
|
-
// return target[prop];
|
|
25
|
-
// }
|
|
26
|
-
// },
|
|
27
|
-
// };
|
|
28
|
-
// const proxy = new Proxy(utils.browser, browserHandler);
|
|
29
11
|
return fullTestInterface.afterAll(store, (fPath, value) => {
|
|
30
12
|
artifactory(`afterAll4-${this.name}/${fPath}`, value);
|
|
31
13
|
}, pm);
|
|
@@ -38,12 +20,12 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
38
20
|
(async (input, artifactory, tr, pm) => input))(s, this.testResourceConfiguration, artifactory, pm);
|
|
39
21
|
}
|
|
40
22
|
}, class Given extends abstractBase_js_1.BaseGiven {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
testResource,
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.uberCatcher = uberCatcher;
|
|
26
|
+
}
|
|
27
|
+
async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
|
|
28
|
+
return fullTestInterface.beforeEach(subject, initializer, artifactory, testResource, initialValues, pm);
|
|
47
29
|
}
|
|
48
30
|
afterEach(store, key, artifactory, pm) {
|
|
49
31
|
return new Promise((res) => res(fullTestInterface.afterEach(store, key, (fPath, value) => artifactory(`after/${fPath}`, value), pm)));
|
|
@@ -113,9 +95,7 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
113
95
|
// TODO does not work?
|
|
114
96
|
artifactory(`afterEach2-${this.name}/${fPath}`, value), pm)));
|
|
115
97
|
}
|
|
116
|
-
}, testResourceRequirement
|
|
117
|
-
// puppetMaster
|
|
118
|
-
);
|
|
98
|
+
}, testResourceRequirement);
|
|
119
99
|
}
|
|
120
100
|
}
|
|
121
101
|
exports.default = Testeranto;
|