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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NavBar = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const react_bootstrap_1 = require("react-bootstrap");
|
|
9
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
10
|
+
const NavBar = ({ title, backLink, navItems = [], rightContent }) => {
|
|
11
|
+
return (react_1.default.createElement(react_bootstrap_1.Navbar, { bg: "light", expand: "lg", className: "mb-4", sticky: "top" },
|
|
12
|
+
react_1.default.createElement(react_bootstrap_1.Container, { fluid: true },
|
|
13
|
+
backLink && (react_1.default.createElement(react_bootstrap_1.Nav.Link, { as: react_router_dom_1.Link, to: backLink, className: "me-2 fs-3 text-primary", style: {
|
|
14
|
+
padding: '0.25rem 0.75rem',
|
|
15
|
+
border: '2px solid var(--bs-primary)',
|
|
16
|
+
borderRadius: '50%',
|
|
17
|
+
display: 'inline-flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
width: '2.5rem',
|
|
21
|
+
height: '2.5rem'
|
|
22
|
+
}, title: "Go up one level" }, "\u2191")),
|
|
23
|
+
react_1.default.createElement(react_bootstrap_1.Navbar.Brand, { className: backLink ? 'ms-2' : '' }, title),
|
|
24
|
+
react_1.default.createElement(react_bootstrap_1.Navbar.Toggle, { "aria-controls": "basic-navbar-nav" }),
|
|
25
|
+
react_1.default.createElement(react_bootstrap_1.Navbar.Collapse, { id: "basic-navbar-nav" },
|
|
26
|
+
navItems.length > 0 && (react_1.default.createElement(react_bootstrap_1.Nav, { className: "me-auto" }, navItems.map((item, i) => {
|
|
27
|
+
const className = [
|
|
28
|
+
item.className,
|
|
29
|
+
item.active ? 'text-primary fw-bold border-bottom border-2 border-primary' : '',
|
|
30
|
+
typeof item.label === 'string' && item.label.includes('❌') ? 'text-danger fw-bold' : '',
|
|
31
|
+
typeof item.label === 'string' && item.label.includes('✅') ? 'text-success fw-bold' : '',
|
|
32
|
+
!item.active && typeof item.label !== 'string' ? 'text-secondary' : ''
|
|
33
|
+
].filter(Boolean).join(' ');
|
|
34
|
+
return (react_1.default.createElement(react_bootstrap_1.Nav.Link, { key: i, as: item.to ? react_router_dom_1.Link : 'div', to: item.to, active: item.active, className: className, style: {
|
|
35
|
+
':hover': {
|
|
36
|
+
color: 'var(--bs-primary)',
|
|
37
|
+
textDecoration: 'none'
|
|
38
|
+
}
|
|
39
|
+
} },
|
|
40
|
+
item.label,
|
|
41
|
+
item.badge && (react_1.default.createElement(react_bootstrap_1.Badge, { bg: item.badge.variant, className: "ms-2" }, item.badge.text))));
|
|
42
|
+
}))),
|
|
43
|
+
rightContent && (react_1.default.createElement(react_bootstrap_1.Nav, null, rightContent))))));
|
|
44
|
+
};
|
|
45
|
+
exports.NavBar = NavBar;
|
|
@@ -184,7 +184,7 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
184
184
|
process.exit(-1);
|
|
185
185
|
}
|
|
186
186
|
const builtfile = dest;
|
|
187
|
-
const webSideCares = [];
|
|
187
|
+
// const webSideCares: Page[] = [];
|
|
188
188
|
// fs.writeFileSync(
|
|
189
189
|
// `${reportDest}/stdlog.txt`,
|
|
190
190
|
// "THIS FILE IS AUTO GENERATED. IT IS PURPOSEFULLY LEFT BLANK."
|
|
@@ -221,32 +221,37 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
221
221
|
statusMessagePretty(results.fails, src, "pure");
|
|
222
222
|
this.bddTestIsNowDone(src, results.fails);
|
|
223
223
|
})
|
|
224
|
-
.catch((
|
|
225
|
-
console.log(ansi_colors_1.default.red(`launchPure - ${src} errored with: ${
|
|
224
|
+
.catch((e1) => {
|
|
225
|
+
console.log(ansi_colors_1.default.red(`launchPure - ${src} errored with: ${e1}`));
|
|
226
226
|
this.bddTestIsNowDone(src, -1);
|
|
227
|
+
statusMessagePretty(-1, src, "pure");
|
|
227
228
|
});
|
|
228
229
|
// .finally(() => {
|
|
229
230
|
// // webSideCares.forEach((webSideCar) => webSideCar.close());
|
|
230
231
|
// });
|
|
231
232
|
})
|
|
232
|
-
.catch((
|
|
233
|
+
.catch((e2) => {
|
|
233
234
|
console.log(ansi_colors_2.default.red(`pure ! ${src} failed to execute. No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`));
|
|
234
|
-
this.writeFileSync(`${reportDest}/logs.txt`,
|
|
235
|
+
this.writeFileSync(`${reportDest}/logs.txt`, e2.stack, src);
|
|
235
236
|
this.bddTestIsNowDone(src, -1);
|
|
236
237
|
statusMessagePretty(-1, src, "pure");
|
|
237
238
|
// console.error(e);
|
|
238
239
|
})
|
|
239
240
|
.finally((x) => {
|
|
240
|
-
const fileSet = files[src] || new Set();
|
|
241
|
-
|
|
241
|
+
// const fileSet = files[src] || new Set();
|
|
242
|
+
// fs.writeFileSync(
|
|
243
|
+
// reportDest + "/manifest.json",
|
|
244
|
+
// JSON.stringify(Array.from(fileSet))
|
|
245
|
+
// );
|
|
242
246
|
});
|
|
243
247
|
});
|
|
244
248
|
}
|
|
245
|
-
catch (
|
|
246
|
-
console.log(ansi_colors_1.default.red(ansi_colors_1.default.inverse(`${src} 1 errored with: ${
|
|
247
|
-
this.writeFileSync(`${reportDest}/logs.txt`,
|
|
249
|
+
catch (e3) {
|
|
250
|
+
console.log(ansi_colors_1.default.red(ansi_colors_1.default.inverse(`${src} 1 errored with: ${e3}. Check ${reportDest}/logs.txt for more info`)));
|
|
251
|
+
this.writeFileSync(`${reportDest}/logs.txt`, e3.stack, src);
|
|
248
252
|
this.bddTestIsNowDone(src, -1);
|
|
249
253
|
statusMessagePretty(-1, src, "pure");
|
|
254
|
+
console.log("III) PURE IS EXITING BADLY WITH error", e3);
|
|
250
255
|
}
|
|
251
256
|
for (let i = 0; i <= portsToUse.length; i++) {
|
|
252
257
|
if (portsToUse[i]) {
|
|
@@ -371,17 +376,22 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
371
376
|
});
|
|
372
377
|
child.on("error", (err) => { });
|
|
373
378
|
child.on("close", (code) => {
|
|
374
|
-
oStream.close();
|
|
379
|
+
// oStream.close();
|
|
375
380
|
server.close();
|
|
376
381
|
if (!files[src]) {
|
|
377
382
|
files[src] = new Set();
|
|
378
383
|
}
|
|
379
384
|
// files[src].add(filepath);
|
|
380
|
-
|
|
385
|
+
// fs.writeFileSync(
|
|
386
|
+
// reportDest + "/manifest.json",
|
|
387
|
+
// JSON.stringify(Array.from(files[src]))
|
|
388
|
+
// );
|
|
381
389
|
if (code === 255) {
|
|
382
390
|
console.log(ansi_colors_2.default.red(`node ! ${src} failed to execute. No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`));
|
|
383
391
|
this.bddTestIsNowDone(src, -1);
|
|
384
392
|
statusMessagePretty(-1, src, "node");
|
|
393
|
+
oStream.close();
|
|
394
|
+
return;
|
|
385
395
|
}
|
|
386
396
|
else if (code === 0) {
|
|
387
397
|
this.bddTestIsNowDone(src, 0);
|
|
@@ -432,7 +442,10 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
432
442
|
files[src] = new Set();
|
|
433
443
|
}
|
|
434
444
|
// files[src].add(filepath);
|
|
435
|
-
|
|
445
|
+
// fs.writeFileSync(
|
|
446
|
+
// destFolder + "/manifest.json",
|
|
447
|
+
// JSON.stringify(Array.from(files[src]))
|
|
448
|
+
// );
|
|
436
449
|
delete files[src];
|
|
437
450
|
Promise.all(screenshots[src] || []).then(() => {
|
|
438
451
|
delete screenshots[src];
|
|
@@ -720,7 +733,7 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
720
733
|
try {
|
|
721
734
|
return await (await x.default).receiveTestResourceConfig(${webArgz})
|
|
722
735
|
} catch (e) {
|
|
723
|
-
console.log("
|
|
736
|
+
console.log("web run failure", e.toString())
|
|
724
737
|
}
|
|
725
738
|
})`;
|
|
726
739
|
const ofile = `${reportDest}/logs.txt`;
|
|
@@ -751,16 +764,21 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
751
764
|
files[src] = new Set();
|
|
752
765
|
}
|
|
753
766
|
// files[t].add(filepath);
|
|
754
|
-
|
|
767
|
+
// fs.writeFileSync(
|
|
768
|
+
// destFolder + "/manifest.json",
|
|
769
|
+
// JSON.stringify(Array.from(files[src]))
|
|
770
|
+
// );
|
|
755
771
|
delete files[src];
|
|
756
772
|
Promise.all(screenshots[src] || []).then(() => {
|
|
757
773
|
delete screenshots[src];
|
|
758
774
|
page.close();
|
|
759
775
|
oStream.close();
|
|
760
776
|
});
|
|
777
|
+
console.log("ostream is closed");
|
|
778
|
+
return;
|
|
761
779
|
};
|
|
762
780
|
page.on("pageerror", (err) => {
|
|
763
|
-
console.log(ansi_colors_2.default.red(`web ! ${src} failed to execute
|
|
781
|
+
console.log(ansi_colors_2.default.red(`web ! ${src} failed to execute No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`));
|
|
764
782
|
oStream.write(err.name);
|
|
765
783
|
oStream.write("\n");
|
|
766
784
|
if (err.cause) {
|
|
@@ -779,33 +797,31 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
779
797
|
close();
|
|
780
798
|
});
|
|
781
799
|
page.on("console", (log) => {
|
|
782
|
-
|
|
783
|
-
oStream.
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
800
|
+
console.log("console message: ", log.text());
|
|
801
|
+
if (oStream.closed) {
|
|
802
|
+
console.log("missed console message: ", log.text());
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
else {
|
|
806
|
+
oStream.write(log.text());
|
|
807
|
+
oStream.write("\n");
|
|
808
|
+
oStream.write(JSON.stringify(log.location()));
|
|
809
|
+
oStream.write("\n");
|
|
810
|
+
oStream.write(JSON.stringify(log.stackTrace()));
|
|
811
|
+
oStream.write("\n");
|
|
812
|
+
}
|
|
788
813
|
});
|
|
789
814
|
await page.goto(`file://${`${destFolder}.html`}`, {});
|
|
790
|
-
this.webSidecars[Math.random()] = page.mainFrame()._id;
|
|
791
815
|
await page
|
|
792
816
|
.evaluate(evaluation)
|
|
793
817
|
.then(async ({ fails, failed, features }) => {
|
|
794
|
-
// this.receiveFeatures(features, destFolder, src, "web");
|
|
795
|
-
// this.receiveFeaturesV2(reportDest, src, "web");
|
|
796
818
|
statusMessagePretty(fails, src, "web");
|
|
797
819
|
this.bddTestIsNowDone(src, fails);
|
|
798
820
|
close();
|
|
799
821
|
})
|
|
800
822
|
.catch((e) => {
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
// ansiC.red(
|
|
804
|
-
// ansiC.inverse(
|
|
805
|
-
// `web ! ${src} failed to execute. No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`
|
|
806
|
-
// )
|
|
807
|
-
// )
|
|
808
|
-
// );
|
|
823
|
+
console.log(ansi_colors_1.default.red(ansi_colors_1.default.inverse(e)));
|
|
824
|
+
console.log(ansi_colors_1.default.red(ansi_colors_1.default.inverse(`web ! ${src} failed to execute. No "tests.json" file was generated. Check ${reportDest}/logs.txt for more info`)));
|
|
809
825
|
this.bddTestIsNowDone(src, -1);
|
|
810
826
|
})
|
|
811
827
|
.finally(() => {
|
|
@@ -1018,9 +1034,9 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
1018
1034
|
slowMo: 1,
|
|
1019
1035
|
waitForInitialPage: false,
|
|
1020
1036
|
executablePath,
|
|
1021
|
-
headless:
|
|
1037
|
+
headless: false,
|
|
1022
1038
|
dumpio: false,
|
|
1023
|
-
devtools:
|
|
1039
|
+
devtools: true,
|
|
1024
1040
|
args: [
|
|
1025
1041
|
"--disable-features=site-per-process",
|
|
1026
1042
|
"--allow-file-access-from-files",
|
|
@@ -1115,30 +1131,36 @@ class PM_Main extends PM_WithEslintAndTsc_js_1.PM_WithEslintAndTsc {
|
|
|
1115
1131
|
// this.launchExternalTest(et, this.configs.externalTests[et]);
|
|
1116
1132
|
// });
|
|
1117
1133
|
}
|
|
1118
|
-
async launchExternalTest(
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1134
|
+
// async launchExternalTest(
|
|
1135
|
+
// externalTestName: string,
|
|
1136
|
+
// externalTest: {
|
|
1137
|
+
// watch: string[];
|
|
1138
|
+
// exec: string;
|
|
1139
|
+
// }
|
|
1140
|
+
// ) {
|
|
1141
|
+
// // fs.mkdirSync(`testeranto/externalTests/${externalTestName}`);
|
|
1142
|
+
// // exec(externalTest.exec, (error, stdout, stderr) => {
|
|
1143
|
+
// // if (error) {
|
|
1144
|
+
// // fs.writeFileSync(
|
|
1145
|
+
// // `testeranto/externalTests/${externalTestName}/exitcode.txt`,
|
|
1146
|
+
// // `${error.name}\n${error.message}\n${error.code}\n`
|
|
1147
|
+
// // );
|
|
1148
|
+
// // } else {
|
|
1149
|
+
// // fs.writeFileSync(
|
|
1150
|
+
// // `testeranto/externalTests/${externalTestName}/exitcode.txt`,
|
|
1151
|
+
// // `0`
|
|
1152
|
+
// // );
|
|
1153
|
+
// // }
|
|
1154
|
+
// // fs.writeFileSync(
|
|
1155
|
+
// // `testeranto/externalTests/${externalTestName}/stdout.txt`,
|
|
1156
|
+
// // stdout
|
|
1157
|
+
// // );
|
|
1158
|
+
// // fs.writeFileSync(
|
|
1159
|
+
// // `testeranto/externalTests/${externalTestName}/stderr.txt`,
|
|
1160
|
+
// // stderr
|
|
1161
|
+
// // );
|
|
1162
|
+
// // });
|
|
1163
|
+
// }
|
|
1142
1164
|
async stop() {
|
|
1143
1165
|
console.log(ansi_colors_1.default.inverse("Testeranto-Run is shutting down gracefully..."));
|
|
1144
1166
|
this.mode = "once";
|
package/dist/common/src/Pure.js
CHANGED
|
@@ -14,22 +14,24 @@ class PureTesteranto extends core_js_1.default {
|
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
async receiveTestResourceConfig(partialTestResource) {
|
|
17
|
-
var _a, _b;
|
|
18
17
|
console.log("[DEBUG] receiveTestResourceConfig called with:", partialTestResource);
|
|
19
18
|
const t = JSON.parse(partialTestResource);
|
|
20
19
|
const pm = new pure_js_1.PM_Pure(t);
|
|
21
|
-
console.log("[DEBUG] Current test jobs:",
|
|
22
|
-
if (!this.testJobs || this.testJobs.length === 0) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
// console.log("[DEBUG] Current test jobs:", this.testJobs?.length);
|
|
21
|
+
// if (!this.testJobs || this.testJobs.length === 0) {
|
|
22
|
+
// console.error(
|
|
23
|
+
// "[ERROR] No test jobs available - checking specs:",
|
|
24
|
+
// this.specs?.length
|
|
25
|
+
// );
|
|
26
|
+
// console.error("[ERROR] Test implementation:", this.testImplementation);
|
|
27
|
+
// return {
|
|
28
|
+
// failed: true,
|
|
29
|
+
// fails: 1,
|
|
30
|
+
// artifacts: [],
|
|
31
|
+
// // logPromise: Promise.resolve(),
|
|
32
|
+
// features: [],
|
|
33
|
+
// };
|
|
34
|
+
// }
|
|
33
35
|
try {
|
|
34
36
|
console.log("[DEBUG] Executing test job with PM:", pm);
|
|
35
37
|
const result = await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
@@ -40,7 +42,7 @@ class PureTesteranto extends core_js_1.default {
|
|
|
40
42
|
console.error("[ERROR] Test job failed:", e);
|
|
41
43
|
return {
|
|
42
44
|
failed: true,
|
|
43
|
-
fails: 1,
|
|
45
|
+
fails: -1,
|
|
44
46
|
artifacts: [],
|
|
45
47
|
// logPromise: Promise.resolve(),
|
|
46
48
|
features: [],
|
|
@@ -49,11 +49,54 @@ const server = http_1.default.createServer((req, res) => {
|
|
|
49
49
|
// First check if file exists
|
|
50
50
|
fs_1.default.stat(filePath, (err, stats) => {
|
|
51
51
|
if (err || !stats.isFile()) {
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
// Check if directory exists
|
|
53
|
+
fs_1.default.stat(filePath, (dirErr, dirStats) => {
|
|
54
|
+
if (!dirErr && dirStats.isDirectory()) {
|
|
55
|
+
// Serve directory listing
|
|
56
|
+
fs_1.default.readdir(filePath, (readErr, files) => {
|
|
57
|
+
if (readErr) {
|
|
58
|
+
res.writeHead(500);
|
|
59
|
+
return res.end('Error reading directory');
|
|
60
|
+
}
|
|
61
|
+
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
62
|
+
res.write(`
|
|
63
|
+
<html>
|
|
64
|
+
<head>
|
|
65
|
+
<title>Directory Listing: ${req.url}</title>
|
|
66
|
+
<style>
|
|
67
|
+
body { font-family: sans-serif; margin: 2rem; }
|
|
68
|
+
h1 { color: #333; }
|
|
69
|
+
ul { list-style: none; padding: 0; }
|
|
70
|
+
li { padding: 0.5rem; }
|
|
71
|
+
li a { color: #0366d6; text-decoration: none; }
|
|
72
|
+
li a:hover { text-decoration: underline; }
|
|
73
|
+
</style>
|
|
74
|
+
</head>
|
|
75
|
+
<body>
|
|
76
|
+
<h1>Directory: ${req.url}</h1>
|
|
77
|
+
<ul>
|
|
78
|
+
${files.map(file => `
|
|
79
|
+
<li>
|
|
80
|
+
<a href="${path_1.default.join(req.url || '', file)}">
|
|
81
|
+
${file}${file.endsWith('/') ? '/' : ''}
|
|
82
|
+
</a>
|
|
83
|
+
</li>
|
|
84
|
+
`).join('')}
|
|
85
|
+
</ul>
|
|
86
|
+
</body>
|
|
87
|
+
</html>
|
|
88
|
+
`);
|
|
89
|
+
res.end();
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
// Neither file nor directory exists - send 404
|
|
94
|
+
if (!res.headersSent) {
|
|
95
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
96
|
+
res.end('File not found');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
57
100
|
return;
|
|
58
101
|
}
|
|
59
102
|
// File exists - serve it through node-static
|
package/dist/common/src/Web.js
CHANGED
|
@@ -9,29 +9,44 @@ exports.WebTesteranto = void 0;
|
|
|
9
9
|
const web_1 = require("./PM/web");
|
|
10
10
|
const core_js_1 = __importDefault(require("./lib/core.js"));
|
|
11
11
|
const index_js_1 = require("./lib/index.js");
|
|
12
|
-
let errorCallback = (e) => {
|
|
13
|
-
let unhandledrejectionCallback = (event) => {
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
// let errorCallback = (e: any) => {};
|
|
13
|
+
// let unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
|
|
14
|
+
// console.log(
|
|
15
|
+
// "window.addEventListener unhandledrejection 1",
|
|
16
|
+
// JSON.stringify(event)
|
|
17
|
+
// );
|
|
18
|
+
// };
|
|
16
19
|
class WebTesteranto extends core_js_1.default {
|
|
17
20
|
constructor(input, testSpecification, testImplementation, testResourceRequirement, testAdapter) {
|
|
18
21
|
super(input, testSpecification, testImplementation, testResourceRequirement, testAdapter, (cb) => {
|
|
19
|
-
window.removeEventListener("error", errorCallback);
|
|
20
|
-
errorCallback = (e) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
window.addEventListener("error", errorCallback);
|
|
26
|
-
window.removeEventListener(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
// window.removeEventListener("error", errorCallback);
|
|
23
|
+
// errorCallback = (e) => {
|
|
24
|
+
// console.log("window.addEventListener error 2", JSON.stringify(e));
|
|
25
|
+
// cb(e);
|
|
26
|
+
// // throw e;
|
|
27
|
+
// };
|
|
28
|
+
// window.addEventListener("error", errorCallback);
|
|
29
|
+
// window.removeEventListener(
|
|
30
|
+
// "unhandledrejection",
|
|
31
|
+
// unhandledrejectionCallback
|
|
32
|
+
// );
|
|
33
|
+
// /////////////////////
|
|
34
|
+
// window.removeEventListener(
|
|
35
|
+
// "unhandledrejection",
|
|
36
|
+
// unhandledrejectionCallback
|
|
37
|
+
// );
|
|
38
|
+
// unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
|
|
39
|
+
// console.log(
|
|
40
|
+
// "window.addEventListener unhandledrejection 3",
|
|
41
|
+
// JSON.stringify(event)
|
|
42
|
+
// );
|
|
43
|
+
// cb({ error: event.reason.message });
|
|
44
|
+
// // throw event;
|
|
45
|
+
// };
|
|
46
|
+
// window.addEventListener(
|
|
47
|
+
// "unhandledrejection",
|
|
48
|
+
// unhandledrejectionCallback
|
|
49
|
+
// );
|
|
35
50
|
});
|
|
36
51
|
}
|
|
37
52
|
async receiveTestResourceConfig(partialTestResource) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TestStatusBadge = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const react_bootstrap_1 = require("react-bootstrap");
|
|
9
|
+
const TestStatusBadge = (props) => {
|
|
10
|
+
// Enhanced logging
|
|
11
|
+
console.groupCollapsed(`[TestStatusBadge] Rendering for ${props.testName}`);
|
|
12
|
+
console.log('Raw props:', JSON.parse(JSON.stringify(props)));
|
|
13
|
+
// Simplified status determination
|
|
14
|
+
const hasTests = props.testsExist !== false;
|
|
15
|
+
const testCompleted = props.runTimeErrors !== -1;
|
|
16
|
+
const hasRuntimeErrors = props.runTimeErrors > 0;
|
|
17
|
+
console.log('Status flags:', {
|
|
18
|
+
hasTests,
|
|
19
|
+
testCompleted,
|
|
20
|
+
hasRuntimeErrors,
|
|
21
|
+
typeErrors: props.typeErrors,
|
|
22
|
+
staticErrors: props.staticErrors
|
|
23
|
+
});
|
|
24
|
+
let bddStatus;
|
|
25
|
+
if (!hasTests) {
|
|
26
|
+
console.warn('No tests.json found - marking as failed');
|
|
27
|
+
bddStatus = { text: '❌ No Tests', variant: 'danger' };
|
|
28
|
+
}
|
|
29
|
+
else if (!testCompleted) {
|
|
30
|
+
console.warn('Test did not complete (runTimeErrors=-1) - marking as failed');
|
|
31
|
+
bddStatus = { text: '❌ No Tests', variant: 'danger' };
|
|
32
|
+
}
|
|
33
|
+
else if (hasRuntimeErrors) {
|
|
34
|
+
console.warn(`Test failed with ${props.runTimeErrors} runtime errors`);
|
|
35
|
+
bddStatus = { text: `❌ BDD (${props.runTimeErrors})`, variant: 'danger' };
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.log('Test passed all runtime checks');
|
|
39
|
+
bddStatus = { text: '✅ BDD', variant: 'success' };
|
|
40
|
+
}
|
|
41
|
+
if (props.variant === 'compact') {
|
|
42
|
+
console.log('Rendering compact badge:', bddStatus);
|
|
43
|
+
console.groupEnd();
|
|
44
|
+
return react_1.default.createElement(react_bootstrap_1.Badge, { bg: bddStatus.variant }, bddStatus.text);
|
|
45
|
+
}
|
|
46
|
+
console.log('Rendering full badge set with:', {
|
|
47
|
+
bddStatus,
|
|
48
|
+
typeErrors: props.typeErrors,
|
|
49
|
+
staticErrors: props.staticErrors
|
|
50
|
+
});
|
|
51
|
+
console.groupEnd();
|
|
52
|
+
return (react_1.default.createElement("div", { className: "d-flex gap-2" },
|
|
53
|
+
react_1.default.createElement(react_bootstrap_1.Badge, { bg: bddStatus.variant }, bddStatus.text)));
|
|
54
|
+
};
|
|
55
|
+
exports.TestStatusBadge = TestStatusBadge;
|