testeranto 0.49.9 → 0.62.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/.nvmrc +1 -0
- package/README.md +71 -9
- package/dist/cjs-shim.js +12 -0
- package/dist/common/Features.js +2 -3
- package/dist/common/Node.js +53 -61
- package/dist/common/Project.js +272 -606
- package/dist/common/SubPackages/puppeteer.js +19 -0
- package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
- package/dist/common/SubPackages/react/jsx/index.js +13 -0
- package/dist/common/SubPackages/react/jsx/node.js +10 -0
- package/dist/common/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/{subPackages → SubPackages}/react-dom/component/node.js +6 -6
- package/dist/common/{subPackages → SubPackages}/react-dom/component/web.js +11 -12
- package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
- package/dist/common/{subPackages → SubPackages}/react-dom/jsx/web.js +6 -27
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +2 -2
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/component/index.js +26 -15
- package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
- package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/fc/node.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/fc/web.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +8 -2
- package/dist/common/{subPackages/react-test-renderer/jsx-promised → SubPackages/react-test-renderer/jsx}/node.js +4 -4
- package/dist/common/{subPackages/react → SubPackages/react-test-renderer}/jsx/web.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +2 -2
- package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
- package/dist/common/Types.js +32 -0
- package/dist/common/Web.js +41 -112
- package/dist/common/electron.js +188 -44
- package/dist/common/esbuildConfigs/features.js +14 -0
- package/dist/common/esbuildConfigs/index.js +20 -0
- package/dist/common/esbuildConfigs/node.js +35 -0
- package/dist/common/esbuildConfigs/report.js +48 -0
- package/dist/common/esbuildConfigs/tests.js +14 -0
- package/dist/common/esbuildConfigs/web.js +50 -0
- package/dist/common/lib/abstractBase.js +193 -0
- package/dist/common/lib/basebuilder.js +86 -0
- package/dist/common/lib/browser.js +26 -0
- package/dist/common/lib/classBuilder.js +41 -0
- package/dist/common/lib/core.js +52 -0
- package/dist/common/lib/index.js +19 -0
- package/dist/common/nodeWriterElectron.js +55 -0
- package/dist/common/preload.js +22 -21
- package/dist/common/report.html.js +31 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/web.html.js +22 -0
- package/dist/module/Features.js +2 -3
- package/dist/module/Node.js +53 -61
- package/dist/module/Project.js +272 -583
- package/dist/module/SubPackages/puppeteer.js +14 -0
- package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
- package/dist/module/SubPackages/react/jsx/index.js +10 -0
- package/dist/module/SubPackages/react/jsx/node.js +5 -0
- package/dist/module/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/{subPackages → SubPackages}/react-dom/component/node.js +5 -5
- package/dist/module/{subPackages → SubPackages}/react-dom/component/web.js +10 -11
- package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
- package/dist/module/{subPackages → SubPackages}/react-dom/jsx/web.js +5 -26
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/index.js +23 -15
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/web.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +8 -2
- package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +2 -2
- package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
- package/dist/module/Types.js +30 -1
- package/dist/module/Web.js +41 -112
- package/dist/module/electron.js +189 -45
- package/dist/module/esbuildConfigs/features.js +12 -0
- package/dist/module/esbuildConfigs/index.js +18 -0
- package/dist/module/esbuildConfigs/node.js +30 -0
- package/dist/module/esbuildConfigs/report.js +48 -0
- package/dist/module/esbuildConfigs/tests.js +12 -0
- package/dist/module/esbuildConfigs/web.js +45 -0
- package/dist/module/lib/abstractBase.js +185 -0
- package/dist/module/lib/basebuilder.js +82 -0
- package/dist/module/lib/browser.js +22 -0
- package/dist/module/lib/classBuilder.js +37 -0
- package/dist/module/lib/core.js +49 -0
- package/dist/module/lib/index.js +15 -0
- package/dist/module/nodeWriterElectron.js +52 -0
- package/dist/module/preload.js +22 -21
- package/dist/module/report.html.js +29 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/web.html.js +20 -0
- package/dist/prebuild/Report.css +10326 -0
- package/dist/prebuild/Report.js +37456 -0
- package/dist/types/Features.d.ts +5 -5
- package/dist/types/Node.d.ts +4 -11
- package/dist/types/NodeWriter.d.ts +1 -1
- package/dist/types/Project.d.ts +2 -27
- package/dist/types/SubPackages/puppeteer.d.ts +6 -0
- package/dist/types/SubPackages/react/component/node.d.ts +7 -0
- package/dist/types/SubPackages/react/component/web.d.ts +7 -0
- package/dist/types/SubPackages/react/jsx/index.d.ts +15 -0
- package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/{subPackages → SubPackages}/react-dom/component/node.d.ts +2 -4
- package/dist/types/SubPackages/react-dom/component/web.d.ts +5 -0
- package/dist/types/{subPackages → SubPackages}/react-dom/jsx/index.d.ts +3 -3
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
- package/dist/types/{subPackages → SubPackages}/react-test-renderer/component/index.d.ts +6 -6
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -0
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +8 -0
- package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -0
- package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.d.ts +4 -4
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
- package/dist/types/Types.d.ts +116 -3
- package/dist/types/Web.d.ts +4 -11
- package/dist/types/esbuildConfigs/features.d.ts +4 -0
- package/dist/types/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/esbuildConfigs/tests.d.ts +4 -0
- package/dist/types/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/lib/abstractBase.d.ts +102 -0
- package/dist/types/lib/basebuilder.d.ts +24 -0
- package/dist/types/lib/browser.d.ts +6 -0
- package/dist/types/lib/classBuilder.d.ts +6 -0
- package/dist/types/lib/core.d.ts +7 -0
- package/dist/types/lib/index.d.ts +57 -0
- package/dist/types/nodeWriterElectron.d.ts +2 -0
- package/dist/types/report.html.d.ts +2 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/web.html.d.ts +2 -0
- package/electronBuild.ts +32 -0
- package/index.html +30 -0
- package/package.json +120 -85
- package/src/Features.ts +2 -4
- package/src/Node.ts +114 -160
- package/src/NodeWriter.ts +1 -4
- package/src/Project.ts +610 -753
- package/src/Report.tsx +30 -15
- package/src/SubPackages/puppeteer.ts +46 -0
- package/src/{subPackages → SubPackages}/react/component/node.ts +12 -32
- package/src/SubPackages/react/component/web.ts +53 -0
- package/src/SubPackages/react/jsx/index.ts +43 -0
- package/src/SubPackages/react/jsx/node.ts +29 -0
- package/src/SubPackages/react/jsx/web.ts +28 -0
- package/src/{subPackages → SubPackages}/react-dom/component/node.ts +11 -25
- package/src/{subPackages → SubPackages}/react-dom/component/web.ts +27 -32
- package/src/{subPackages → SubPackages}/react-dom/jsx/index.ts +3 -5
- package/src/SubPackages/react-dom/jsx/node.ts +68 -0
- package/src/{subPackages → SubPackages}/react-dom/jsx/web.ts +19 -62
- package/src/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.ts +9 -28
- package/src/{subPackages → SubPackages}/react-test-renderer/component/index.ts +31 -29
- package/src/SubPackages/react-test-renderer/component/node.ts +22 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +22 -0
- package/src/{subPackages → SubPackages}/react-test-renderer/fc/node.ts +14 -28
- package/src/{subPackages → SubPackages}/react-test-renderer/fc/web.ts +9 -25
- package/src/{subPackages → SubPackages}/react-test-renderer/jsx/index.ts +19 -16
- package/src/SubPackages/react-test-renderer/jsx/node.ts +24 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
- package/src/{subPackages → SubPackages}/react-test-renderer/jsx-promised/index.ts +7 -15
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
- package/src/Types.ts +334 -3
- package/src/Web.ts +104 -230
- package/src/cjs-shim.js +12 -0
- package/src/electron.ts +237 -46
- package/src/esbuildConfigs/features.ts +18 -0
- package/src/esbuildConfigs/index.ts +22 -0
- package/src/esbuildConfigs/node.ts +59 -0
- package/src/esbuildConfigs/report.ts +51 -0
- package/src/esbuildConfigs/tests.ts +20 -0
- package/src/esbuildConfigs/web.ts +73 -0
- package/src/lib/abstractBase.ts +459 -0
- package/src/lib/basebuilder.ts +253 -0
- package/src/lib/browser.ts +34 -0
- package/src/lib/classBuilder.ts +137 -0
- package/src/lib/core.ts +182 -0
- package/src/lib/index.ts +116 -0
- package/src/nodeWriterElectron.ts +71 -0
- package/src/preload.ts +23 -21
- package/src/report.html.ts +29 -0
- package/src/web.html.ts +20 -0
- package/tests/Rectangle.test.ts +189 -0
- package/tsconfig.json +19 -6
- package/tsconfig.module.json +15 -4
- package/tsconfig.types.json +14 -4
- package/yarn-error.log +3144 -0
- package/dist/common/core.js +0 -397
- package/dist/common/subPackages/react/jsx/index.js +0 -26
- package/dist/common/subPackages/react-dom/jsx/node.js +0 -95
- package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
- package/dist/module/Report.js +0 -186
- package/dist/module/core.js +0 -388
- package/dist/module/subPackages/react/jsx/index.js +0 -22
- package/dist/module/subPackages/react/jsx/node.js +0 -5
- package/dist/module/subPackages/react/jsx/web.js +0 -5
- package/dist/module/subPackages/react-dom/jsx/node.js +0 -87
- package/dist/module/subPackages/react-test-renderer/jsx/web.js +0 -5
- package/dist/module/subPackages/react-test-renderer/jsx-promised/node.js +0 -5
- package/dist/types/core.d.ts +0 -220
- package/dist/types/subPackages/react/component/node.d.ts +0 -12
- package/dist/types/subPackages/react/component/web.d.ts +0 -12
- package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
- package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
- package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -8
- package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/subPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -8
- package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/fc/node.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/fc/web.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
- package/src/core.ts +0 -1399
- package/src/subPackages/react/component/web.ts +0 -80
- package/src/subPackages/react/jsx/index.ts +0 -64
- package/src/subPackages/react/jsx/node.ts +0 -29
- package/src/subPackages/react/jsx/web.ts +0 -29
- package/src/subPackages/react-dom/jsx/node.ts +0 -146
- package/src/subPackages/react-test-renderer/component/node.ts +0 -30
- package/src/subPackages/react-test-renderer/component/web.ts +0 -30
- package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx-promised/node.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx-promised/web.ts +0 -31
- /package/dist/common/{subPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{subPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Testeranto from "../Node.js";
|
|
3
|
+
export default (testInput, testSpecifications, testImplementations, testInterface) => {
|
|
4
|
+
return Testeranto(testInput, testSpecifications, testImplementations, Object.assign({ beforeAll(x) {
|
|
5
|
+
process.parentPort.postMessage(`/dist/web/src/ClassicalComponent/test.html`);
|
|
6
|
+
return x;
|
|
7
|
+
}, beforeEach: async () => {
|
|
8
|
+
return new Promise((resolve, rej) => {
|
|
9
|
+
resolve(React.createElement(testInput, {}, []));
|
|
10
|
+
});
|
|
11
|
+
}, andWhen: function (s, whenCB) {
|
|
12
|
+
return whenCB()(s);
|
|
13
|
+
} }, testInterface));
|
|
14
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Testeranto from "../../../Node";
|
|
2
|
+
import Testeranto from "../../../Node.js";
|
|
3
3
|
export default (testImplementations, testSpecifications, testInput) => {
|
|
4
4
|
return Testeranto(testInput, testSpecifications, testImplementations, {
|
|
5
5
|
beforeEach: async () => {
|
|
@@ -7,8 +7,8 @@ export default (testImplementations, testSpecifications, testInput) => {
|
|
|
7
7
|
resolve(React.createElement(testInput, {}, []));
|
|
8
8
|
});
|
|
9
9
|
},
|
|
10
|
-
andWhen: function (s,
|
|
11
|
-
return
|
|
10
|
+
andWhen: function (s, whenCB) {
|
|
11
|
+
return whenCB()(s);
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
14
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Testeranto from "../../../Web";
|
|
2
|
+
import Testeranto from "../../../Web.js";
|
|
3
3
|
export default (testImplementations, testSpecifications, testInput) => {
|
|
4
4
|
return Testeranto(testInput, testSpecifications, testImplementations, {
|
|
5
5
|
beforeEach: async () => {
|
|
@@ -7,8 +7,8 @@ export default (testImplementations, testSpecifications, testInput) => {
|
|
|
7
7
|
resolve(React.createElement(testInput, {}, []));
|
|
8
8
|
});
|
|
9
9
|
},
|
|
10
|
-
andWhen: function (s,
|
|
11
|
-
return
|
|
10
|
+
andWhen: function (s, whenCB) {
|
|
11
|
+
return whenCB()(s);
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
14
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Testeranto from "../../../Node.js";
|
|
2
|
+
import { testInterface as baseInterface } from "./index.js";
|
|
3
|
+
export default (testImplementations, testSpecifications, testInput, testInterface) => {
|
|
4
|
+
return Testeranto(testInput, testSpecifications, testImplementations, Object.assign(Object.assign({}, baseInterface), testInterface));
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Testeranto from "../../../Web.js";
|
|
2
|
+
import { testInterface as baseInterface } from "./index.js";
|
|
3
|
+
export default (testImplementations, testSpecifications, testInput, testInterface) => {
|
|
4
|
+
return Testeranto(testInput, testSpecifications, testImplementations, Object.assign(Object.assign({}, baseInterface), testInterface));
|
|
5
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElement } from "react";
|
|
2
2
|
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
3
3
|
import Stream from 'stream';
|
|
4
|
-
import Testeranto from "../../../Node";
|
|
4
|
+
import Testeranto from "../../../Node.js";
|
|
5
5
|
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
6
6
|
export default (testImplementations, testSpecifications, testInput) => {
|
|
7
7
|
return Testeranto(testInput, testSpecifications, testImplementations, {
|
|
@@ -22,9 +22,9 @@ export default (testImplementations, testSpecifications, testInput) => {
|
|
|
22
22
|
resolve(createElement(testInput));
|
|
23
23
|
});
|
|
24
24
|
},
|
|
25
|
-
andWhen: async function (s,
|
|
26
|
-
|
|
27
|
-
return s
|
|
25
|
+
andWhen: async function (s, whenCB) {
|
|
26
|
+
return whenCB(s);
|
|
27
|
+
// return s
|
|
28
28
|
},
|
|
29
29
|
butThen: async function (s) {
|
|
30
30
|
return s;
|
|
@@ -85,7 +85,7 @@ export default (testImplementations, testSpecifications, testInput) => {
|
|
|
85
85
|
// resolve(ReactDOMServer.renderToStaticMarkup(element));
|
|
86
86
|
// });
|
|
87
87
|
// },
|
|
88
|
-
// andWhen: function (s: IStore,
|
|
88
|
+
// andWhen: function (s: IStore, whenCB): Promise<ISelection> {
|
|
89
89
|
// throw new Error(`"andWhens" are not permitted`);
|
|
90
90
|
// }
|
|
91
91
|
// },
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createElement } from "react";
|
|
2
2
|
import ReactDom from "react-dom/client";
|
|
3
|
-
import Testeranto from "../../../Web";
|
|
4
|
-
export default (
|
|
3
|
+
import Testeranto from "../../../Web.js";
|
|
4
|
+
export default (testInput, testSpecifications, testImplementations) => {
|
|
5
5
|
document.addEventListener("DOMContentLoaded", function () {
|
|
6
|
-
console.log("DOMContentLoaded");
|
|
7
6
|
const elem = document.getElementById("root");
|
|
8
7
|
if (elem) {
|
|
9
8
|
class TesterantoComponent extends testInput {
|
|
@@ -17,7 +16,8 @@ export default (testImplementations, testSpecifications, testInput) => {
|
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
return Testeranto(testInput, testSpecifications, testImplementations, {
|
|
20
|
-
beforeAll: async (
|
|
19
|
+
beforeAll: async (initialProps, artificer) => {
|
|
20
|
+
console.log("mark5", initialProps);
|
|
21
21
|
return await new Promise((resolve, rej) => {
|
|
22
22
|
const elem = document.getElementById("root");
|
|
23
23
|
if (elem) {
|
|
@@ -25,21 +25,20 @@ export default (testImplementations, testSpecifications, testInput) => {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
},
|
|
28
|
-
beforeEach: async ({ htmlElement },
|
|
28
|
+
beforeEach: async ({ htmlElement }, initializer, testResource, artificer, initialValues) => {
|
|
29
29
|
return new Promise((resolve, rej) => {
|
|
30
|
+
// console.log("beforeEach" + JSON.stringify(initializer) + JSON.stringify(initialValues));
|
|
30
31
|
// Ignore these type errors
|
|
31
|
-
ReactDom.createRoot(htmlElement).render(createElement(TesterantoComponent, {
|
|
32
|
-
done: (reactElement) => {
|
|
32
|
+
ReactDom.createRoot(htmlElement).render(createElement(TesterantoComponent, Object.assign(Object.assign({}, initializer.props), { done: (reactElement) => {
|
|
33
33
|
resolve({
|
|
34
34
|
htmlElement,
|
|
35
35
|
reactElement,
|
|
36
36
|
});
|
|
37
|
-
}
|
|
38
|
-
}, []));
|
|
37
|
+
} }), []));
|
|
39
38
|
});
|
|
40
39
|
},
|
|
41
|
-
andWhen: function (s,
|
|
42
|
-
return
|
|
40
|
+
andWhen: function (s, whenCB) {
|
|
41
|
+
return whenCB(s);
|
|
43
42
|
},
|
|
44
43
|
butThen: async function (s) {
|
|
45
44
|
return s;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
3
|
+
import Stream from 'stream';
|
|
4
|
+
import Testeranto from "../../../Node.js";
|
|
5
|
+
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
6
|
+
export default (testImplementations, testSpecifications, testInput) => {
|
|
7
|
+
return Testeranto(testInput, testSpecifications, testImplementations, {
|
|
8
|
+
beforeAll: async (prototype, artificer) => {
|
|
9
|
+
return await new Promise((resolve, rej) => {
|
|
10
|
+
resolve(null);
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
beforeEach: async (reactComponent, ndx, testRsource, artificer) => {
|
|
14
|
+
return new Promise((resolve, rej) => {
|
|
15
|
+
resolve(createElement(testInput));
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
andWhen: async function (s, whenCB) {
|
|
19
|
+
return s;
|
|
20
|
+
},
|
|
21
|
+
butThen: async function (s) {
|
|
22
|
+
return s;
|
|
23
|
+
},
|
|
24
|
+
afterEach: async function (store, ndx, artificer) {
|
|
25
|
+
return {};
|
|
26
|
+
},
|
|
27
|
+
afterAll: (store, artificer) => {
|
|
28
|
+
return;
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -1,60 +1,39 @@
|
|
|
1
|
-
import Testeranto from "../../../Web";
|
|
2
1
|
import React, { useEffect, useRef, } from "react";
|
|
3
2
|
import { createPortal } from 'react-dom';
|
|
3
|
+
import Testeranto from "../../../Web.js";
|
|
4
4
|
export default (testImplementations, testSpecifications, testInput) => {
|
|
5
5
|
document.addEventListener("DOMContentLoaded", function () {
|
|
6
|
-
console.log("DOMContentLoaded");
|
|
7
6
|
const rootElement = document.getElementById("root");
|
|
8
7
|
if (rootElement) {
|
|
9
8
|
const TesterantoComponent = function ({ done, innerComp }) {
|
|
10
9
|
const myContainer = useRef(null);
|
|
11
10
|
useEffect(() => {
|
|
12
11
|
console.log("useEffect called", myContainer.current);
|
|
13
|
-
if (!myContainer.current) {
|
|
14
|
-
// do componentDidMount logic
|
|
15
|
-
myContainer.current = true;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
// do componentDidUpdate logic
|
|
19
|
-
}
|
|
20
12
|
done(myContainer.current);
|
|
21
13
|
}, []);
|
|
22
14
|
return React.createElement('div', { ref: myContainer }, innerComp());
|
|
23
15
|
};
|
|
24
16
|
Testeranto(testInput, testSpecifications, testImplementations, {
|
|
25
17
|
beforeAll: async (input, artificer) => {
|
|
26
|
-
console.log("beforeAll", input);
|
|
27
18
|
return await new Promise((resolve, rej) => {
|
|
28
19
|
resolve(rootElement);
|
|
29
20
|
});
|
|
30
21
|
},
|
|
31
22
|
beforeEach: async (subject, ndx, testRsource, artificer) => {
|
|
32
23
|
return new Promise((resolve, rej) => {
|
|
33
|
-
console.log("beforeEach", subject);
|
|
34
24
|
createPortal(TesterantoComponent({
|
|
35
25
|
innerComp: testInput,
|
|
36
26
|
done: (reactElement) => {
|
|
37
27
|
process.nextTick(() => {
|
|
38
|
-
resolve(reactElement);
|
|
28
|
+
resolve(reactElement);
|
|
39
29
|
});
|
|
40
30
|
}
|
|
41
|
-
}),
|
|
42
|
-
// ignore this type error
|
|
43
|
-
// React.createElement(
|
|
44
|
-
// TesterantoComponent, {
|
|
45
|
-
// done: (reactElement: any) => {
|
|
46
|
-
// process.nextTick(() => {
|
|
47
|
-
// resolve(reactElement)// do something
|
|
48
|
-
// });
|
|
49
|
-
// },
|
|
50
|
-
// innerComp: testInput
|
|
51
|
-
// }),
|
|
52
|
-
rootElement);
|
|
31
|
+
}), rootElement);
|
|
53
32
|
});
|
|
54
33
|
},
|
|
55
|
-
andWhen: function (s,
|
|
34
|
+
andWhen: function (s, whenCB) {
|
|
56
35
|
return new Promise((resolve, rej) => {
|
|
57
|
-
process.nextTick(() => { resolve(
|
|
36
|
+
process.nextTick(() => { resolve(whenCB()(s)); });
|
|
58
37
|
});
|
|
59
38
|
},
|
|
60
39
|
butThen: async function (s) {
|
package/dist/module/{subPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js
RENAMED
|
@@ -9,8 +9,8 @@ export default (testImplementations, testSpecifications, testInput) => test(test
|
|
|
9
9
|
});
|
|
10
10
|
return component;
|
|
11
11
|
},
|
|
12
|
-
andWhen: async function (renderer,
|
|
13
|
-
await act(() =>
|
|
12
|
+
andWhen: async function (renderer, whenCB) {
|
|
13
|
+
await act(() => whenCB()(renderer));
|
|
14
14
|
return renderer;
|
|
15
15
|
},
|
|
16
16
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import renderer, { act } from "react-test-renderer";
|
|
2
3
|
// export const testInterface = {
|
|
3
4
|
// beforeEach: function (CComponent, props): Promise<renderer.ReactTestRenderer> {
|
|
@@ -13,33 +14,40 @@ import renderer, { act } from "react-test-renderer";
|
|
|
13
14
|
// },
|
|
14
15
|
// andWhen: async function (
|
|
15
16
|
// renderer: renderer.ReactTestRenderer,
|
|
16
|
-
//
|
|
17
|
+
// whenCB: () => (any) => any
|
|
17
18
|
// ): Promise<renderer.ReactTestRenderer> {
|
|
18
|
-
// await act(() =>
|
|
19
|
+
// await act(() => whenCB()(renderer));
|
|
19
20
|
// return renderer
|
|
20
21
|
// }
|
|
21
22
|
// }
|
|
22
23
|
export const testInterface = {
|
|
23
|
-
beforeEach: function (CComponent,
|
|
24
|
+
beforeEach: function (CComponent, propsAndChildren) {
|
|
25
|
+
function Link(props) {
|
|
26
|
+
const p = props.props;
|
|
27
|
+
const c = props.children;
|
|
28
|
+
return React.createElement(CComponent, p, c);
|
|
29
|
+
}
|
|
24
30
|
return new Promise((res, rej) => {
|
|
25
|
-
act(() => {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
act(async () => {
|
|
32
|
+
const p = propsAndChildren;
|
|
33
|
+
const y = new CComponent(p.props);
|
|
34
|
+
const testRenderer = await renderer.create(Link(propsAndChildren));
|
|
35
|
+
res(testRenderer);
|
|
29
36
|
});
|
|
30
37
|
});
|
|
31
38
|
},
|
|
32
|
-
andWhen: async function (renderer,
|
|
33
|
-
// console.log("andWhen",
|
|
34
|
-
await act(() =>
|
|
39
|
+
andWhen: async function (renderer, whenCB) {
|
|
40
|
+
// console.log("andWhen", whenCB)
|
|
41
|
+
await act(() => whenCB(renderer));
|
|
35
42
|
return renderer;
|
|
36
43
|
},
|
|
37
|
-
// andWhen: function (s: Store,
|
|
38
|
-
// return
|
|
44
|
+
// andWhen: function (s: Store, whenCB): Promise<Selection> {
|
|
45
|
+
// return whenCB()(s);
|
|
39
46
|
// },
|
|
40
|
-
butThen: async function (s) {
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
butThen: async function (s, thenCB, tr) {
|
|
48
|
+
console.log("butThen", thenCB.toString());
|
|
49
|
+
// debugger
|
|
50
|
+
return thenCB(s);
|
|
43
51
|
},
|
|
44
52
|
afterEach: async function (store, ndx, artificer) {
|
|
45
53
|
// console.log("afterEach", store);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Testeranto from "../../../Node";
|
|
2
|
-
import { testInterface } from ".";
|
|
1
|
+
import Testeranto from "../../../Node.js";
|
|
2
|
+
import { testInterface } from "./index.js";
|
|
3
3
|
export default (testImplementations, testSpecifications, testInput) => Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Testeranto from "../../../Web";
|
|
2
|
-
import { testInterface } from ".";
|
|
1
|
+
import Testeranto from "../../../Web.js";
|
|
2
|
+
import { testInterface } from "./index.js";
|
|
3
3
|
export default (testImplementations, testSpecifications, testInput) => Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import test from "../../../Node";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import renderer, { act } from "react-test-renderer";
|
|
3
|
+
import test from "../../../Node.js";
|
|
4
4
|
export default (testImplementations, testSpecifications, testInput) => test(testInput, testSpecifications, testImplementations, {
|
|
5
5
|
beforeEach: function (CComponent, props) {
|
|
6
6
|
return new Promise((res, rej) => {
|
|
@@ -11,8 +11,8 @@ export default (testImplementations, testSpecifications, testInput) => test(test
|
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
13
|
},
|
|
14
|
-
andWhen: async function (renderer,
|
|
15
|
-
await act(() =>
|
|
14
|
+
andWhen: async function (renderer, whenCB) {
|
|
15
|
+
await act(() => whenCB()(renderer));
|
|
16
16
|
return renderer;
|
|
17
17
|
},
|
|
18
18
|
afterEach: async (store, key, artificer) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import test from "../../../Web";
|
|
1
|
+
import test from "../../../Web.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import renderer, { act } from "react-test-renderer";
|
|
4
4
|
export default (testImplementations, testSpecifications, testInput) => test(testInput, testSpecifications, testImplementations, {
|
|
@@ -11,8 +11,8 @@ export default (testImplementations, testSpecifications, testInput) => test(test
|
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
13
|
},
|
|
14
|
-
andWhen: async function (renderer,
|
|
15
|
-
await act(() =>
|
|
14
|
+
andWhen: async function (renderer, whenCB) {
|
|
15
|
+
await act(() => whenCB()(renderer));
|
|
16
16
|
return renderer;
|
|
17
17
|
},
|
|
18
18
|
afterEach: async (store, key, artificer) => {
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import renderer, { act } from "react-test-renderer";
|
|
3
3
|
export const testInterface = {
|
|
4
|
+
butThen: async function (s, thenCB, tr) {
|
|
5
|
+
console.log("butThen", thenCB.toString());
|
|
6
|
+
// debugger
|
|
7
|
+
return thenCB(s);
|
|
8
|
+
},
|
|
4
9
|
beforeEach: function (CComponent, props) {
|
|
10
|
+
console.log("ASDASDx");
|
|
5
11
|
let component;
|
|
6
12
|
act(() => {
|
|
7
13
|
component = renderer.create(React.createElement(CComponent, props, []));
|
|
8
14
|
});
|
|
9
15
|
return component;
|
|
10
16
|
},
|
|
11
|
-
andWhen: async function (renderer,
|
|
12
|
-
await act(() =>
|
|
17
|
+
andWhen: async function (renderer, whenCB) {
|
|
18
|
+
await act(() => whenCB(renderer));
|
|
13
19
|
return renderer;
|
|
14
20
|
}
|
|
15
21
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import test from "../../../Node.js";
|
|
2
|
+
import { testInterface } from "./index.js";
|
|
3
|
+
export default (testImplementations, testSpecifications, testInput, testInterface2 = testInterface) => {
|
|
4
|
+
return test(testInput, testSpecifications, testImplementations, testInterface2);
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { testInterface } from "./index.js";
|
|
2
|
+
import test from "../../../Web.js";
|
|
3
|
+
export default (testImplementations, testSpecifications, testInput, testInterface2 = testInterface) => {
|
|
4
|
+
return test(testInput, testSpecifications, testImplementations, testInterface2);
|
|
5
|
+
};
|
|
@@ -9,8 +9,8 @@ export const testInterface = {
|
|
|
9
9
|
res(component);
|
|
10
10
|
});
|
|
11
11
|
},
|
|
12
|
-
andWhen: async function (renderer,
|
|
13
|
-
await act(() =>
|
|
12
|
+
andWhen: async function (renderer, whenCB) {
|
|
13
|
+
await act(() => whenCB()(renderer));
|
|
14
14
|
return renderer;
|
|
15
15
|
}
|
|
16
16
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { testInterface } from ".";
|
|
1
2
|
import test from "../../../Node";
|
|
2
|
-
import { testInterface } from "./index";
|
|
3
3
|
export default (testImplementations, testSpecifications, testInput) => {
|
|
4
4
|
return test(testInput, testSpecifications, testImplementations, testInterface);
|
|
5
5
|
};
|
package/dist/module/Types.js
CHANGED
|
@@ -1 +1,30 @@
|
|
|
1
|
-
export {
|
|
1
|
+
// export class TPage extends Page {
|
|
2
|
+
// // screenshot(options?: puppeteer.ScreenshotOptions) {
|
|
3
|
+
// // return super.screenshot({
|
|
4
|
+
// // ...options,
|
|
5
|
+
// // path: "dist/" + (options ? options : { path: "" }).path,
|
|
6
|
+
// // });
|
|
7
|
+
// // }
|
|
8
|
+
// }
|
|
9
|
+
export class TBrowser {
|
|
10
|
+
constructor(browser) {
|
|
11
|
+
this.browser = browser;
|
|
12
|
+
}
|
|
13
|
+
pages() {
|
|
14
|
+
return new Promise(async (res, rej) => {
|
|
15
|
+
res((await this.browser.pages()).map((p) => {
|
|
16
|
+
// const handler = {
|
|
17
|
+
// apply: function (target, thisArg, argumentsList) {
|
|
18
|
+
// console.log('screenshot was called with ' + JSON.stringify(argumentsList));
|
|
19
|
+
// const x: ScreenshotOptions = argumentsList[0]
|
|
20
|
+
// x.path = "./dist/" + x.path;
|
|
21
|
+
// console.log('x.path' + x.path, target, thisArg);
|
|
22
|
+
// return target(...argumentsList);
|
|
23
|
+
// }
|
|
24
|
+
// };
|
|
25
|
+
// p.screenshot = new Proxy(p.screenshot, handler);
|
|
26
|
+
return p;
|
|
27
|
+
}));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
package/dist/module/Web.js
CHANGED
|
@@ -1,118 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
const receiveTestResourceConfigScheduled = async (t, testresource) => {
|
|
18
|
-
const { failed, artifacts, logPromise } = await t.receiveTestResourceConfig(testresource);
|
|
19
|
-
webSocket.send(JSON.stringify({
|
|
20
|
-
type: "testeranto:adios",
|
|
21
|
-
data: {
|
|
22
|
-
failed,
|
|
23
|
-
testResourceConfiguration: t.test.testResourceConfiguration,
|
|
24
|
-
results: t.toObj(),
|
|
25
|
-
},
|
|
26
|
-
}));
|
|
27
|
-
Promise.all([...artifacts, logPromise]).then(async () => {
|
|
28
|
-
// ipcRenderer.invoke('quit-app', failed);
|
|
29
|
-
window.exit(failed);
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
export default async (input, testSpecification, testImplementation, testInterface, testResourceRequirement = defaultTestResourceRequirement) => {
|
|
33
|
-
console.log("web NodeWriter", window.NodeWriter);
|
|
34
|
-
const mrt = new TesterantoLevelTwo(input, testSpecification, testImplementation, testInterface, testResourceRequirement, testInterface.assertioner || (async (t) => t), testInterface.beforeEach ||
|
|
35
|
-
async function (subject, initialValues, testResource) {
|
|
36
|
-
return subject;
|
|
37
|
-
}, testInterface.afterEach || (async (s) => s), testInterface.afterAll || ((store) => undefined), testInterface.butThen || (async (a) => a), testInterface.andWhen, testInterface.actionHandler ||
|
|
38
|
-
function (b) {
|
|
39
|
-
return b;
|
|
40
|
-
}, window.NodeWriter);
|
|
41
|
-
const tl2 = mrt;
|
|
42
|
-
const t = tl2.testJobs[0];
|
|
43
|
-
const testResourceArg = decodeURIComponent(new URLSearchParams(location.search).get('requesting') || '');
|
|
44
|
-
try {
|
|
45
|
-
const partialTestResource = JSON.parse(testResourceArg);
|
|
46
|
-
console.log("initial test resource", partialTestResource);
|
|
47
|
-
if (partialTestResource.scheduled) {
|
|
48
|
-
console.log("test is scheduled");
|
|
49
|
-
console.log("awaiting test resources via WS...");
|
|
50
|
-
webSocket.addEventListener("open", (event) => {
|
|
51
|
-
webSocket.addEventListener("message", (event) => {
|
|
52
|
-
console.log("Message from server ", event.data);
|
|
53
|
-
});
|
|
54
|
-
const r = JSON.stringify({
|
|
55
|
-
type: "testeranto:hola",
|
|
56
|
-
data: {
|
|
57
|
-
requirement: Object.assign(Object.assign({}, testResourceRequirement), { name: partialTestResource.name })
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
webSocket.send(r);
|
|
61
|
-
console.log("awaiting test resources via websocket...", r);
|
|
62
|
-
webSocket.onmessage = (async (msg) => {
|
|
63
|
-
console.log("message: ", msg);
|
|
64
|
-
const resourcesFromWs = JSON.parse(msg.data);
|
|
65
|
-
console.log("secondary test resource", resourcesFromWs);
|
|
66
|
-
const secondTestResource = Object.assign(Object.assign({ fs: "." }, JSON.parse(JSON.stringify(partialTestResource))), JSON.parse(JSON.stringify(resourcesFromWs)));
|
|
67
|
-
console.log("final test resource", secondTestResource);
|
|
68
|
-
receiveTestResourceConfigScheduled(t, secondTestResource);
|
|
69
|
-
});
|
|
70
|
-
});
|
|
1
|
+
import Testeranto from "./lib/core.js";
|
|
2
|
+
import { defaultTestResourceRequirement } from "./lib/index.js";
|
|
3
|
+
const remote = require('@electron/remote');
|
|
4
|
+
class WebTesteranto extends Testeranto {
|
|
5
|
+
constructor(input, testSpecification, testImplementation, testResourceRequirement, testInterface) {
|
|
6
|
+
super(input, testSpecification, testImplementation, testResourceRequirement, window.NodeWriter, testInterface);
|
|
7
|
+
if (process.argv[2]) {
|
|
8
|
+
const testResourceArg = decodeURIComponent(new URLSearchParams(location.search).get('requesting') || '');
|
|
9
|
+
try {
|
|
10
|
+
const partialTestResource = JSON.parse(testResourceArg);
|
|
11
|
+
this.receiveTestResourceConfig(this.testJobs[0], partialTestResource);
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
console.error(e);
|
|
15
|
+
// process.exit(-1);
|
|
16
|
+
}
|
|
71
17
|
}
|
|
72
18
|
else {
|
|
73
|
-
|
|
19
|
+
// no-op
|
|
20
|
+
}
|
|
21
|
+
const requesting = new URLSearchParams(location.search).get('requesting');
|
|
22
|
+
if (requesting) {
|
|
23
|
+
const testResourceArg = decodeURIComponent(requesting);
|
|
24
|
+
try {
|
|
25
|
+
const partialTestResource = JSON.parse(testResourceArg);
|
|
26
|
+
console.log("initial test resource", partialTestResource);
|
|
27
|
+
this.receiveTestResourceConfig(this.testJobs[0], partialTestResource);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
console.error(e);
|
|
31
|
+
// process.exit(-1);
|
|
32
|
+
}
|
|
74
33
|
}
|
|
75
|
-
// const
|
|
76
|
-
// testResourceArg
|
|
77
|
-
// ) as ITTestResourceConfiguration;
|
|
78
|
-
// if (partialTestResource.fs && partialTestResource.ports) {
|
|
79
|
-
// receiveTestResourceConfig(t, partialTestResource);
|
|
80
|
-
// } else {
|
|
81
|
-
// console.log("test configuration is incomplete", partialTestResource);
|
|
82
|
-
// console.log(
|
|
83
|
-
// "requesting test resources via ws",
|
|
84
|
-
// testResourceRequirement
|
|
85
|
-
// );
|
|
86
|
-
// webSocket.addEventListener("open", (event) => {
|
|
87
|
-
// webSocket.addEventListener("message", (event) => {
|
|
88
|
-
// console.log("Message from server ", event.data);
|
|
89
|
-
// });
|
|
90
|
-
// const r = JSON.stringify({
|
|
91
|
-
// type: "testeranto:hola",
|
|
92
|
-
// data: {
|
|
93
|
-
// testResourceRequirement,
|
|
94
|
-
// },
|
|
95
|
-
// });
|
|
96
|
-
// webSocket.send(r);
|
|
97
|
-
// console.log("awaiting test resources via websocket...", r);
|
|
98
|
-
// webSocket.onmessage = (
|
|
99
|
-
// async (msg: MessageEvent<any>) => {
|
|
100
|
-
// console.log("message: ", msg);
|
|
101
|
-
// const resourcesFromPm2 = msg.data.testResourceConfiguration;
|
|
102
|
-
// const secondTestResource = {
|
|
103
|
-
// fs: ".",
|
|
104
|
-
// ...JSON.parse(JSON.stringify(partialTestResource)),
|
|
105
|
-
// ...JSON.parse(JSON.stringify(resourcesFromPm2)),
|
|
106
|
-
// } as ITTestResourceConfiguration;
|
|
107
|
-
// console.log("secondTestResource", secondTestResource);
|
|
108
|
-
// receiveTestResourceConfig(t, secondTestResource);
|
|
109
|
-
// }
|
|
110
|
-
// );
|
|
111
|
-
// });
|
|
112
|
-
// }
|
|
34
|
+
// const t: ITestJob = this.testJobs[0];
|
|
113
35
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
36
|
+
async receiveTestResourceConfig(t, partialTestResource) {
|
|
37
|
+
const { failed, artifacts, logPromise } = await t.receiveTestResourceConfig(partialTestResource, remote);
|
|
38
|
+
Promise.all([...artifacts, logPromise]).then(async () => {
|
|
39
|
+
var window = remote.getCurrentWindow();
|
|
40
|
+
// window.close();
|
|
41
|
+
});
|
|
117
42
|
}
|
|
43
|
+
}
|
|
44
|
+
;
|
|
45
|
+
export default async (input, testSpecification, testImplementation, testInterface, testResourceRequirement = defaultTestResourceRequirement) => {
|
|
46
|
+
return new WebTesteranto(input, testSpecification, testImplementation, testResourceRequirement, testInterface);
|
|
118
47
|
};
|