testeranto 0.166.0 → 0.171.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 +17 -15
- 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/baseBuilder.test/baseBuilder.test.mock.js +1 -1
- package/dist/common/src/lib/basebuilder.js +9 -7
- package/dist/common/src/lib/core.test/MockCore.js +17 -15
- 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 +17 -15
- 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/baseBuilder.test/baseBuilder.test.mock.js +1 -1
- package/dist/module/src/lib/basebuilder.js +9 -7
- package/dist/module/src/lib/core.test/MockCore.js +17 -15
- 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.js +541 -495
- 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 +3 -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/src/lib/index.d.ts +0 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +3 -2
- 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 +17 -17
- 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/baseBuilder.test/baseBuilder.test.mock.ts +1 -1
- package/src/lib/basebuilder.ts +9 -9
- package/src/lib/core.test/MockCore.ts +26 -19
- package/src/lib/index.ts +1 -1
- package/src/lib/pmProxy.ts +184 -87
- package/testeranto/App.js +541 -495
- package/testeranto/bundles/node/allTests/{chunk-4ONUZRZ4.mjs → chunk-3EUGBAOM.mjs} +1 -1
- package/testeranto/bundles/node/allTests/{chunk-FFBRDUBH.mjs → chunk-E75CSRER.mjs} +247 -124
- package/testeranto/bundles/node/allTests/{chunk-NQEP7SN4.mjs → chunk-M6DO7VMB.mjs} +1 -1
- package/testeranto/bundles/node/allTests/metafile.json +41 -41
- 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 +4 -4
- 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 +11 -23
- package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +2 -2
- package/testeranto/bundles/pure/allTests/{chunk-CSMXYJ65.mjs → chunk-KHDVEHF7.mjs} +3 -18
- package/testeranto/bundles/pure/allTests/{chunk-QK4IXLF6.mjs → chunk-VMUSFSZM.mjs} +247 -124
- package/testeranto/bundles/pure/allTests/metafile.json +77 -47
- 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 +3 -30
- package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +2283 -0
- package/testeranto/bundles/web/allTests/{chunk-TU3MJSSI.mjs → chunk-RLDR6LJN.mjs} +302 -127
- package/testeranto/bundles/web/allTests/chunk-U7AW26HL.mjs +997 -0
- package/testeranto/bundles/web/allTests/metafile.json +15065 -46
- 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 +27 -3
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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/lint_errors.txt +0 -12
- 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 +11 -8
- package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +0 -0
- 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 +16 -9
- package/testeranto/reportsweb_build_errors +25 -0
- package/testeranto.config.ts +7 -0
- package/tsc.log +313 -237
- 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
package/src/TestPage.tsx
CHANGED
|
@@ -253,19 +253,92 @@ export const TestPage = () => {
|
|
|
253
253
|
{testData.givens.map((given, i) => (
|
|
254
254
|
<div key={i} className="mb-4 card">
|
|
255
255
|
<div className="card-header bg-primary text-white">
|
|
256
|
-
<
|
|
256
|
+
<div className="d-flex justify-content-between align-items-center">
|
|
257
|
+
<h4>Given: {given.name}</h4>
|
|
258
|
+
{given.artifacts?.length > 0 && (
|
|
259
|
+
<div className="dropdown">
|
|
260
|
+
<button
|
|
261
|
+
className="btn btn-sm btn-light dropdown-toggle"
|
|
262
|
+
type="button"
|
|
263
|
+
data-bs-toggle="dropdown"
|
|
264
|
+
>
|
|
265
|
+
Artifacts ({given.artifacts.length})
|
|
266
|
+
</button>
|
|
267
|
+
<ul className="dropdown-menu dropdown-menu-end">
|
|
268
|
+
{given.artifacts.map((artifact, ai) => (
|
|
269
|
+
<li key={ai}>
|
|
270
|
+
<a
|
|
271
|
+
className="dropdown-item"
|
|
272
|
+
href={`/testeranto/reports/${projectName}/${testName.split('.').slice(0, -1).join('.')}/${runtime}/${artifact}`}
|
|
273
|
+
target="_blank"
|
|
274
|
+
rel="noopener noreferrer"
|
|
275
|
+
>
|
|
276
|
+
{artifact.split('/').pop()}
|
|
277
|
+
</a>
|
|
278
|
+
</li>
|
|
279
|
+
))}
|
|
280
|
+
</ul>
|
|
281
|
+
</div>
|
|
282
|
+
)}
|
|
283
|
+
</div>
|
|
257
284
|
</div>
|
|
258
285
|
<div className="card-body">
|
|
259
286
|
{given.whens.map((when, j) => (
|
|
260
287
|
<div key={`w-${j}`} className={`p-3 mb-2 ${when.error ? 'bg-danger text-white' : 'bg-success text-white'}`}>
|
|
261
|
-
<
|
|
262
|
-
|
|
288
|
+
<div className="d-flex justify-content-between align-items-start">
|
|
289
|
+
<div>
|
|
290
|
+
<strong>When:</strong> {when.name}
|
|
291
|
+
{when.error && <pre className="mt-2">{when.error}</pre>}
|
|
292
|
+
</div>
|
|
293
|
+
{when.artifacts?.length > 0 && (
|
|
294
|
+
<div className="ms-3">
|
|
295
|
+
<strong>Artifacts:</strong>
|
|
296
|
+
<ul className="list-unstyled">
|
|
297
|
+
{when.artifacts.map((artifact, ai) => (
|
|
298
|
+
<li key={ai}>
|
|
299
|
+
<a
|
|
300
|
+
href={`/testeranto/reports/${projectName}/${testName.split('.').slice(0, -1).join('.')}/${runtime}/${artifact}`}
|
|
301
|
+
target="_blank"
|
|
302
|
+
className="text-white"
|
|
303
|
+
rel="noopener noreferrer"
|
|
304
|
+
>
|
|
305
|
+
{artifact.split('/').pop()}
|
|
306
|
+
</a>
|
|
307
|
+
</li>
|
|
308
|
+
))}
|
|
309
|
+
</ul>
|
|
310
|
+
</div>
|
|
311
|
+
)}
|
|
312
|
+
</div>
|
|
263
313
|
</div>
|
|
264
314
|
))}
|
|
265
315
|
{given.thens.map((then, k) => (
|
|
266
316
|
<div key={`t-${k}`} className={`p-3 mb-2 ${then.error ? 'bg-danger text-white' : 'bg-success text-white'}`}>
|
|
267
|
-
<
|
|
268
|
-
|
|
317
|
+
<div className="d-flex justify-content-between align-items-start">
|
|
318
|
+
<div>
|
|
319
|
+
<strong>Then:</strong> {then.name}
|
|
320
|
+
{then.error && <pre className="mt-2">{then.error}</pre>}
|
|
321
|
+
</div>
|
|
322
|
+
{then.artifacts?.length > 0 && (
|
|
323
|
+
<div className="ms-3">
|
|
324
|
+
<strong>Artifacts:</strong>
|
|
325
|
+
<ul className="list-unstyled">
|
|
326
|
+
{then.artifacts.map((artifact, ai) => (
|
|
327
|
+
<li key={ai}>
|
|
328
|
+
<a
|
|
329
|
+
href={`/testeranto/reports/${projectName}/${testName.split('.').slice(0, -1).join('.')}/${runtime}/${artifact}`}
|
|
330
|
+
target="_blank"
|
|
331
|
+
className="text-white"
|
|
332
|
+
rel="noopener noreferrer"
|
|
333
|
+
>
|
|
334
|
+
{artifact.split('/').pop()}
|
|
335
|
+
</a>
|
|
336
|
+
</li>
|
|
337
|
+
))}
|
|
338
|
+
</ul>
|
|
339
|
+
</div>
|
|
340
|
+
)}
|
|
341
|
+
</div>
|
|
269
342
|
</div>
|
|
270
343
|
))}
|
|
271
344
|
</div>
|
package/src/Web.ts
CHANGED
|
@@ -17,10 +17,13 @@ import {
|
|
|
17
17
|
defaultTestResourceRequirement,
|
|
18
18
|
} from "./lib/index.js";
|
|
19
19
|
|
|
20
|
-
let errorCallback = (e: any) => {};
|
|
21
|
-
let unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
// let errorCallback = (e: any) => {};
|
|
21
|
+
// let unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
|
|
22
|
+
// console.log(
|
|
23
|
+
// "window.addEventListener unhandledrejection 1",
|
|
24
|
+
// JSON.stringify(event)
|
|
25
|
+
// );
|
|
26
|
+
// };
|
|
24
27
|
|
|
25
28
|
export class WebTesteranto<
|
|
26
29
|
I extends Ibdd_in_any,
|
|
@@ -41,37 +44,34 @@ export class WebTesteranto<
|
|
|
41
44
|
testResourceRequirement,
|
|
42
45
|
testAdapter,
|
|
43
46
|
(cb) => {
|
|
44
|
-
window.removeEventListener("error", errorCallback);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"unhandledrejection",
|
|
73
|
-
unhandledrejectionCallback
|
|
74
|
-
);
|
|
47
|
+
// window.removeEventListener("error", errorCallback);
|
|
48
|
+
// errorCallback = (e) => {
|
|
49
|
+
// console.log("window.addEventListener error 2", JSON.stringify(e));
|
|
50
|
+
// cb(e);
|
|
51
|
+
// // throw e;
|
|
52
|
+
// };
|
|
53
|
+
// window.addEventListener("error", errorCallback);
|
|
54
|
+
// window.removeEventListener(
|
|
55
|
+
// "unhandledrejection",
|
|
56
|
+
// unhandledrejectionCallback
|
|
57
|
+
// );
|
|
58
|
+
// /////////////////////
|
|
59
|
+
// window.removeEventListener(
|
|
60
|
+
// "unhandledrejection",
|
|
61
|
+
// unhandledrejectionCallback
|
|
62
|
+
// );
|
|
63
|
+
// unhandledrejectionCallback = (event: PromiseRejectionEvent) => {
|
|
64
|
+
// console.log(
|
|
65
|
+
// "window.addEventListener unhandledrejection 3",
|
|
66
|
+
// JSON.stringify(event)
|
|
67
|
+
// );
|
|
68
|
+
// cb({ error: event.reason.message });
|
|
69
|
+
// // throw event;
|
|
70
|
+
// };
|
|
71
|
+
// window.addEventListener(
|
|
72
|
+
// "unhandledrejection",
|
|
73
|
+
// unhandledrejectionCallback
|
|
74
|
+
// );
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
77
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
import { ITestAdapter } from "../../../CoreTypes";
|
|
3
|
+
import { I } from "./types";
|
|
4
|
+
|
|
5
|
+
export const adapter: ITestAdapter<I> = {
|
|
6
|
+
beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
|
|
7
|
+
return initializer();
|
|
8
|
+
},
|
|
9
|
+
andWhen: async (store, whenCB, testResource, pm) => {
|
|
10
|
+
return whenCB(store, pm);
|
|
11
|
+
},
|
|
12
|
+
butThen: async (store, thenCB, testResource, pm) => {
|
|
13
|
+
return thenCB(store, pm);
|
|
14
|
+
},
|
|
15
|
+
afterEach: async (store, key, pm) => {
|
|
16
|
+
if (store?.container) {
|
|
17
|
+
store.container.remove();
|
|
18
|
+
}
|
|
19
|
+
return store;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { assert, expect } from "chai";
|
|
2
|
+
import { ITestImplementation } from "../../../CoreTypes";
|
|
3
|
+
import { I, M, O } from "./types";
|
|
4
|
+
|
|
5
|
+
export const implementation: ITestImplementation<I, O, M> = {
|
|
6
|
+
suites: {
|
|
7
|
+
Default: "Project Page View Tests",
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
givens: {
|
|
11
|
+
Default: () => ({
|
|
12
|
+
summary: {},
|
|
13
|
+
nodeLogs: null,
|
|
14
|
+
webLogs: null,
|
|
15
|
+
pureLogs: null,
|
|
16
|
+
config: { tests: [] },
|
|
17
|
+
loading: false,
|
|
18
|
+
error: null,
|
|
19
|
+
projectName: "test-project",
|
|
20
|
+
route: "tests",
|
|
21
|
+
setRoute: () => { },
|
|
22
|
+
navigate: () => { },
|
|
23
|
+
}),
|
|
24
|
+
WithError: () => ({
|
|
25
|
+
summary: null,
|
|
26
|
+
nodeLogs: null,
|
|
27
|
+
webLogs: null,
|
|
28
|
+
pureLogs: null,
|
|
29
|
+
config: { tests: [] },
|
|
30
|
+
loading: false,
|
|
31
|
+
error: "Test error message",
|
|
32
|
+
projectName: "test-project",
|
|
33
|
+
route: "tests",
|
|
34
|
+
setRoute: () => { },
|
|
35
|
+
navigate: () => { },
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
whens: {
|
|
39
|
+
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
thens: {
|
|
43
|
+
happyPath:
|
|
44
|
+
() =>
|
|
45
|
+
async ({ container, html }, pm) => {
|
|
46
|
+
console.group('[Test] Verifying render output');
|
|
47
|
+
debugger
|
|
48
|
+
const p = await pm.page();
|
|
49
|
+
await pm.customScreenShot({ path: "happyPath.png" }, p);
|
|
50
|
+
|
|
51
|
+
assert.equal(1, 1);
|
|
52
|
+
// try {
|
|
53
|
+
// console.log('Checking for container-fluid');
|
|
54
|
+
// const containerFluid = container.querySelector(".container-fluid");
|
|
55
|
+
// expect(containerFluid).to.exist;
|
|
56
|
+
// expect(containerFluid?.children.length).to.be.greaterThan(0);
|
|
57
|
+
|
|
58
|
+
// console.log('Checking for NavBar');
|
|
59
|
+
// const navBar = container.querySelector("nav.navbar");
|
|
60
|
+
// expect(navBar).to.exist;
|
|
61
|
+
|
|
62
|
+
// console.log('Render verification passed');
|
|
63
|
+
// console.groupEnd();
|
|
64
|
+
// return { container, html };
|
|
65
|
+
// } catch (err) {
|
|
66
|
+
// console.error('Verification failed:', err);
|
|
67
|
+
// console.error('Full HTML:', html);
|
|
68
|
+
// console.groupEnd();
|
|
69
|
+
// throw err;
|
|
70
|
+
// }
|
|
71
|
+
},
|
|
72
|
+
unhappyPath:
|
|
73
|
+
() =>
|
|
74
|
+
async ({ container }, pm) => {
|
|
75
|
+
// expect(container.textContent).contain("Test error message");
|
|
76
|
+
assert.equal(1, 1);
|
|
77
|
+
|
|
78
|
+
const p = await pm.page();
|
|
79
|
+
await pm.customScreenShot({ path: "unhappyPath.png" }, p);
|
|
80
|
+
|
|
81
|
+
return { container };
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Testeranto from "testeranto-react/src/react-dom/component/web";
|
|
2
|
+
|
|
3
|
+
import { implementation } from "./implementation";
|
|
4
|
+
import { specification } from "./specification";
|
|
5
|
+
import { I, O } from "./types";
|
|
6
|
+
import { ProjectPageView } from "../ProjectPageView";
|
|
7
|
+
|
|
8
|
+
export default Testeranto<I, O>(implementation, specification, ProjectPageView);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ITestSpecification } from "../../../CoreTypes";
|
|
2
|
+
import { I, O } from "./types";
|
|
3
|
+
|
|
4
|
+
export const specification: ITestSpecification<I, O> = (
|
|
5
|
+
Suite,
|
|
6
|
+
Given,
|
|
7
|
+
When,
|
|
8
|
+
Then
|
|
9
|
+
) => {
|
|
10
|
+
return [
|
|
11
|
+
Suite.Default("ProjectPageView Component Tests", {
|
|
12
|
+
basicRender: Given.Default(
|
|
13
|
+
[
|
|
14
|
+
"ProjectPageView should render",
|
|
15
|
+
"It should contain a container-fluid div",
|
|
16
|
+
"It should render the NavBar component",
|
|
17
|
+
],
|
|
18
|
+
[],
|
|
19
|
+
[Then.happyPath()]
|
|
20
|
+
),
|
|
21
|
+
errorHandling: Given.WithError(
|
|
22
|
+
[
|
|
23
|
+
"ProjectPageView should handle errors",
|
|
24
|
+
"It should display error messages when present",
|
|
25
|
+
],
|
|
26
|
+
[],
|
|
27
|
+
[Then.unhappyPath()]
|
|
28
|
+
),
|
|
29
|
+
}),
|
|
30
|
+
];
|
|
31
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
import { Ibdd_in, Ibdd_out } from "../../../CoreTypes";
|
|
4
|
+
import { IProjectPageViewProps } from "../ProjectPageView";
|
|
5
|
+
|
|
6
|
+
export type I = Ibdd_in<
|
|
7
|
+
null,
|
|
8
|
+
IProjectPageViewProps,
|
|
9
|
+
IProjectPageViewProps & { container?: HTMLElement },
|
|
10
|
+
IProjectPageViewProps & { container?: HTMLElement },
|
|
11
|
+
(...args: any[]) => IProjectPageViewProps,
|
|
12
|
+
() => (
|
|
13
|
+
props: IProjectPageViewProps,
|
|
14
|
+
utils: any
|
|
15
|
+
) => IProjectPageViewProps & { container?: HTMLElement },
|
|
16
|
+
() => (
|
|
17
|
+
state: IProjectPageViewProps & { container?: HTMLElement }
|
|
18
|
+
) => IProjectPageViewProps & { container?: HTMLElement }
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export type O = Ibdd_out<
|
|
22
|
+
{
|
|
23
|
+
Default: [string];
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
Default: [];
|
|
27
|
+
WithError: [];
|
|
28
|
+
},
|
|
29
|
+
{},
|
|
30
|
+
{
|
|
31
|
+
happyPath: [];
|
|
32
|
+
unhappyPath: [];
|
|
33
|
+
}
|
|
34
|
+
>;
|
|
35
|
+
|
|
36
|
+
export type M = {
|
|
37
|
+
givens: {
|
|
38
|
+
[K in keyof O["givens"]]: (...args: any[]) => IProjectPageViewProps;
|
|
39
|
+
};
|
|
40
|
+
whens: {
|
|
41
|
+
[K in keyof O["whens"]]: (
|
|
42
|
+
...args: any[]
|
|
43
|
+
) => (
|
|
44
|
+
props: IProjectPageViewProps,
|
|
45
|
+
utils: any
|
|
46
|
+
) => IProjectPageViewProps & { container?: HTMLElement };
|
|
47
|
+
};
|
|
48
|
+
thens: {
|
|
49
|
+
[K in keyof O["thens"]]: (
|
|
50
|
+
...args: any[]
|
|
51
|
+
) => (
|
|
52
|
+
state: IProjectPageViewProps & { container?: HTMLElement }
|
|
53
|
+
) => IProjectPageViewProps & { container?: HTMLElement };
|
|
54
|
+
};
|
|
55
|
+
};
|