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.
- package/README.md +2 -4
- package/dist/common/src/PM/base.js +5 -1
- package/dist/common/src/PM/main.js +57 -54
- 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 +6 -3
- package/dist/common/src/Pure.js +0 -4
- package/dist/common/src/Pure.test.js +1 -1
- package/dist/common/src/ReportServer.js +2 -126
- package/dist/common/src/ReportServer.test.ts/index.js +78 -0
- package/dist/common/src/ReportServerLib.js +141 -0
- package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +1 -1
- 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 -40
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +10 -9
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.specification.js +7 -7
- package/dist/common/src/lib/basebuilder.js +13 -2
- package/dist/common/src/lib/core.js +1 -0
- package/dist/common/src/lib/pmProxy.js +215 -201
- 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 +47 -32
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/PM/base.js +5 -1
- package/dist/module/src/PM/main.js +22 -19
- 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 +6 -3
- package/dist/module/src/Pure.js +0 -4
- package/dist/module/src/Pure.test.js +1 -1
- package/dist/module/src/ReportServer.js +2 -123
- package/dist/module/src/ReportServer.test.ts/index.js +73 -0
- package/dist/module/src/ReportServerLib.js +134 -0
- package/dist/module/src/TestPage.js +29 -17
- package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +1 -1
- package/dist/module/src/components/pure/TestPageView.js +29 -17
- 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 -40
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +10 -9
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.specification.js +7 -7
- package/dist/module/src/lib/basebuilder.js +13 -2
- package/dist/module/src/lib/core.js +1 -0
- package/dist/module/src/lib/pmProxy.js +215 -201
- 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 +47 -32
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/App.js +3 -3
- package/dist/prebuild/ReportServer.mjs +21 -9
- package/dist/prebuild/build.mjs +1 -1
- package/dist/prebuild/run.mjs +27 -20
- 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/ReportServer.test.ts/index.d.ts +29 -0
- package/dist/types/src/ReportServerLib.d.ts +1 -0
- package/dist/types/src/Types.d.ts +0 -1
- package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +2 -1
- package/dist/types/src/lib/BaseSuite.d.ts +2 -0
- package/dist/types/src/lib/abstractBase.d.ts +5 -7
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.types.d.ts +7 -4
- package/dist/types/src/lib/pmProxy.d.ts +3 -3
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/PM/base.ts +7 -5
- package/src/PM/main.ts +26 -21
- package/src/PM/node.ts +6 -1
- package/src/PM/pure.ts +6 -1
- package/src/PM/web.ts +7 -3
- package/src/Pure.test.ts +6 -6
- package/src/Pure.ts +0 -8
- package/src/ReportServer.test.ts/index.ts +194 -0
- package/src/ReportServer.ts +2 -132
- package/src/ReportServerLib.ts +147 -0
- package/src/TestPage.tsx +65 -5
- package/src/Types.ts +0 -1
- package/src/components/pure/ProjectPageView.test/implementation.tsx +1 -1
- package/src/components/pure/TestPageView.tsx +65 -5
- package/src/esbuildConfigs/node.ts +1 -1
- package/src/lib/BaseSuite.ts +16 -21
- package/src/lib/abstractBase.ts +59 -48
- package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +22 -10
- package/src/lib/baseBuilder.test/baseBuilder.test.specification.ts +9 -9
- package/src/lib/baseBuilder.test/baseBuilder.test.types.ts +7 -4
- package/src/lib/basebuilder.ts +13 -4
- 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 +135 -80
- package/testeranto/App.js +3 -3
- package/testeranto/bundles/node/core/metafile.json +8 -0
- package/testeranto/bundles/pure/core/metafile.json +8 -0
- package/testeranto/bundles/web/core/metafile.json +15086 -0
- package/testeranto/bundles/web/{allTests → core}/src/components/pure/ProjectPageView.test/index.html +1 -1
- package/testeranto/bundles/web/{allTests → core}/src/components/pure/ProjectPageView.test/index.mjs +4109 -1642
- package/testeranto/projects.json +1 -1
- package/testeranto/reports/core/config.json +24 -0
- package/testeranto/reports/{allTests → core}/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +6 -1
- 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/{allTests → core}/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +15 -33
- package/testeranto/reports/core/summary.json +9 -0
- package/testeranto.config.ts +49 -32
- package/tsc.log +78 -92
- package/testeranto/bundles/node/allTests/chunk-3EUGBAOM.mjs +0 -113
- package/testeranto/bundles/node/allTests/chunk-E75CSRER.mjs +0 -800
- package/testeranto/bundles/node/allTests/chunk-M6DO7VMB.mjs +0 -252
- package/testeranto/bundles/node/allTests/metafile.json +0 -1229
- package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +0 -323
- package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +0 -223
- package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +0 -411
- package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +0 -528
- package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +0 -4752
- package/testeranto/bundles/pure/allTests/chunk-KHDVEHF7.mjs +0 -185
- package/testeranto/bundles/pure/allTests/chunk-VMUSFSZM.mjs +0 -797
- package/testeranto/bundles/pure/allTests/metafile.json +0 -1054
- package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +0 -429
- package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +0 -425
- package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +0 -381
- package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +0 -2283
- package/testeranto/bundles/web/allTests/chunk-U7AW26HL.mjs +0 -997
- package/testeranto/bundles/web/allTests/metafile.json +0 -25
- package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.html +0 -19
- package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +0 -440
- 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 -244
- package/testeranto/reports/allTests/config.json +0 -104
- package/testeranto/reports/allTests/src/Pure.test/pure/lint_errors.txt +0 -0
- package/testeranto/reports/allTests/src/Pure.test/pure/message.txt +0 -2
- package/testeranto/reports/allTests/src/Pure.test/pure/prompt.txt +0 -13
- package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +0 -101
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +0 -50
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +0 -2
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +0 -17
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -32
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/lint_errors.txt +0 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +0 -52
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/prompt.txt +0 -13
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +0 -31
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +0 -111
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +0 -14
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +0 -31
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +0 -111
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/lint_errors.txt +0 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +0 -108
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +0 -14
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +0 -31
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +0 -111
- 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 -0
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -35
- 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 -16
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +0 -77
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +0 -62
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +0 -0
- 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 -18
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +0 -62
- 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 -0
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -69
- 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 -16
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -77
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -62
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/lint_errors.txt +0 -0
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +0 -700
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +0 -16
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +0 -164
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +0 -138
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/lint_errors.txt +0 -21
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +0 -7
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/prompt.txt +0 -18
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +0 -63
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/bdd_errors.txt +0 -1
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/lint_errors.txt +0 -20
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +0 -31
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/message.txt +0 -2
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/prompt.txt +0 -16
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +0 -134
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +0 -76
- package/testeranto/reports/allTests/summary.json +0 -79
- package/testeranto/reportsnode_build_errors +0 -20
- package/testeranto/reportspure_build_errors +0 -343
- package/testeranto/reportsweb_build_errors +0 -25
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
PM,
|
|
4
|
-
TesterantoCore,
|
|
5
|
-
defaultTestResourceRequirement
|
|
6
|
-
} from "./chunk-E75CSRER.mjs";
|
|
7
|
-
|
|
8
|
-
// src/PM/node.ts
|
|
9
|
-
import net from "net";
|
|
10
|
-
import fs from "fs";
|
|
11
|
-
import path from "path";
|
|
12
|
-
var fPaths = [];
|
|
13
|
-
var PM_Node = class extends PM {
|
|
14
|
-
constructor(t, ipcFile) {
|
|
15
|
-
super();
|
|
16
|
-
this.testResourceConfiguration = t;
|
|
17
|
-
this.client = net.createConnection(ipcFile, () => {
|
|
18
|
-
return;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
start() {
|
|
22
|
-
throw new Error("DEPRECATED");
|
|
23
|
-
}
|
|
24
|
-
stop() {
|
|
25
|
-
throw new Error("stop not implemented.");
|
|
26
|
-
}
|
|
27
|
-
send(command, ...argz) {
|
|
28
|
-
const key = Math.random().toString();
|
|
29
|
-
if (!this.client) {
|
|
30
|
-
console.error(
|
|
31
|
-
`Tried to send "${command} (${argz})" but the test has not been started and the IPC client is not established. Exiting as failure!`
|
|
32
|
-
);
|
|
33
|
-
process.exit(-1);
|
|
34
|
-
}
|
|
35
|
-
return new Promise((res) => {
|
|
36
|
-
const myListener = (event) => {
|
|
37
|
-
const x = JSON.parse(event);
|
|
38
|
-
if (x.key === key) {
|
|
39
|
-
process.removeListener("message", myListener);
|
|
40
|
-
res(x.payload);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
process.addListener("message", myListener);
|
|
44
|
-
this.client.write(JSON.stringify([command, ...argz, key]));
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
async launchSideCar(n) {
|
|
48
|
-
return this.send(
|
|
49
|
-
"launchSideCar",
|
|
50
|
-
n,
|
|
51
|
-
this.testResourceConfiguration.name
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
stopSideCar(n) {
|
|
55
|
-
return this.send(
|
|
56
|
-
"stopSideCar",
|
|
57
|
-
n,
|
|
58
|
-
this.testResourceConfiguration.name
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
async pages() {
|
|
62
|
-
return this.send("pages", ...arguments);
|
|
63
|
-
}
|
|
64
|
-
waitForSelector(p, s) {
|
|
65
|
-
return this.send("waitForSelector", ...arguments);
|
|
66
|
-
}
|
|
67
|
-
closePage(p) {
|
|
68
|
-
return this.send("closePage", ...arguments);
|
|
69
|
-
}
|
|
70
|
-
goto(page, url) {
|
|
71
|
-
return this.send("goto", ...arguments);
|
|
72
|
-
}
|
|
73
|
-
async newPage() {
|
|
74
|
-
return this.send("newPage");
|
|
75
|
-
}
|
|
76
|
-
$(selector, page) {
|
|
77
|
-
return this.send("$", ...arguments);
|
|
78
|
-
}
|
|
79
|
-
isDisabled(selector) {
|
|
80
|
-
return this.send("isDisabled", ...arguments);
|
|
81
|
-
}
|
|
82
|
-
getAttribute(selector, attribute, p) {
|
|
83
|
-
return this.send("getAttribute", ...arguments);
|
|
84
|
-
}
|
|
85
|
-
getInnerHtml(selector, p) {
|
|
86
|
-
return this.send("getInnerHtml", ...arguments);
|
|
87
|
-
}
|
|
88
|
-
// setValue(selector: string) {
|
|
89
|
-
// return this.send("getValue", ...arguments);
|
|
90
|
-
// }
|
|
91
|
-
focusOn(selector) {
|
|
92
|
-
return this.send("focusOn", ...arguments);
|
|
93
|
-
}
|
|
94
|
-
typeInto(selector) {
|
|
95
|
-
return this.send("typeInto", ...arguments);
|
|
96
|
-
}
|
|
97
|
-
page() {
|
|
98
|
-
return this.send("page");
|
|
99
|
-
}
|
|
100
|
-
click(selector) {
|
|
101
|
-
return this.send("click", ...arguments);
|
|
102
|
-
}
|
|
103
|
-
screencast(opts, page) {
|
|
104
|
-
return this.send(
|
|
105
|
-
"screencast",
|
|
106
|
-
{
|
|
107
|
-
...opts,
|
|
108
|
-
path: this.testResourceConfiguration.fs + "/" + opts.path
|
|
109
|
-
},
|
|
110
|
-
page,
|
|
111
|
-
this.testResourceConfiguration.name
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
screencastStop(p) {
|
|
115
|
-
return this.send("screencastStop", ...arguments);
|
|
116
|
-
}
|
|
117
|
-
customScreenShot(x, y) {
|
|
118
|
-
const opts = x[0];
|
|
119
|
-
const page = x[1];
|
|
120
|
-
return this.send(
|
|
121
|
-
"customScreenShot",
|
|
122
|
-
{
|
|
123
|
-
...opts,
|
|
124
|
-
path: this.testResourceConfiguration.fs + "/" + opts.path
|
|
125
|
-
},
|
|
126
|
-
this.testResourceConfiguration.name,
|
|
127
|
-
page
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
async existsSync(destFolder) {
|
|
131
|
-
return await this.send(
|
|
132
|
-
"existsSync",
|
|
133
|
-
this.testResourceConfiguration.fs + "/" + destFolder
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
mkdirSync() {
|
|
137
|
-
return this.send("mkdirSync", this.testResourceConfiguration.fs + "/");
|
|
138
|
-
}
|
|
139
|
-
async write(uid, contents) {
|
|
140
|
-
return await this.send("write", ...arguments);
|
|
141
|
-
}
|
|
142
|
-
async writeFileSync(filepath, contents) {
|
|
143
|
-
return await this.send(
|
|
144
|
-
"writeFileSync",
|
|
145
|
-
this.testResourceConfiguration.fs + "/" + filepath,
|
|
146
|
-
contents,
|
|
147
|
-
this.testResourceConfiguration.name
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
async createWriteStream(filepath) {
|
|
151
|
-
return await this.send(
|
|
152
|
-
"createWriteStream",
|
|
153
|
-
this.testResourceConfiguration.fs + "/" + filepath,
|
|
154
|
-
this.testResourceConfiguration.name
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
async end(uid) {
|
|
158
|
-
return await this.send("end", ...arguments);
|
|
159
|
-
}
|
|
160
|
-
async customclose() {
|
|
161
|
-
return await this.send(
|
|
162
|
-
"customclose",
|
|
163
|
-
this.testResourceConfiguration.fs,
|
|
164
|
-
this.testResourceConfiguration.name
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
testArtiFactoryfileWriter(tLog, callback) {
|
|
168
|
-
return (fPath, value) => {
|
|
169
|
-
callback(
|
|
170
|
-
new Promise((res, rej) => {
|
|
171
|
-
tLog("testArtiFactory =>", fPath);
|
|
172
|
-
const cleanPath = path.resolve(fPath);
|
|
173
|
-
fPaths.push(cleanPath.replace(process.cwd(), ``));
|
|
174
|
-
const targetDir = cleanPath.split("/").slice(0, -1).join("/");
|
|
175
|
-
fs.mkdir(targetDir, { recursive: true }, async (error) => {
|
|
176
|
-
if (error) {
|
|
177
|
-
console.error(`\u2757\uFE0FtestArtiFactory failed`, targetDir, error);
|
|
178
|
-
}
|
|
179
|
-
if (Buffer.isBuffer(value)) {
|
|
180
|
-
fs.writeFileSync(fPath, value, "binary");
|
|
181
|
-
res();
|
|
182
|
-
} else if (`string` === typeof value) {
|
|
183
|
-
fs.writeFileSync(fPath, value.toString(), {
|
|
184
|
-
encoding: "utf-8"
|
|
185
|
-
});
|
|
186
|
-
res();
|
|
187
|
-
} else {
|
|
188
|
-
const pipeStream = value;
|
|
189
|
-
const myFile = fs.createWriteStream(fPath);
|
|
190
|
-
pipeStream.pipe(myFile);
|
|
191
|
-
pipeStream.on("close", () => {
|
|
192
|
-
myFile.close();
|
|
193
|
-
res();
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
})
|
|
198
|
-
);
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
// launch(options?: PuppeteerLaunchOptions): Promise<Browser>;
|
|
202
|
-
startPuppeteer(options) {
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
// src/Node.ts
|
|
207
|
-
var ipcfile;
|
|
208
|
-
var NodeTesteranto = class extends TesterantoCore {
|
|
209
|
-
constructor(input, testSpecification, testImplementation, testResourceRequirement, testAdapter) {
|
|
210
|
-
super(
|
|
211
|
-
input,
|
|
212
|
-
testSpecification,
|
|
213
|
-
testImplementation,
|
|
214
|
-
testResourceRequirement,
|
|
215
|
-
testAdapter,
|
|
216
|
-
() => {
|
|
217
|
-
}
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
|
-
async receiveTestResourceConfig(partialTestResource) {
|
|
221
|
-
console.log("receiveTestResourceConfig", partialTestResource);
|
|
222
|
-
const t = JSON.parse(partialTestResource);
|
|
223
|
-
const pm = new PM_Node(t, ipcfile);
|
|
224
|
-
return await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
var testeranto = async (input, testSpecification, testImplementation, testAdapter, testResourceRequirement = defaultTestResourceRequirement) => {
|
|
228
|
-
try {
|
|
229
|
-
const t = new NodeTesteranto(
|
|
230
|
-
input,
|
|
231
|
-
testSpecification,
|
|
232
|
-
testImplementation,
|
|
233
|
-
testResourceRequirement,
|
|
234
|
-
testAdapter
|
|
235
|
-
);
|
|
236
|
-
process.on("unhandledRejection", (reason, promise) => {
|
|
237
|
-
console.error("Unhandled Rejection at:", promise, "reason:", reason);
|
|
238
|
-
});
|
|
239
|
-
ipcfile = process.argv[3];
|
|
240
|
-
const f = await t.receiveTestResourceConfig(process.argv[2]);
|
|
241
|
-
console.error("goodbye node with failures", f.fails);
|
|
242
|
-
process.exit(f.fails);
|
|
243
|
-
} catch (e) {
|
|
244
|
-
console.error("goodbye node with caught error", e);
|
|
245
|
-
process.exit(-1);
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
var Node_default = testeranto;
|
|
249
|
-
|
|
250
|
-
export {
|
|
251
|
-
Node_default
|
|
252
|
-
};
|