testeranto 0.135.0 → 0.140.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/.aider.chat.history.md +13976 -0
- package/.aider.input.history +530 -0
- package/.aider.tags.cache.v3/{d8/b0/a8966fcd65890fd9f70d7afe8141.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/{8e/ec/2d4659a1589a0187a757ab1cbefa.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
- package/README.md +28 -135
- package/bundle.js +1 -1
- package/dist/common/src/Init.js +4 -1
- package/dist/common/src/Node.js +1 -1
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/build.js +7 -73
- package/dist/common/src/defaultConfig.js +0 -1
- package/dist/common/src/lib/abstractBase.js +2 -0
- package/dist/common/src/lib/basebuilder.js +4 -0
- package/dist/common/src/lib/core.js +2 -0
- package/dist/common/src/run.js +1 -1
- package/dist/common/src/utils/buildTemplates.js +88 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +4 -1
- package/dist/module/src/Node.js +1 -1
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/module/src/Project.js +41 -47
- package/dist/module/src/TestReport.js +34 -31
- package/dist/module/src/Web.js +2 -2
- package/dist/module/src/build.js +7 -73
- package/dist/module/src/defaultConfig.js +0 -1
- package/dist/module/src/lib/abstractBase.js +2 -0
- package/dist/module/src/lib/basebuilder.js +4 -0
- package/dist/module/src/lib/core.js +2 -0
- package/dist/module/src/run.js +1 -1
- package/dist/module/src/utils/buildTemplates.js +82 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +62 -13
- package/dist/prebuild/TestReport.js +39 -18
- package/dist/prebuild/build.mjs +96 -73
- package/dist/prebuild/init-docs.mjs +0 -4
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/CoreTypes.d.ts +5 -3
- package/dist/types/src/Node.d.ts +3 -3
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +17 -1
- package/dist/types/src/PM/nodeSidecar.d.ts +2 -2
- package/dist/types/src/Pure.d.ts +3 -3
- package/dist/types/src/Types.d.ts +18 -14
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/lib/abstractBase.d.ts +8 -8
- package/dist/types/src/lib/basebuilder.d.ts +3 -3
- package/dist/types/src/lib/classBuilder.d.ts +2 -2
- package/dist/types/src/lib/core.d.ts +2 -2
- package/dist/types/src/lib/index.d.ts +7 -6
- package/dist/types/src/lib/types.d.ts +8 -8
- package/dist/types/src/mothership/test.d.ts +20 -1
- package/dist/types/src/utils/buildTemplates.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +344 -54
- package/docs/style.md +116 -0
- package/docs.html +537 -0
- package/example.css +351 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Black.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Bold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-ExtraBold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Light.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Medium.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Regular.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Thin.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/OFL.txt +91 -0
- package/index.html +245 -24
- package/logo.svg +72 -0
- package/package.json +6 -2
- package/scripts/compile-docs.js +89 -0
- package/src/CoreTypes.ts +24 -43
- package/src/Init.ts +4 -4
- package/src/Node.ts +6 -20
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +13 -20
- package/src/PM/__tests__/pureSidecar.testeranto.ts +8 -15
- package/src/PM/__tests__/webSidecar.testeranto.ts +8 -15
- package/src/PM/nodeSidecar.ts +2 -2
- package/src/PM/pure.ts +0 -4
- package/src/Project.tsx +289 -292
- package/src/Pure.ts +13 -14
- package/src/PureSidecar.ts +1 -0
- package/src/TestReport.tsx +179 -165
- package/src/Types.ts +29 -144
- package/src/Web.ts +15 -11
- package/src/build.ts +22 -73
- package/src/defaultConfig.ts +2 -1
- package/src/lib/BaseSuite.test.ts +457 -0
- package/src/lib/BaseSuite.ts +155 -0
- package/src/lib/abstractBase.ts +7 -162
- package/src/lib/basebuilder.ts +11 -11
- package/src/lib/classBuilder.ts +8 -3
- package/src/lib/core.ts +12 -12
- package/src/lib/index.ts +21 -24
- package/src/lib/types.ts +23 -9
- package/src/mothership/test.ts +13 -10
- package/src/run.ts +1 -1
- package/src/style.css +1 -1
- package/src/utils/buildTemplates.ts +88 -0
- package/style.css +496 -0
- package/testeranto/bundles/node/{mothership/chunk-V2EQEXU2.mjs → allTests/chunk-4PJCC2XT.mjs} +66 -59
- package/testeranto/bundles/node/allTests/metafile.json +4151 -0
- package/testeranto/bundles/node/allTests/src/PM/__tests__/nodeSidecar.testeranto.mjs +187 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test.mjs +305 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/mothership/test.mjs +1 -1
- package/testeranto/dev.html +29 -0
- package/testeranto/index.html +28 -27
- package/testeranto/reports/allTests/config.json +57 -0
- package/testeranto/reports/{mothership/index.html → allTests/dev.html} +2 -0
- package/testeranto/reports/allTests/index.html +26 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/sidecar.testeranto/node/index.html → allTests/src/PM/__tests__/nodeSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +28 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/pureSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/webSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/console_log.txt +35 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html → allTests/src/lib/BaseSuite.test/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/lint_errors.json +608 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/message +1 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/prompt.txt +7 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/type_errors.txt +68 -0
- package/testeranto/reports/allTests/src/mothership/test/node/dev.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/message +1 -0
- package/testeranto/reports/allTests/src/mothership/test/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/mothership/test/node/type_errors.txt +24 -0
- package/testeranto/reports/allTests/summary.json +37 -0
- package/testeranto.config.ts +16 -26
- package/tsc.log +66 -69
- package/dist/common/src/SP__Polygon.test.js +0 -10
- package/dist/module/src/ReportClient.js +0 -132
- package/dist/module/src/SP__Polygon.test.js +0 -8
- package/dist/prebuild/ReportClient.js +0 -3
- package/dist/types/src/SP__Polygon.test.d.ts +0 -1
- package/src/ReportClient.tsx +0 -164
- package/src/SP__Polygon.test.ts +0 -13
- package/testeranto/ReportClient.css +0 -11367
- package/testeranto/ReportClient.js +0 -24641
- package/testeranto/bundles/node/mothership/metafile.json +0 -389
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +0 -1219
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +0 -1199
- package/testeranto/reports/mothership/config.json +0 -25
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +0 -35
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +0 -56
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +0 -29
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +0 -4
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +0 -20
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +0 -24
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +0 -18
- package/testeranto/reports/mothership/summary.json +0 -9
- /package/testeranto/bundles/node/{mothership → allTests}/chunk-PG6KUKNP.mjs +0 -0
- /package/testeranto/bundles/pure/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/bundles/web/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto → allTests/src/lib/BaseSuite.test}/node/log.txt +0 -0
- /package/testeranto/reports/{mothership → allTests}/src/mothership/test/node/lint_errors.json +0 -0
package/src/Pure.ts
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Ibdd_in_any,
|
|
3
|
+
Ibdd_out,
|
|
4
|
+
ITestImplementation,
|
|
5
|
+
ITestInterface,
|
|
6
|
+
ITestSpecification,
|
|
7
|
+
} from "./CoreTypes.js";
|
|
1
8
|
import Testeranto from "./lib/core.js";
|
|
2
9
|
import {
|
|
3
10
|
defaultTestResourceRequirement,
|
|
4
11
|
ITTestResourceConfiguration,
|
|
5
12
|
ITTestResourceRequest,
|
|
6
13
|
} from "./lib/index.js";
|
|
7
|
-
import type {
|
|
8
|
-
INodeTestInterface,
|
|
9
|
-
IT,
|
|
10
|
-
ITestImplementation,
|
|
11
|
-
ITestInterface,
|
|
12
|
-
ITestSpecification,
|
|
13
|
-
OT,
|
|
14
|
-
} from "./Types.js";
|
|
15
14
|
|
|
16
15
|
import { PM_Pure } from "./PM/pure.js";
|
|
17
16
|
|
|
18
|
-
export class PureTesteranto<
|
|
19
|
-
I,
|
|
20
|
-
O,
|
|
17
|
+
export class PureTesteranto<
|
|
18
|
+
I extends Ibdd_in_any,
|
|
19
|
+
O extends Ibdd_out,
|
|
21
20
|
M
|
|
22
|
-
> {
|
|
21
|
+
> extends Testeranto<I, O, M> {
|
|
23
22
|
constructor(
|
|
24
23
|
input: I["iinput"],
|
|
25
24
|
testSpecification: ITestSpecification<I, O>,
|
|
@@ -50,11 +49,11 @@ export class PureTesteranto<I extends IT, O extends OT, M> extends Testeranto<
|
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
export default async <I extends
|
|
52
|
+
export default async <I extends Ibdd_in_any, O extends Ibdd_out, M>(
|
|
54
53
|
input: I["iinput"],
|
|
55
54
|
testSpecification: ITestSpecification<I, O>,
|
|
56
55
|
testImplementation: ITestImplementation<I, O, M>,
|
|
57
|
-
testInterface: Partial<
|
|
56
|
+
testInterface: Partial<ITestInterface<I>>,
|
|
58
57
|
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement
|
|
59
58
|
): Promise<Testeranto<I, O, M>> => {
|
|
60
59
|
return new PureTesteranto<I, O, M>(
|
package/src/PureSidecar.ts
CHANGED
package/src/TestReport.tsx
CHANGED
|
@@ -2,92 +2,100 @@ import ReactDom from "react-dom/client";
|
|
|
2
2
|
import React, { useEffect, useState } from "react";
|
|
3
3
|
import { Col, Nav, Row, Tab } from "react-bootstrap";
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
8
|
-
import "./style.css"
|
|
5
|
+
import "bootstrap/dist/css/bootstrap.min.css";
|
|
6
|
+
import "./style.css";
|
|
9
7
|
import { Footer } from "./Footer";
|
|
10
8
|
|
|
11
|
-
const StepPane = ({
|
|
9
|
+
const StepPane = ({
|
|
10
|
+
step,
|
|
11
|
+
}: {
|
|
12
12
|
step: {
|
|
13
|
-
name: string
|
|
14
|
-
error: string
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
name: string;
|
|
14
|
+
error: string;
|
|
15
|
+
};
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<div>
|
|
19
|
+
<pre>
|
|
20
|
+
<code>{JSON.stringify(step, null, 2)}</code>
|
|
21
|
+
</pre>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
24
25
|
|
|
25
|
-
const TestPane = ({
|
|
26
|
+
const TestPane = ({
|
|
27
|
+
given,
|
|
28
|
+
}: {
|
|
26
29
|
given: {
|
|
27
|
-
key: string
|
|
28
|
-
name: string
|
|
29
|
-
error?: string[]
|
|
30
|
-
features?: string[]
|
|
30
|
+
key: string;
|
|
31
|
+
name: string;
|
|
32
|
+
error?: string[];
|
|
33
|
+
features?: string[];
|
|
31
34
|
whens: {
|
|
32
35
|
name: string;
|
|
33
36
|
error: string;
|
|
34
|
-
}[]
|
|
37
|
+
}[];
|
|
35
38
|
thens: {
|
|
36
39
|
name: string;
|
|
37
40
|
error: string;
|
|
38
|
-
}[]
|
|
39
|
-
}
|
|
41
|
+
}[];
|
|
42
|
+
};
|
|
40
43
|
}) => {
|
|
44
|
+
return (
|
|
45
|
+
<div>
|
|
46
|
+
{" "}
|
|
47
|
+
<Tab.Container id="TestPane-tabs" defaultActiveKey="first">
|
|
48
|
+
<Row>
|
|
49
|
+
<Col sm={3}>
|
|
50
|
+
<Nav variant="pills" className="flex-column">
|
|
51
|
+
<Nav.Item>
|
|
52
|
+
<Nav.Link eventKey={`bdd-features`}>features</Nav.Link>
|
|
53
|
+
{...given.whens.map((w, ndx) => (
|
|
54
|
+
<Nav.Link eventKey={`bdd-when-${ndx}`}>
|
|
55
|
+
When {w.name} {w.error && "!"}
|
|
56
|
+
</Nav.Link>
|
|
57
|
+
))}
|
|
58
|
+
{...given.thens.map((t, ndx) => (
|
|
59
|
+
<Nav.Link eventKey={`bdd-then-${ndx}`}>
|
|
60
|
+
Then {t.name} {t.error && "!"}
|
|
61
|
+
</Nav.Link>
|
|
62
|
+
))}
|
|
63
|
+
<Nav.Link eventKey={`bdd-errors`}>errors</Nav.Link>
|
|
64
|
+
</Nav.Item>
|
|
65
|
+
</Nav>
|
|
66
|
+
</Col>
|
|
67
|
+
<Col sm={6}>
|
|
68
|
+
<Tab.Content>
|
|
69
|
+
<Tab.Pane eventKey={`bdd-features`}>
|
|
70
|
+
<pre>
|
|
71
|
+
<code>{JSON.stringify(given.features, null, 2)}</code>
|
|
72
|
+
</pre>
|
|
73
|
+
</Tab.Pane>
|
|
41
74
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</Col>
|
|
65
|
-
<Col sm={6}>
|
|
66
|
-
<Tab.Content>
|
|
67
|
-
|
|
68
|
-
<Tab.Pane eventKey={`bdd-features`}>
|
|
69
|
-
<pre><code>{JSON.stringify(given.features, null, 2)}</code></pre>
|
|
70
|
-
</Tab.Pane>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
...given.whens.map((w, ndx) => <Tab.Pane eventKey={`bdd-when-${ndx}`}><StepPane step={w} /></Tab.Pane>)
|
|
75
|
-
}
|
|
76
|
-
{
|
|
77
|
-
...given.thens.map((t, ndx) => <Tab.Pane eventKey={`bdd-then-${ndx}`}><StepPane step={t} /></Tab.Pane>)
|
|
78
|
-
}
|
|
79
|
-
<Tab.Pane eventKey={`bdd-errors`}>
|
|
80
|
-
<pre><code>{JSON.stringify(given.error, null, 2)}</code></pre>
|
|
81
|
-
</Tab.Pane>
|
|
82
|
-
|
|
83
|
-
</Tab.Content>
|
|
84
|
-
</Col>
|
|
85
|
-
</Row>
|
|
86
|
-
</Tab.Container></div>
|
|
87
|
-
}
|
|
75
|
+
{...given.whens.map((w, ndx) => (
|
|
76
|
+
<Tab.Pane eventKey={`bdd-when-${ndx}`}>
|
|
77
|
+
<StepPane step={w} />
|
|
78
|
+
</Tab.Pane>
|
|
79
|
+
))}
|
|
80
|
+
{...given.thens.map((t, ndx) => (
|
|
81
|
+
<Tab.Pane eventKey={`bdd-then-${ndx}`}>
|
|
82
|
+
<StepPane step={t} />
|
|
83
|
+
</Tab.Pane>
|
|
84
|
+
))}
|
|
85
|
+
<Tab.Pane eventKey={`bdd-errors`}>
|
|
86
|
+
<pre>
|
|
87
|
+
<code>{JSON.stringify(given.error, null, 2)}</code>
|
|
88
|
+
</pre>
|
|
89
|
+
</Tab.Pane>
|
|
90
|
+
</Tab.Content>
|
|
91
|
+
</Col>
|
|
92
|
+
</Row>
|
|
93
|
+
</Tab.Container>
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
88
97
|
|
|
89
98
|
const BddPage = () => {
|
|
90
|
-
|
|
91
99
|
// const [configs, setConfigs] = useState<IBuiltConfig>();
|
|
92
100
|
// useEffect(() => {
|
|
93
101
|
// (async () => {
|
|
@@ -101,108 +109,114 @@ const BddPage = () => {
|
|
|
101
109
|
// })();
|
|
102
110
|
// }, []);
|
|
103
111
|
|
|
104
|
-
|
|
105
112
|
const [bddErrors, setBddErrors] = useState<{
|
|
106
|
-
name: string
|
|
107
|
-
|
|
108
|
-
|
|
113
|
+
name: string;
|
|
114
|
+
givens: {
|
|
115
|
+
key: string;
|
|
116
|
+
name: string;
|
|
109
117
|
whens: {
|
|
110
118
|
name: string;
|
|
111
119
|
error: string;
|
|
112
|
-
}[]
|
|
120
|
+
}[];
|
|
113
121
|
thens: {
|
|
114
122
|
name: string;
|
|
115
123
|
error: string;
|
|
116
|
-
}[]
|
|
117
|
-
}[]
|
|
124
|
+
}[];
|
|
125
|
+
}[];
|
|
118
126
|
}>();
|
|
119
127
|
useEffect(() => {
|
|
120
128
|
(async () => {
|
|
121
|
-
setBddErrors(
|
|
129
|
+
setBddErrors(
|
|
130
|
+
await (
|
|
131
|
+
await fetch(
|
|
132
|
+
`${window.location.href
|
|
133
|
+
.split("/")
|
|
134
|
+
.slice(0, -1)
|
|
135
|
+
.join("/")}/tests.json`
|
|
136
|
+
)
|
|
137
|
+
).json()
|
|
138
|
+
);
|
|
122
139
|
})();
|
|
123
140
|
}, []);
|
|
124
141
|
|
|
125
142
|
const [log, setLog] = useState<string>();
|
|
126
143
|
useEffect(() => {
|
|
127
144
|
(async () => {
|
|
128
|
-
setLog(
|
|
145
|
+
setLog(
|
|
146
|
+
await (
|
|
147
|
+
await fetch(
|
|
148
|
+
`${window.location.href.split("/").slice(0, -1).join("/")}/log.txt`
|
|
149
|
+
)
|
|
150
|
+
).text()
|
|
151
|
+
);
|
|
129
152
|
})();
|
|
130
153
|
}, []);
|
|
131
154
|
|
|
132
|
-
if (
|
|
133
|
-
return <div>loading...</div
|
|
155
|
+
if (bddErrors === undefined || log === undefined) {
|
|
156
|
+
return <div>loading...</div>;
|
|
134
157
|
}
|
|
135
158
|
|
|
136
|
-
return
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
...bddErrors.givens.map((g) =>
|
|
159
|
+
return (
|
|
160
|
+
<div>
|
|
161
|
+
{" "}
|
|
162
|
+
<Row>
|
|
163
|
+
<Col sm={12}>
|
|
164
|
+
<h2>{bddErrors.name}</h2>
|
|
165
|
+
</Col>
|
|
166
|
+
</Row>
|
|
167
|
+
<Row>
|
|
168
|
+
<Tab.Container id="root-tab-container" defaultActiveKey="log">
|
|
169
|
+
<Row>
|
|
170
|
+
<Col sm={1}>
|
|
171
|
+
<Nav variant="pills" className="flex-column">
|
|
172
|
+
<Nav.Item>
|
|
173
|
+
<Nav.Link eventKey={"log"}>log</Nav.Link>
|
|
174
|
+
<Nav.Link eventKey={"steps"}>steps</Nav.Link>
|
|
175
|
+
</Nav.Item>
|
|
176
|
+
</Nav>
|
|
177
|
+
</Col>
|
|
178
|
+
|
|
179
|
+
<Col sm={11}>
|
|
180
|
+
<Tab.Content>
|
|
181
|
+
<Tab.Pane eventKey={"log"}>
|
|
182
|
+
<pre>
|
|
183
|
+
<code>{log}</code>
|
|
184
|
+
</pre>
|
|
185
|
+
</Tab.Pane>
|
|
186
|
+
|
|
187
|
+
<Tab.Pane eventKey={"steps"}>
|
|
188
|
+
<Tab.Container
|
|
189
|
+
id="secondary-tab-container"
|
|
190
|
+
defaultActiveKey="first"
|
|
191
|
+
>
|
|
192
|
+
<Row>
|
|
193
|
+
<Col sm={3}>
|
|
194
|
+
<Nav variant="pills" className="flex-column">
|
|
195
|
+
{...bddErrors.givens.map((g) => (
|
|
174
196
|
<Nav.Item>
|
|
175
197
|
<Nav.Link eventKey={g.key}>
|
|
176
198
|
{g.key}: Given {g.name}
|
|
177
199
|
</Nav.Link>
|
|
178
200
|
</Nav.Item>
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
</Tab.Pane>
|
|
199
|
-
|
|
200
|
-
</Tab.Content>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
</Col>
|
|
204
|
-
|
|
205
|
-
{/* <Col sm={3}>
|
|
201
|
+
))}
|
|
202
|
+
</Nav>
|
|
203
|
+
</Col>
|
|
204
|
+
<Col sm={9}>
|
|
205
|
+
<Tab.Content>
|
|
206
|
+
{...bddErrors.givens.map((g) => (
|
|
207
|
+
<Tab.Pane eventKey={g.key}>
|
|
208
|
+
<TestPane given={g} />
|
|
209
|
+
</Tab.Pane>
|
|
210
|
+
))}
|
|
211
|
+
</Tab.Content>
|
|
212
|
+
</Col>
|
|
213
|
+
</Row>
|
|
214
|
+
</Tab.Container>
|
|
215
|
+
</Tab.Pane>
|
|
216
|
+
</Tab.Content>
|
|
217
|
+
</Col>
|
|
218
|
+
|
|
219
|
+
{/* <Col sm={3}>
|
|
206
220
|
|
|
207
221
|
|
|
208
222
|
|
|
@@ -234,25 +248,25 @@ const BddPage = () => {
|
|
|
234
248
|
}
|
|
235
249
|
</Tab.Content>
|
|
236
250
|
</Col> */}
|
|
237
|
-
|
|
238
|
-
</
|
|
239
|
-
</
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
+
</Row>
|
|
252
|
+
</Tab.Container>
|
|
253
|
+
</Row>
|
|
254
|
+
<div
|
|
255
|
+
style={{
|
|
256
|
+
backgroundColor: "lightgray",
|
|
257
|
+
margin: "0.5rem",
|
|
258
|
+
padding: "0.5rem",
|
|
259
|
+
position: "fixed",
|
|
260
|
+
left: 0,
|
|
261
|
+
bottom: 0,
|
|
262
|
+
}}
|
|
263
|
+
>
|
|
264
|
+
<a href="/">🏠</a>
|
|
265
|
+
</div>
|
|
266
|
+
<Footer />
|
|
251
267
|
</div>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
</div>
|
|
255
|
-
}
|
|
268
|
+
);
|
|
269
|
+
};
|
|
256
270
|
|
|
257
271
|
document.addEventListener("DOMContentLoaded", function () {
|
|
258
272
|
const elem = document.getElementById("root");
|