testeranto 0.167.0 → 0.172.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/NavBar.js +45 -0
- package/dist/common/src/PM/main.js +81 -59
- package/dist/common/src/Pure.js +16 -14
- package/dist/common/src/ReportServer.js +48 -5
- package/dist/common/src/Web.js +35 -20
- package/dist/common/src/components/SunriseAnimation.test/implementation.js +1 -0
- package/dist/common/src/components/SunriseAnimation.test/index.js +1 -0
- package/dist/common/src/components/SunriseAnimation.test/interface.js +1 -0
- package/dist/common/src/components/SunriseAnimation.test/specification.js +1 -0
- package/dist/common/src/components/TestStatusBadge.js +55 -0
- package/dist/common/src/components/pure/ProjectPageView.js +204 -0
- package/dist/common/src/components/pure/ProjectPageView.test/adapter.js +20 -0
- package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +71 -0
- package/dist/common/src/components/pure/ProjectPageView.test/index.js +10 -0
- package/dist/common/src/components/pure/ProjectPageView.test/specification.js +19 -0
- package/dist/common/src/components/pure/ProjectPageView.test/types.js +2 -0
- package/dist/common/src/lib/BaseSuite.js +3 -3
- package/dist/common/src/lib/BaseSuite.test/test.js +1 -1
- package/dist/common/src/lib/abstractBase.js +41 -14
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +1 -1
- package/dist/common/src/lib/pmProxy.js +185 -64
- package/dist/common/testeranto.config.js +6 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/App.js +3 -3
- package/dist/module/src/PM/main.js +81 -59
- package/dist/module/src/ProjectsPage.js +1 -110
- package/dist/module/src/Pure.js +16 -14
- package/dist/module/src/ReportServer.js +48 -5
- package/dist/module/src/TestPage.js +45 -16
- package/dist/module/src/Web.js +35 -20
- package/dist/module/src/components/SunriseAnimation.test/implementation.js +1 -0
- package/dist/module/src/components/SunriseAnimation.test/index.js +1 -0
- package/dist/module/src/components/SunriseAnimation.test/interface.js +1 -0
- package/dist/module/src/components/SunriseAnimation.test/specification.js +1 -0
- package/dist/module/src/components/pure/ProjectPageView.js +197 -0
- package/dist/module/src/components/pure/ProjectPageView.test/adapter.js +17 -0
- package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +68 -0
- package/dist/module/src/components/pure/ProjectPageView.test/index.js +5 -0
- package/dist/module/src/components/pure/ProjectPageView.test/specification.js +15 -0
- package/dist/module/src/components/pure/ProjectPageView.test/types.js +1 -0
- package/dist/module/src/components/pure/ProjectsPageView.js +58 -0
- package/dist/module/src/components/pure/TestPageView.js +136 -0
- package/dist/module/src/components/stateful/ProjectPage.js +63 -0
- package/dist/module/src/components/stateful/ProjectsPage.js +55 -0
- package/dist/module/src/components/stateful/TestPage.js +82 -0
- package/dist/module/src/lib/BaseSuite.js +3 -3
- package/dist/module/src/lib/BaseSuite.test/test.js +1 -1
- package/dist/module/src/lib/abstractBase.js +41 -14
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +1 -1
- package/dist/module/src/lib/pmProxy.js +185 -64
- package/dist/module/testeranto.config.js +6 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/App.css +13 -9
- package/dist/prebuild/App.js +600 -551
- package/dist/prebuild/ReportServer.mjs +44 -4
- package/dist/prebuild/run.mjs +67 -39
- package/dist/types/src/NavBar.d.ts +19 -0
- package/dist/types/src/PM/index.d.ts +3 -1
- package/dist/types/src/PM/main.d.ts +0 -4
- package/dist/types/src/PM/node.d.ts +2 -2
- package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -0
- package/dist/types/src/components/SunriseAnimation.test/specification.d.ts +0 -0
- package/dist/types/src/components/TestStatusBadge.d.ts +15 -0
- package/dist/types/src/components/pure/ProjectPageView.d.ts +14 -0
- package/dist/types/src/components/pure/ProjectPageView.test/adapter.d.ts +3 -0
- package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +3 -0
- package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +2 -0
- package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +3 -0
- package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +39 -0
- package/dist/types/src/lib/BaseSuite.d.ts +2 -0
- package/dist/types/src/lib/abstractBase.d.ts +12 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/src/App.tsx +5 -9
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +87 -82
- package/src/PM/node.ts +2 -2
- package/src/ProjectsPage.tsx +1 -164
- package/src/Pure.ts +16 -16
- package/src/ReportServer.ts +49 -6
- package/src/TestPage.tsx +78 -5
- package/src/Web.ts +35 -35
- package/src/components/SunriseAnimation.test/implementation.ts +0 -0
- package/src/components/SunriseAnimation.test/index.ts +0 -0
- package/src/components/SunriseAnimation.test/interface.ts +0 -0
- package/src/components/SunriseAnimation.test/specification.ts +0 -0
- package/src/components/pure/ProjectPageView.test/adapter.ts +21 -0
- package/src/components/pure/ProjectPageView.test/implementation.tsx +84 -0
- package/src/components/pure/ProjectPageView.test/index.ts +8 -0
- package/src/components/pure/ProjectPageView.test/specification.ts +31 -0
- package/src/components/pure/ProjectPageView.test/types.ts +55 -0
- package/src/components/pure/ProjectPageView.tsx +332 -0
- package/src/components/pure/ProjectsPageView.tsx +99 -0
- package/src/components/pure/TestPageView.tsx +278 -0
- package/src/components/stateful/ProjectPage.tsx +83 -0
- package/src/components/stateful/ProjectsPage.tsx +73 -0
- package/src/components/stateful/TestPage.tsx +107 -0
- package/src/lib/BaseSuite.test/test.ts +1 -1
- package/src/lib/BaseSuite.ts +9 -4
- package/src/lib/abstractBase.ts +45 -14
- package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +1 -1
- package/src/lib/pmProxy.ts +184 -87
- package/testeranto/App.css +13 -9
- package/testeranto/App.js +600 -551
- package/testeranto/bundles/node/allTests/{chunk-4ONUZRZ4.mjs → chunk-3EUGBAOM.mjs} +1 -1
- package/testeranto/bundles/node/allTests/{chunk-IDCUSTSM.mjs → chunk-E75CSRER.mjs} +246 -115
- package/testeranto/bundles/node/allTests/{chunk-NQEP7SN4.mjs → chunk-M6DO7VMB.mjs} +1 -1
- package/testeranto/bundles/node/allTests/metafile.json +37 -37
- package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +4 -4
- package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +3 -3
- package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +3 -3
- package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +2 -17
- package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +354 -252
- package/testeranto/bundles/pure/allTests/{chunk-5SBJWHSZ.mjs → chunk-KHDVEHF7.mjs} +2 -17
- package/testeranto/bundles/pure/allTests/{chunk-4ULDTZFU.mjs → chunk-VMUSFSZM.mjs} +246 -115
- package/testeranto/bundles/pure/allTests/metafile.json +72 -42
- package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +2 -2
- package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +3 -3
- package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +2 -29
- package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +2283 -0
- package/testeranto/bundles/web/allTests/{chunk-46E6YGGN.mjs → chunk-U7AW26HL.mjs} +292 -142
- package/testeranto/bundles/web/allTests/metafile.json +22 -943
- package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.html +19 -0
- package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.mjs +37524 -0
- package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +20 -2
- package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +26 -2
- package/testeranto/reports/allTests/config.json +8 -0
- package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +9 -3
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +1 -0
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +13 -0
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +50 -0
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +17 -0
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +32 -0
- package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +68 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +22 -39
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +6 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +8 -1
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +6 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +9 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +66 -55
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +2 -2
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +6 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +10 -5
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +16 -48
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +18 -9
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +8 -1
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +10 -5
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +62 -33
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +2 -2
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +18 -9
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +10 -5
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +37 -50
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +36 -18
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +8 -1
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +2 -2
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +9 -3
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +28 -43
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +28 -14
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +8 -1
- package/testeranto/reports/allTests/summary.json +15 -8
- package/testeranto/reportsnode_build_errors +20 -0
- package/testeranto/reportspure_build_errors +343 -0
- package/testeranto/reportsweb_build_errors +25 -0
- package/testeranto.config.ts +7 -0
- package/tsc.log +100 -26
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/testeranto/bundles/node/allTests/chunk-FFBRDUBH.mjs +0 -677
- package/testeranto/bundles/node/allTests/chunk-H2IBV7SY.mjs +0 -113
- package/testeranto/bundles/node/allTests/chunk-ZHOULXPN.mjs +0 -252
- package/testeranto/bundles/pure/allTests/chunk-CSMXYJ65.mjs +0 -200
- package/testeranto/bundles/pure/allTests/chunk-QK4IXLF6.mjs +0 -674
- package/testeranto/bundles/web/allTests/chunk-TU3MJSSI.mjs +0 -855
- package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test/manifest.json +0 -1
- package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/manifest.json +0 -1
- package/testeranto/reports/allTests/src/Pure.test/pure/manifest.json +0 -1
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/manifest.json +0 -1
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/manifest.json +0 -1
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/manifest.json +0 -1
- package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/manifest.json +0 -1
- package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/manifest.json +0 -1
- package/testeranto/reports/allTests/src/lib/core.test/core.test/node/manifest.json +0 -1
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/manifest.json +0 -1
- /package/{testeranto/reports/allTests/src/Pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/implementation.d.ts} +0 -0
- /package/{testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/index.d.ts} +0 -0
|
@@ -43,10 +43,50 @@ var server = http.createServer((req, res) => {
|
|
|
43
43
|
const filePath = path.join(process.cwd(), req.url || "");
|
|
44
44
|
fs.stat(filePath, (err, stats) => {
|
|
45
45
|
if (err || !stats.isFile()) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
fs.stat(filePath, (dirErr, dirStats) => {
|
|
47
|
+
if (!dirErr && dirStats.isDirectory()) {
|
|
48
|
+
fs.readdir(filePath, (readErr, files) => {
|
|
49
|
+
if (readErr) {
|
|
50
|
+
res.writeHead(500);
|
|
51
|
+
return res.end("Error reading directory");
|
|
52
|
+
}
|
|
53
|
+
res.writeHead(200, { "Content-Type": "text/html" });
|
|
54
|
+
res.write(`
|
|
55
|
+
<html>
|
|
56
|
+
<head>
|
|
57
|
+
<title>Directory Listing: ${req.url}</title>
|
|
58
|
+
<style>
|
|
59
|
+
body { font-family: sans-serif; margin: 2rem; }
|
|
60
|
+
h1 { color: #333; }
|
|
61
|
+
ul { list-style: none; padding: 0; }
|
|
62
|
+
li { padding: 0.5rem; }
|
|
63
|
+
li a { color: #0366d6; text-decoration: none; }
|
|
64
|
+
li a:hover { text-decoration: underline; }
|
|
65
|
+
</style>
|
|
66
|
+
</head>
|
|
67
|
+
<body>
|
|
68
|
+
<h1>Directory: ${req.url}</h1>
|
|
69
|
+
<ul>
|
|
70
|
+
${files.map((file) => `
|
|
71
|
+
<li>
|
|
72
|
+
<a href="${path.join(req.url || "", file)}">
|
|
73
|
+
${file}${file.endsWith("/") ? "/" : ""}
|
|
74
|
+
</a>
|
|
75
|
+
</li>
|
|
76
|
+
`).join("")}
|
|
77
|
+
</ul>
|
|
78
|
+
</body>
|
|
79
|
+
</html>
|
|
80
|
+
`);
|
|
81
|
+
res.end();
|
|
82
|
+
});
|
|
83
|
+
} else {
|
|
84
|
+
if (!res.headersSent) {
|
|
85
|
+
res.writeHead(404, { "Content-Type": "text/plain" });
|
|
86
|
+
res.end("File not found");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
50
90
|
return;
|
|
51
91
|
}
|
|
52
92
|
const serve = () => {
|
package/dist/prebuild/run.mjs
CHANGED
|
@@ -773,47 +773,43 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
773
773
|
process.exit(-1);
|
|
774
774
|
}
|
|
775
775
|
const builtfile = dest;
|
|
776
|
-
const webSideCares = [];
|
|
777
776
|
try {
|
|
778
777
|
await import(`${builtfile}?cacheBust=${Date.now()}`).then((module) => {
|
|
779
778
|
return module.default.then((defaultModule) => {
|
|
780
779
|
defaultModule.receiveTestResourceConfig(argz).then(async (results) => {
|
|
781
780
|
statusMessagePretty(results.fails, src, "pure");
|
|
782
781
|
this.bddTestIsNowDone(src, results.fails);
|
|
783
|
-
}).catch((
|
|
782
|
+
}).catch((e1) => {
|
|
784
783
|
console.log(
|
|
785
|
-
ansiC2.red(`launchPure - ${src} errored with: ${
|
|
784
|
+
ansiC2.red(`launchPure - ${src} errored with: ${e1}`)
|
|
786
785
|
);
|
|
787
786
|
this.bddTestIsNowDone(src, -1);
|
|
787
|
+
statusMessagePretty(-1, src, "pure");
|
|
788
788
|
});
|
|
789
|
-
}).catch((
|
|
789
|
+
}).catch((e2) => {
|
|
790
790
|
console.log(
|
|
791
791
|
ansiColors.red(
|
|
792
792
|
`pure ! ${src} failed to execute. No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`
|
|
793
793
|
)
|
|
794
794
|
);
|
|
795
|
-
this.writeFileSync(`${reportDest}/logs.txt`,
|
|
795
|
+
this.writeFileSync(`${reportDest}/logs.txt`, e2.stack, src);
|
|
796
796
|
this.bddTestIsNowDone(src, -1);
|
|
797
797
|
statusMessagePretty(-1, src, "pure");
|
|
798
798
|
}).finally((x) => {
|
|
799
|
-
const fileSet = files2[src] || /* @__PURE__ */ new Set();
|
|
800
|
-
fs3.writeFileSync(
|
|
801
|
-
reportDest + "/manifest.json",
|
|
802
|
-
JSON.stringify(Array.from(fileSet))
|
|
803
|
-
);
|
|
804
799
|
});
|
|
805
800
|
});
|
|
806
|
-
} catch (
|
|
801
|
+
} catch (e3) {
|
|
807
802
|
console.log(
|
|
808
803
|
ansiC2.red(
|
|
809
804
|
ansiC2.inverse(
|
|
810
|
-
`${src} 1 errored with: ${
|
|
805
|
+
`${src} 1 errored with: ${e3}. Check ${reportDest}/logs.txt for more info`
|
|
811
806
|
)
|
|
812
807
|
)
|
|
813
808
|
);
|
|
814
|
-
this.writeFileSync(`${reportDest}/logs.txt`,
|
|
809
|
+
this.writeFileSync(`${reportDest}/logs.txt`, e3.stack, src);
|
|
815
810
|
this.bddTestIsNowDone(src, -1);
|
|
816
811
|
statusMessagePretty(-1, src, "pure");
|
|
812
|
+
console.log("III) PURE IS EXITING BADLY WITH error", e3);
|
|
817
813
|
}
|
|
818
814
|
for (let i = 0; i <= portsToUse.length; i++) {
|
|
819
815
|
if (portsToUse[i]) {
|
|
@@ -941,15 +937,10 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
941
937
|
child.on("error", (err) => {
|
|
942
938
|
});
|
|
943
939
|
child.on("close", (code) => {
|
|
944
|
-
oStream.close();
|
|
945
940
|
server.close();
|
|
946
941
|
if (!files2[src]) {
|
|
947
942
|
files2[src] = /* @__PURE__ */ new Set();
|
|
948
943
|
}
|
|
949
|
-
fs3.writeFileSync(
|
|
950
|
-
reportDest + "/manifest.json",
|
|
951
|
-
JSON.stringify(Array.from(files2[src]))
|
|
952
|
-
);
|
|
953
944
|
if (code === 255) {
|
|
954
945
|
console.log(
|
|
955
946
|
ansiColors.red(
|
|
@@ -958,6 +949,8 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
958
949
|
);
|
|
959
950
|
this.bddTestIsNowDone(src, -1);
|
|
960
951
|
statusMessagePretty(-1, src, "node");
|
|
952
|
+
oStream.close();
|
|
953
|
+
return;
|
|
961
954
|
} else if (code === 0) {
|
|
962
955
|
this.bddTestIsNowDone(src, 0);
|
|
963
956
|
statusMessagePretty(0, src, "node");
|
|
@@ -1008,10 +1001,6 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
1008
1001
|
if (!files2[src]) {
|
|
1009
1002
|
files2[src] = /* @__PURE__ */ new Set();
|
|
1010
1003
|
}
|
|
1011
|
-
fs3.writeFileSync(
|
|
1012
|
-
destFolder + "/manifest.json",
|
|
1013
|
-
JSON.stringify(Array.from(files2[src]))
|
|
1014
|
-
);
|
|
1015
1004
|
delete files2[src];
|
|
1016
1005
|
Promise.all(screenshots2[src] || []).then(() => {
|
|
1017
1006
|
delete screenshots2[src];
|
|
@@ -1281,7 +1270,7 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
1281
1270
|
try {
|
|
1282
1271
|
return await (await x.default).receiveTestResourceConfig(${webArgz})
|
|
1283
1272
|
} catch (e) {
|
|
1284
|
-
console.log("
|
|
1273
|
+
console.log("web run failure", e.toString())
|
|
1285
1274
|
}
|
|
1286
1275
|
})`;
|
|
1287
1276
|
const ofile = `${reportDest}/logs.txt`;
|
|
@@ -1306,21 +1295,19 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
1306
1295
|
if (!files2[src]) {
|
|
1307
1296
|
files2[src] = /* @__PURE__ */ new Set();
|
|
1308
1297
|
}
|
|
1309
|
-
fs3.writeFileSync(
|
|
1310
|
-
destFolder + "/manifest.json",
|
|
1311
|
-
JSON.stringify(Array.from(files2[src]))
|
|
1312
|
-
);
|
|
1313
1298
|
delete files2[src];
|
|
1314
1299
|
Promise.all(screenshots2[src] || []).then(() => {
|
|
1315
1300
|
delete screenshots2[src];
|
|
1316
1301
|
page.close();
|
|
1317
1302
|
oStream.close();
|
|
1318
1303
|
});
|
|
1304
|
+
console.log("ostream is closed");
|
|
1305
|
+
return;
|
|
1319
1306
|
};
|
|
1320
1307
|
page.on("pageerror", (err) => {
|
|
1321
1308
|
console.log(
|
|
1322
1309
|
ansiColors.red(
|
|
1323
|
-
`web ! ${src} failed to execute
|
|
1310
|
+
`web ! ${src} failed to execute No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`
|
|
1324
1311
|
)
|
|
1325
1312
|
);
|
|
1326
1313
|
oStream.write(err.name);
|
|
@@ -1341,20 +1328,33 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
1341
1328
|
close();
|
|
1342
1329
|
});
|
|
1343
1330
|
page.on("console", (log) => {
|
|
1344
|
-
|
|
1345
|
-
oStream.
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1331
|
+
console.log("console message: ", log.text());
|
|
1332
|
+
if (oStream.closed) {
|
|
1333
|
+
console.log("missed console message: ", log.text());
|
|
1334
|
+
return;
|
|
1335
|
+
} else {
|
|
1336
|
+
oStream.write(log.text());
|
|
1337
|
+
oStream.write("\n");
|
|
1338
|
+
oStream.write(JSON.stringify(log.location()));
|
|
1339
|
+
oStream.write("\n");
|
|
1340
|
+
oStream.write(JSON.stringify(log.stackTrace()));
|
|
1341
|
+
oStream.write("\n");
|
|
1342
|
+
}
|
|
1350
1343
|
});
|
|
1351
1344
|
await page.goto(`file://${`${destFolder}.html`}`, {});
|
|
1352
|
-
this.webSidecars[Math.random()] = page.mainFrame()._id;
|
|
1353
1345
|
await page.evaluate(evaluation).then(async ({ fails, failed, features }) => {
|
|
1354
1346
|
statusMessagePretty(fails, src, "web");
|
|
1355
1347
|
this.bddTestIsNowDone(src, fails);
|
|
1356
1348
|
close();
|
|
1357
1349
|
}).catch((e) => {
|
|
1350
|
+
console.log(ansiC2.red(ansiC2.inverse(e)));
|
|
1351
|
+
console.log(
|
|
1352
|
+
ansiC2.red(
|
|
1353
|
+
ansiC2.inverse(
|
|
1354
|
+
`web ! ${src} failed to execute. No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`
|
|
1355
|
+
)
|
|
1356
|
+
)
|
|
1357
|
+
);
|
|
1358
1358
|
this.bddTestIsNowDone(src, -1);
|
|
1359
1359
|
}).finally(() => {
|
|
1360
1360
|
});
|
|
@@ -1554,9 +1554,9 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
1554
1554
|
slowMo: 1,
|
|
1555
1555
|
waitForInitialPage: false,
|
|
1556
1556
|
executablePath,
|
|
1557
|
-
headless:
|
|
1557
|
+
headless: false,
|
|
1558
1558
|
dumpio: false,
|
|
1559
|
-
devtools:
|
|
1559
|
+
devtools: true,
|
|
1560
1560
|
args: [
|
|
1561
1561
|
"--disable-features=site-per-process",
|
|
1562
1562
|
"--allow-file-access-from-files",
|
|
@@ -1657,8 +1657,36 @@ var PM_Main = class extends PM_WithEslintAndTsc {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
);
|
|
1659
1659
|
}
|
|
1660
|
-
async launchExternalTest(
|
|
1661
|
-
|
|
1660
|
+
// async launchExternalTest(
|
|
1661
|
+
// externalTestName: string,
|
|
1662
|
+
// externalTest: {
|
|
1663
|
+
// watch: string[];
|
|
1664
|
+
// exec: string;
|
|
1665
|
+
// }
|
|
1666
|
+
// ) {
|
|
1667
|
+
// // fs.mkdirSync(`testeranto/externalTests/${externalTestName}`);
|
|
1668
|
+
// // exec(externalTest.exec, (error, stdout, stderr) => {
|
|
1669
|
+
// // if (error) {
|
|
1670
|
+
// // fs.writeFileSync(
|
|
1671
|
+
// // `testeranto/externalTests/${externalTestName}/exitcode.txt`,
|
|
1672
|
+
// // `${error.name}\n${error.message}\n${error.code}\n`
|
|
1673
|
+
// // );
|
|
1674
|
+
// // } else {
|
|
1675
|
+
// // fs.writeFileSync(
|
|
1676
|
+
// // `testeranto/externalTests/${externalTestName}/exitcode.txt`,
|
|
1677
|
+
// // `0`
|
|
1678
|
+
// // );
|
|
1679
|
+
// // }
|
|
1680
|
+
// // fs.writeFileSync(
|
|
1681
|
+
// // `testeranto/externalTests/${externalTestName}/stdout.txt`,
|
|
1682
|
+
// // stdout
|
|
1683
|
+
// // );
|
|
1684
|
+
// // fs.writeFileSync(
|
|
1685
|
+
// // `testeranto/externalTests/${externalTestName}/stderr.txt`,
|
|
1686
|
+
// // stderr
|
|
1687
|
+
// // );
|
|
1688
|
+
// // });
|
|
1689
|
+
// }
|
|
1662
1690
|
async stop() {
|
|
1663
1691
|
console.log(ansiC2.inverse("Testeranto-Run is shutting down gracefully..."));
|
|
1664
1692
|
this.mode = "once";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type NavItem = {
|
|
3
|
+
to?: string;
|
|
4
|
+
label: string | React.ReactNode;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
badge?: {
|
|
8
|
+
variant: string;
|
|
9
|
+
text: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type NavBarProps = {
|
|
13
|
+
title: string;
|
|
14
|
+
backLink?: string;
|
|
15
|
+
navItems?: NavItem[];
|
|
16
|
+
rightContent?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
export declare const NavBar: React.FC<NavBarProps>;
|
|
19
|
+
export {};
|
|
@@ -12,7 +12,9 @@ export declare abstract class PM {
|
|
|
12
12
|
abstract closePage(p: any): any;
|
|
13
13
|
abstract createWriteStream(filepath: string, testName: string): Promise<string>;
|
|
14
14
|
abstract customclose(): any;
|
|
15
|
-
abstract customScreenShot(opts:
|
|
15
|
+
abstract customScreenShot(opts: {
|
|
16
|
+
path: string;
|
|
17
|
+
}, page?: string): any;
|
|
16
18
|
abstract end(uid: number): Promise<boolean>;
|
|
17
19
|
abstract existsSync(fp: string): Promise<boolean>;
|
|
18
20
|
abstract focusOn(selector: string): any;
|
|
@@ -20,10 +20,6 @@ export declare class PM_Main extends PM_WithEslintAndTsc {
|
|
|
20
20
|
launchSideCar(n: number, name: string): Promise<[number, ITTestResourceConfiguration]>;
|
|
21
21
|
mapping(): [string, (...a: any[]) => any][];
|
|
22
22
|
start(): Promise<void>;
|
|
23
|
-
launchExternalTest(externalTestName: string, externalTest: {
|
|
24
|
-
watch: string[];
|
|
25
|
-
exec: string;
|
|
26
|
-
}): Promise<void>;
|
|
27
23
|
stop(): Promise<void>;
|
|
28
24
|
getRunnables: (tests: ITestTypes[], testName: string, payload?: {
|
|
29
25
|
nodeEntryPoints: {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import net from "net";
|
|
2
|
-
import { ScreencastOptions } from "puppeteer-core";
|
|
2
|
+
import { ScreencastOptions, ScreenshotOptions } from "puppeteer-core";
|
|
3
3
|
import { PassThrough } from "stream";
|
|
4
4
|
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
5
5
|
import { PM } from ".";
|
|
@@ -27,7 +27,7 @@ export declare class PM_Node extends PM {
|
|
|
27
27
|
click(selector: string): Promise<unknown>;
|
|
28
28
|
screencast(opts: ScreencastOptions, page: string): Promise<unknown>;
|
|
29
29
|
screencastStop(p: string): Promise<unknown>;
|
|
30
|
-
customScreenShot(x:
|
|
30
|
+
customScreenShot(x: ScreenshotOptions, y?: string): Promise<unknown>;
|
|
31
31
|
existsSync(destFolder: string): Promise<boolean>;
|
|
32
32
|
mkdirSync(): Promise<unknown>;
|
|
33
33
|
write(uid: number, contents: string): Promise<boolean>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type TestStatusBadgeProps = {
|
|
2
|
+
testName: string;
|
|
3
|
+
testsExist?: boolean;
|
|
4
|
+
runTimeErrors: number;
|
|
5
|
+
typeErrors: number;
|
|
6
|
+
staticErrors: number;
|
|
7
|
+
variant?: 'compact' | 'full';
|
|
8
|
+
testData?: {
|
|
9
|
+
fails?: number;
|
|
10
|
+
features?: any[];
|
|
11
|
+
artifacts?: any[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const TestStatusBadge: (props: TestStatusBadgeProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type IProjectPageViewProps = {
|
|
2
|
+
summary: any;
|
|
3
|
+
nodeLogs: any;
|
|
4
|
+
webLogs: any;
|
|
5
|
+
pureLogs: any;
|
|
6
|
+
config: any;
|
|
7
|
+
loading: any;
|
|
8
|
+
error: any;
|
|
9
|
+
projectName: any;
|
|
10
|
+
route: any;
|
|
11
|
+
setRoute: any;
|
|
12
|
+
navigate: any;
|
|
13
|
+
};
|
|
14
|
+
export declare const ProjectPageView: ({ summary, nodeLogs, webLogs, pureLogs, config, loading, error, projectName, route, setRoute, navigate }: IProjectPageViewProps) => JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Ibdd_in, Ibdd_out } from "../../../CoreTypes";
|
|
2
|
+
import { IProjectPageViewProps } from "../ProjectPageView";
|
|
3
|
+
export type I = Ibdd_in<null, IProjectPageViewProps, IProjectPageViewProps & {
|
|
4
|
+
container?: HTMLElement;
|
|
5
|
+
}, IProjectPageViewProps & {
|
|
6
|
+
container?: HTMLElement;
|
|
7
|
+
}, (...args: any[]) => IProjectPageViewProps, () => (props: IProjectPageViewProps, utils: any) => IProjectPageViewProps & {
|
|
8
|
+
container?: HTMLElement;
|
|
9
|
+
}, () => (state: IProjectPageViewProps & {
|
|
10
|
+
container?: HTMLElement;
|
|
11
|
+
}) => IProjectPageViewProps & {
|
|
12
|
+
container?: HTMLElement;
|
|
13
|
+
}>;
|
|
14
|
+
export type O = Ibdd_out<{
|
|
15
|
+
Default: [string];
|
|
16
|
+
}, {
|
|
17
|
+
Default: [];
|
|
18
|
+
WithError: [];
|
|
19
|
+
}, {}, {
|
|
20
|
+
happyPath: [];
|
|
21
|
+
unhappyPath: [];
|
|
22
|
+
}>;
|
|
23
|
+
export type M = {
|
|
24
|
+
givens: {
|
|
25
|
+
[K in keyof O["givens"]]: (...args: any[]) => IProjectPageViewProps;
|
|
26
|
+
};
|
|
27
|
+
whens: {
|
|
28
|
+
[K in keyof O["whens"]]: (...args: any[]) => (props: IProjectPageViewProps, utils: any) => IProjectPageViewProps & {
|
|
29
|
+
container?: HTMLElement;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
thens: {
|
|
33
|
+
[K in keyof O["thens"]]: (...args: any[]) => (state: IProjectPageViewProps & {
|
|
34
|
+
container?: HTMLElement;
|
|
35
|
+
}) => IProjectPageViewProps & {
|
|
36
|
+
container?: HTMLElement;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -21,10 +21,12 @@ export declare abstract class BaseSuite<I extends Ibdd_in_any, O extends Ibdd_ou
|
|
|
21
21
|
thens: {
|
|
22
22
|
name: string;
|
|
23
23
|
error: boolean;
|
|
24
|
+
artifacts: string[];
|
|
24
25
|
}[];
|
|
25
26
|
error: (string | Error | undefined)[] | null;
|
|
26
27
|
failed: boolean;
|
|
27
28
|
features: string[];
|
|
29
|
+
artifacts: string[];
|
|
28
30
|
}[];
|
|
29
31
|
fails: number;
|
|
30
32
|
failed: boolean;
|
|
@@ -15,6 +15,8 @@ export declare abstract class BaseGiven<I extends Ibdd_in_any> {
|
|
|
15
15
|
initialValues: any;
|
|
16
16
|
key: string;
|
|
17
17
|
failed: boolean;
|
|
18
|
+
artifacts: string[];
|
|
19
|
+
protected addArtifact(path: string): void;
|
|
18
20
|
constructor(name: string, features: string[], whens: BaseWhen<I>[], thens: BaseThen<I>[], givenCB: I["given"], initialValues: any);
|
|
19
21
|
beforeAll(store: I["istore"]): I["istore"];
|
|
20
22
|
toObj(): {
|
|
@@ -24,10 +26,12 @@ export declare abstract class BaseGiven<I extends Ibdd_in_any> {
|
|
|
24
26
|
thens: {
|
|
25
27
|
name: string;
|
|
26
28
|
error: boolean;
|
|
29
|
+
artifacts: string[];
|
|
27
30
|
}[];
|
|
28
31
|
error: (string | Error | undefined)[] | null;
|
|
29
32
|
failed: boolean;
|
|
30
33
|
features: string[];
|
|
34
|
+
artifacts: string[];
|
|
31
35
|
};
|
|
32
36
|
abstract givenThat(subject: I["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, givenCB: I["given"], initialValues: any, pm: IPM): Promise<I["istore"]>;
|
|
33
37
|
afterEach(store: I["istore"], key: string, artifactory: ITestArtifactory, pm: IPM): Promise<unknown>;
|
|
@@ -38,11 +42,17 @@ export declare abstract class BaseWhen<I extends Ibdd_in_any> {
|
|
|
38
42
|
name: string;
|
|
39
43
|
whenCB: (x: I["iselection"]) => I["then"];
|
|
40
44
|
error: Error;
|
|
45
|
+
artifacts: string[];
|
|
41
46
|
constructor(name: string, whenCB: (xyz: I["iselection"]) => I["then"]);
|
|
42
47
|
abstract andWhen(store: I["istore"], whenCB: (x: I["iselection"]) => I["then"], testResource: any, pm: IPM): Promise<any>;
|
|
43
48
|
toObj(): {
|
|
44
49
|
name: string;
|
|
45
50
|
error: string;
|
|
51
|
+
artifacts: string[];
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
artifacts: string[];
|
|
55
|
+
error?: undefined;
|
|
46
56
|
};
|
|
47
57
|
test(store: I["istore"], testResourceConfiguration: any, tLog: ITLog, pm: IPM, filepath: string): Promise<any>;
|
|
48
58
|
}
|
|
@@ -50,10 +60,12 @@ export declare abstract class BaseThen<I extends Ibdd_in_any> {
|
|
|
50
60
|
name: string;
|
|
51
61
|
thenCB: (storeState: I["iselection"]) => Promise<I["then"]>;
|
|
52
62
|
error: boolean;
|
|
63
|
+
artifacts: string[];
|
|
53
64
|
constructor(name: string, thenCB: (val: I["iselection"]) => Promise<I["then"]>);
|
|
54
65
|
toObj(): {
|
|
55
66
|
name: string;
|
|
56
67
|
error: boolean;
|
|
68
|
+
artifacts: string[];
|
|
57
69
|
};
|
|
58
70
|
abstract butThen(store: I["istore"], thenCB: (s: I["iselection"]) => Promise<I["isubject"]>, testResourceConfiguration: ITTestResourceConfiguration, pm: IPM, ...args: any[]): Promise<I["iselection"]>;
|
|
59
71
|
test(store: I["istore"], testResourceConfiguration: any, tLog: ITLog, pm: IPM, filepath: string): Promise<I["then"] | undefined>;
|