testeranto 0.134.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 +14577 -0
- package/.aider.input.history +566 -0
- package/.aider.tags.cache.v3/{8d/fa/12860238755bcfab9af8a93c52ab.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/{18/8b/7dfca822129dad10b5cacadf7728.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
- package/README.md +29 -423
- package/bundle.js +1 -1
- package/dist/common/src/CoreTypes.js +2 -0
- package/dist/common/src/Init.js +4 -1
- package/dist/common/src/Node.js +1 -1
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +10 -8
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/common/src/PM/main.js +12 -7
- package/dist/common/src/PM/node.js +10 -3
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/build.js +7 -72
- package/dist/common/src/defaultConfig.js +0 -1
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/common/src/esbuildConfigs/node.js +2 -16
- package/dist/common/src/esbuildConfigs/pure.js +2 -16
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
- package/dist/common/src/esbuildConfigs/web.js +2 -16
- package/dist/common/src/lib/abstractBase.js +8 -1
- package/dist/common/src/lib/basebuilder.js +4 -0
- package/dist/common/src/lib/classBuilder.js +2 -3
- 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/PM_WithEslintAndTsc.js +10 -8
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/module/src/PM/main.js +12 -7
- package/dist/module/src/PM/node.js +10 -3
- 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 -72
- package/dist/module/src/defaultConfig.js +0 -1
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/module/src/esbuildConfigs/node.js +2 -16
- package/dist/module/src/esbuildConfigs/pure.js +2 -16
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
- package/dist/module/src/esbuildConfigs/web.js +2 -16
- package/dist/module/src/lib/abstractBase.js +8 -1
- package/dist/module/src/lib/basebuilder.js +4 -0
- package/dist/module/src/lib/classBuilder.js +2 -3
- 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 +77 -29
- package/dist/prebuild/TestReport.js +51 -32
- package/dist/prebuild/build.mjs +132 -131
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
- package/dist/prebuild/init-docs.mjs +0 -4
- package/dist/prebuild/run.mjs +50 -31
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/CoreTypes.d.ts +53 -0
- package/dist/types/src/Node.d.ts +3 -3
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/index.d.ts +1 -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 +21 -61
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
- package/dist/types/src/lib/abstractBase.d.ts +10 -16
- 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 +2 -2
- package/dist/types/src/utils/buildTemplates.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +567 -0
- 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 +11 -2
- package/scripts/compile-docs.js +89 -0
- package/src/CoreTypes.ts +152 -0
- package/src/Init.ts +4 -4
- package/src/Node.ts +13 -13
- package/src/PM/PM_WithEslintAndTsc.ts +46 -15
- 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/index.ts +1 -1
- package/src/PM/main.ts +17 -16
- package/src/PM/node.ts +10 -10
- 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 +52 -151
- package/src/Web.ts +15 -14
- package/src/build.ts +22 -72
- package/src/defaultConfig.ts +2 -1
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
- package/src/esbuildConfigs/node.ts +2 -18
- package/src/esbuildConfigs/pure.ts +2 -18
- package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
- package/src/esbuildConfigs/web.ts +2 -18
- package/src/lib/BaseSuite.test.ts +457 -0
- package/src/lib/BaseSuite.ts +155 -0
- package/src/lib/abstractBase.ts +13 -163
- package/src/lib/basebuilder.ts +11 -11
- package/src/lib/classBuilder.ts +13 -7
- package/src/lib/core.ts +13 -17
- 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/.aider.tags.cache.v3/cache.db-shm +0 -0
- package/.aider.tags.cache.v3/cache.db-wal +0 -0
- 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/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/dist/{types/src/SP__Polygon.test.d.ts → module/src/CoreTypes.js} +0 -0
- /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/lib/abstractBase.ts
CHANGED
|
@@ -1,174 +1,19 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
import type { IT, OT } from "../Types.js";
|
|
4
3
|
|
|
5
|
-
import {
|
|
4
|
+
import { ITestArtifactory, ITLog, ITTestResourceConfiguration } from ".";
|
|
6
5
|
import { IPM } from "./types.js";
|
|
7
6
|
import {
|
|
8
|
-
afterAllProxy,
|
|
9
7
|
afterEachProxy,
|
|
10
8
|
andWhenProxy,
|
|
11
|
-
beforeAllProxy,
|
|
12
9
|
beforeEachProxy,
|
|
13
10
|
butThenProxy,
|
|
14
11
|
} from "./pmProxy.js";
|
|
12
|
+
import type { Ibdd_in_any } from "../CoreTypes";
|
|
15
13
|
|
|
16
|
-
export type IGivens<I extends
|
|
14
|
+
export type IGivens<I extends Ibdd_in_any> = Record<string, BaseGiven<I>>;
|
|
17
15
|
|
|
18
|
-
export abstract class
|
|
19
|
-
name: string;
|
|
20
|
-
givens: IGivens<I>;
|
|
21
|
-
checks: BaseCheck<I>[];
|
|
22
|
-
store: I["istore"];
|
|
23
|
-
testResourceConfiguration: ITTestResourceConfiguration;
|
|
24
|
-
index: number;
|
|
25
|
-
failed: boolean;
|
|
26
|
-
fails: number;
|
|
27
|
-
|
|
28
|
-
constructor(
|
|
29
|
-
name: string,
|
|
30
|
-
index: number,
|
|
31
|
-
givens: IGivens<I> = {},
|
|
32
|
-
checks: BaseCheck<I>[] = []
|
|
33
|
-
) {
|
|
34
|
-
this.name = name;
|
|
35
|
-
this.index = index;
|
|
36
|
-
this.givens = givens;
|
|
37
|
-
this.checks = checks;
|
|
38
|
-
this.fails = 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public features() {
|
|
42
|
-
const features = Object.keys(this.givens)
|
|
43
|
-
.map((k) => this.givens[k].features)
|
|
44
|
-
.flat()
|
|
45
|
-
.filter((value, index, array) => {
|
|
46
|
-
return array.indexOf(value) === index;
|
|
47
|
-
});
|
|
48
|
-
return features || [];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public toObj() {
|
|
52
|
-
const givens = Object.keys(this.givens).map((k) => this.givens[k].toObj());
|
|
53
|
-
const checks = Object.keys(this.checks).map((k) => this.checks[k].toObj());
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
name: this.name,
|
|
57
|
-
givens,
|
|
58
|
-
checks,
|
|
59
|
-
fails: this.fails,
|
|
60
|
-
failed: this.failed,
|
|
61
|
-
features: this.features(),
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
setup(
|
|
66
|
-
s: I["iinput"],
|
|
67
|
-
artifactory: ITestArtifactory,
|
|
68
|
-
tr: ITTestResourceConfiguration,
|
|
69
|
-
pm: IPM
|
|
70
|
-
): Promise<I["isubject"]> {
|
|
71
|
-
return new Promise((res) => res(s as unknown as I["isubject"]));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
assertThat(t: Awaited<I["then"]> | undefined): boolean {
|
|
75
|
-
return !!t;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
afterAll(store: I["istore"], artifactory: ITestArtifactory, pm: IPM) {
|
|
79
|
-
return store;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
async run(
|
|
83
|
-
input: I["iinput"],
|
|
84
|
-
testResourceConfiguration: ITTestResourceConfiguration,
|
|
85
|
-
artifactory: (fPath: string, value: unknown) => void,
|
|
86
|
-
tLog: (...string) => void,
|
|
87
|
-
pm: IPM
|
|
88
|
-
): Promise<BaseSuite<I, O>> {
|
|
89
|
-
this.testResourceConfiguration = testResourceConfiguration;
|
|
90
|
-
// tLog("test resources: ", JSON.stringify(testResourceConfiguration));
|
|
91
|
-
|
|
92
|
-
const suiteArtifactory = (fPath: string, value: unknown) =>
|
|
93
|
-
artifactory(`suite-${this.index}-${this.name}/${fPath}`, value);
|
|
94
|
-
|
|
95
|
-
// console.log("\nSuite:", this.index, this.name);
|
|
96
|
-
tLog("\nSuite:", this.index, this.name);
|
|
97
|
-
const sNdx = this.index;
|
|
98
|
-
// const sName = this.name;
|
|
99
|
-
|
|
100
|
-
const subject = await this.setup(
|
|
101
|
-
input,
|
|
102
|
-
suiteArtifactory,
|
|
103
|
-
testResourceConfiguration,
|
|
104
|
-
beforeAllProxy(pm, sNdx.toString())
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
for (const [gKey, g] of Object.entries(this.givens)) {
|
|
108
|
-
const giver = this.givens[gKey];
|
|
109
|
-
try {
|
|
110
|
-
this.store = await giver.give(
|
|
111
|
-
subject,
|
|
112
|
-
gKey,
|
|
113
|
-
testResourceConfiguration,
|
|
114
|
-
this.assertThat,
|
|
115
|
-
suiteArtifactory,
|
|
116
|
-
tLog,
|
|
117
|
-
pm,
|
|
118
|
-
sNdx
|
|
119
|
-
);
|
|
120
|
-
} catch (e) {
|
|
121
|
-
this.failed = true;
|
|
122
|
-
this.fails = this.fails + 1;
|
|
123
|
-
console.error(e);
|
|
124
|
-
// this.fails.push(giver);
|
|
125
|
-
// return this;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
for (const [ndx, thater] of this.checks.entries()) {
|
|
130
|
-
await thater.check(
|
|
131
|
-
subject,
|
|
132
|
-
thater.name,
|
|
133
|
-
testResourceConfiguration,
|
|
134
|
-
this.assertThat,
|
|
135
|
-
suiteArtifactory,
|
|
136
|
-
tLog,
|
|
137
|
-
pm
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
try {
|
|
142
|
-
this.afterAll(
|
|
143
|
-
this.store,
|
|
144
|
-
artifactory,
|
|
145
|
-
afterAllProxy(pm, sNdx.toString())
|
|
146
|
-
);
|
|
147
|
-
} catch (e) {
|
|
148
|
-
console.error(e);
|
|
149
|
-
// this.fails.push(this);
|
|
150
|
-
// return this;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// @TODO fix me
|
|
154
|
-
// for (const k of Object.keys(this.givens)) {
|
|
155
|
-
// const giver = this.givens[k];
|
|
156
|
-
|
|
157
|
-
// try {
|
|
158
|
-
// giver.afterAll(this.store, artifactory, pm);
|
|
159
|
-
// } catch (e) {
|
|
160
|
-
// console.error(e);
|
|
161
|
-
// this.fails.push(giver);
|
|
162
|
-
// return this;
|
|
163
|
-
// }
|
|
164
|
-
// }
|
|
165
|
-
////////////////
|
|
166
|
-
|
|
167
|
-
return this;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export abstract class BaseGiven<I extends IT = IT> {
|
|
16
|
+
export abstract class BaseGiven<I extends Ibdd_in_any> {
|
|
172
17
|
name: string;
|
|
173
18
|
features: string[];
|
|
174
19
|
whens: BaseWhen<I>[];
|
|
@@ -206,7 +51,12 @@ export abstract class BaseGiven<I extends IT = IT> {
|
|
|
206
51
|
return {
|
|
207
52
|
key: this.key,
|
|
208
53
|
name: this.name,
|
|
209
|
-
whens: this.whens.map((w) =>
|
|
54
|
+
whens: this.whens.map((w) => {
|
|
55
|
+
if (w && w.toObj) return w.toObj();
|
|
56
|
+
|
|
57
|
+
console.error("w is not as expected!", w);
|
|
58
|
+
return {};
|
|
59
|
+
}),
|
|
210
60
|
thens: this.thens.map((t) => t.toObj()),
|
|
211
61
|
error: this.error ? [this.error, this.error.stack] : null,
|
|
212
62
|
failed: this.failed,
|
|
@@ -324,7 +174,7 @@ export abstract class BaseGiven<I extends IT = IT> {
|
|
|
324
174
|
}
|
|
325
175
|
}
|
|
326
176
|
|
|
327
|
-
export abstract class BaseWhen<I extends
|
|
177
|
+
export abstract class BaseWhen<I extends Ibdd_in_any> {
|
|
328
178
|
public name: string;
|
|
329
179
|
whenCB: (x: I["iselection"]) => I["then"];
|
|
330
180
|
error: Error;
|
|
@@ -371,7 +221,7 @@ export abstract class BaseWhen<I extends IT> {
|
|
|
371
221
|
}
|
|
372
222
|
}
|
|
373
223
|
|
|
374
|
-
export abstract class BaseThen<I extends
|
|
224
|
+
export abstract class BaseThen<I extends Ibdd_in_any> {
|
|
375
225
|
public name: string;
|
|
376
226
|
thenCB: (storeState: I["iselection"]) => Promise<I["then"]>;
|
|
377
227
|
error: boolean;
|
|
@@ -430,7 +280,7 @@ export abstract class BaseThen<I extends IT> {
|
|
|
430
280
|
check() {}
|
|
431
281
|
}
|
|
432
282
|
|
|
433
|
-
export abstract class BaseCheck<I extends
|
|
283
|
+
export abstract class BaseCheck<I extends Ibdd_in_any> {
|
|
434
284
|
key: string;
|
|
435
285
|
name: string;
|
|
436
286
|
features: string[];
|
package/src/lib/basebuilder.ts
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
3
3
|
/* eslint-disable no-async-promise-executor */
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
+
|
|
5
6
|
import { PassThrough } from "stream";
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import type {
|
|
9
|
+
Ibdd_in_any,
|
|
10
|
+
Ibdd_out_any,
|
|
11
|
+
ITestSpecification,
|
|
12
|
+
} from "../CoreTypes";
|
|
8
13
|
|
|
9
|
-
import {
|
|
14
|
+
import { ITestJob, ITLog, IFinalResults, ITTestResourceRequest } from ".";
|
|
10
15
|
import {
|
|
11
16
|
ISuiteKlasser,
|
|
12
17
|
IGivenKlasser,
|
|
@@ -15,17 +20,12 @@ import {
|
|
|
15
20
|
ICheckKlasser,
|
|
16
21
|
IPM,
|
|
17
22
|
} from "./types.js";
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
BaseSuite,
|
|
21
|
-
BaseWhen,
|
|
22
|
-
BaseThen,
|
|
23
|
-
BaseGiven,
|
|
24
|
-
} from "./abstractBase.js";
|
|
23
|
+
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
24
|
+
import { BaseSuite } from "./BaseSuite";
|
|
25
25
|
|
|
26
26
|
export abstract class BaseBuilder<
|
|
27
|
-
I extends
|
|
28
|
-
O extends
|
|
27
|
+
I extends Ibdd_in_any,
|
|
28
|
+
O extends Ibdd_out_any,
|
|
29
29
|
SuiteExtensions,
|
|
30
30
|
GivenExtensions,
|
|
31
31
|
WhenExtensions,
|
package/src/lib/classBuilder.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
import {
|
|
3
|
+
import type {
|
|
4
|
+
Ibdd_in_any,
|
|
5
|
+
Ibdd_out_any,
|
|
6
|
+
ITestImplementation,
|
|
7
|
+
ITestSpecification,
|
|
8
|
+
} from "../CoreTypes";
|
|
4
9
|
|
|
5
10
|
import { BaseBuilder } from "./basebuilder.js";
|
|
6
11
|
import {
|
|
@@ -16,8 +21,8 @@ import { BaseCheck } from "./abstractBase.js";
|
|
|
16
21
|
type IExtenstions = Record<string, unknown>;
|
|
17
22
|
|
|
18
23
|
export abstract class ClassBuilder<
|
|
19
|
-
I extends
|
|
20
|
-
O extends
|
|
24
|
+
I extends Ibdd_in_any = Ibdd_in_any,
|
|
25
|
+
O extends Ibdd_out_any = Ibdd_out_any,
|
|
21
26
|
M = unknown
|
|
22
27
|
> extends BaseBuilder<
|
|
23
28
|
I,
|
|
@@ -63,7 +68,6 @@ export abstract class ClassBuilder<
|
|
|
63
68
|
const classyGivens = Object.entries(testImplementation.givens).reduce(
|
|
64
69
|
(a, [key, g]) => {
|
|
65
70
|
a[key] = (features, whens, thens, ...initialValues) => {
|
|
66
|
-
// console.log("givEn", givEn.toString());
|
|
67
71
|
return new givenKlasser.prototype.constructor(
|
|
68
72
|
key,
|
|
69
73
|
features,
|
|
@@ -80,10 +84,10 @@ export abstract class ClassBuilder<
|
|
|
80
84
|
|
|
81
85
|
const classyWhens = Object.entries(testImplementation.whens).reduce(
|
|
82
86
|
(a, [key, whEn]: [string, (x) => any]) => {
|
|
83
|
-
a[key] = (payload
|
|
87
|
+
a[key] = (...payload: any) => {
|
|
84
88
|
return new whenKlasser.prototype.constructor(
|
|
85
89
|
`${whEn.name}: ${payload && payload.toString()}`,
|
|
86
|
-
whEn(payload)
|
|
90
|
+
whEn(...payload)
|
|
87
91
|
);
|
|
88
92
|
};
|
|
89
93
|
return a;
|
|
@@ -91,7 +95,9 @@ export abstract class ClassBuilder<
|
|
|
91
95
|
{}
|
|
92
96
|
);
|
|
93
97
|
|
|
94
|
-
const classyThens = Object.entries<(expected: any, ...x: any[]) => any>(
|
|
98
|
+
const classyThens = Object.entries<(expected: any, ...x: any[]) => any>(
|
|
99
|
+
testImplementation.thens
|
|
100
|
+
).reduce(
|
|
95
101
|
(a, [key, thEn]: [string, (s: I["iselection"]) => I["isubject"]]) => {
|
|
96
102
|
a[key] = (expected, ...x) => {
|
|
97
103
|
return new thenKlasser.prototype.constructor(
|
package/src/lib/core.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import {
|
|
3
|
-
ITestSpecification,
|
|
4
|
-
ITestImplementation,
|
|
5
|
-
ITestInterface,
|
|
6
|
-
IT,
|
|
7
|
-
OT,
|
|
8
|
-
} from "../Types.js";
|
|
9
|
-
|
|
10
3
|
import {
|
|
11
4
|
DefaultTestInterface,
|
|
12
5
|
IFinalResults,
|
|
@@ -15,19 +8,22 @@ import {
|
|
|
15
8
|
ITestArtifactory,
|
|
16
9
|
defaultTestResourceRequirement,
|
|
17
10
|
} from "./index.js";
|
|
18
|
-
import {
|
|
19
|
-
BaseSuite,
|
|
20
|
-
BaseGiven,
|
|
21
|
-
BaseWhen,
|
|
22
|
-
BaseThen,
|
|
23
|
-
BaseCheck,
|
|
24
|
-
} from "./abstractBase.js";
|
|
11
|
+
import { BaseGiven, BaseWhen, BaseThen, BaseCheck } from "./abstractBase.js";
|
|
25
12
|
import { ClassBuilder } from "./classBuilder.js";
|
|
26
13
|
import { IPM } from "./types";
|
|
27
14
|
|
|
15
|
+
import type {
|
|
16
|
+
Ibdd_in_any,
|
|
17
|
+
Ibdd_out_any,
|
|
18
|
+
ITestImplementation,
|
|
19
|
+
ITestInterface,
|
|
20
|
+
ITestSpecification,
|
|
21
|
+
} from "../CoreTypes";
|
|
22
|
+
import { BaseSuite } from "./BaseSuite.js";
|
|
23
|
+
|
|
28
24
|
export default abstract class Testeranto<
|
|
29
|
-
I extends
|
|
30
|
-
O extends
|
|
25
|
+
I extends Ibdd_in_any,
|
|
26
|
+
O extends Ibdd_out_any,
|
|
31
27
|
M
|
|
32
28
|
> extends ClassBuilder<I, O, M> {
|
|
33
29
|
constructor(
|
package/src/lib/index.ts
CHANGED
|
@@ -4,21 +4,20 @@ import { PM_Pure } from "../PM/pure.js";
|
|
|
4
4
|
|
|
5
5
|
import { PM_Node } from "../PM/node.js";
|
|
6
6
|
import { PM_Web } from "../PM/web.js";
|
|
7
|
-
import {
|
|
8
|
-
Ibdd_in,
|
|
9
|
-
ITestInterface,
|
|
10
|
-
ITestconfig,
|
|
11
|
-
IBuiltConfig,
|
|
12
|
-
IRunTime,
|
|
13
|
-
ITestTypes,
|
|
14
|
-
IT,
|
|
15
|
-
OT,
|
|
16
|
-
} from "../Types.js";
|
|
17
|
-
|
|
18
|
-
import { IGivens, BaseCheck, BaseSuite } from "./abstractBase.js";
|
|
19
|
-
import { IPM } from "./types.js";
|
|
7
|
+
import { ITestconfig, IBuiltConfig, IRunTime, ITestTypes } from "../Types.js";
|
|
20
8
|
|
|
21
|
-
|
|
9
|
+
import { IGivens, BaseCheck } from "./abstractBase.js";
|
|
10
|
+
import { IPM } from "./types.js";
|
|
11
|
+
import type {
|
|
12
|
+
ITestInterface,
|
|
13
|
+
Ibdd_in_any,
|
|
14
|
+
Ibdd_out_any,
|
|
15
|
+
} from "../CoreTypes.js";
|
|
16
|
+
import { BaseSuite } from "./BaseSuite.js";
|
|
17
|
+
|
|
18
|
+
export const BaseTestInterface = <
|
|
19
|
+
T extends Ibdd_in_any
|
|
20
|
+
>(): ITestInterface<T> => ({
|
|
22
21
|
beforeAll: async (s: T["istore"]) => s,
|
|
23
22
|
beforeEach: async function (
|
|
24
23
|
subject: T["isubject"],
|
|
@@ -32,14 +31,14 @@ export const BaseTestInterface = <T extends IT>(): ITestInterface<T> => ({
|
|
|
32
31
|
afterEach: async (s: T["istore"]) => s,
|
|
33
32
|
afterAll: (store: T["istore"]) => undefined,
|
|
34
33
|
butThen: async (
|
|
35
|
-
store:
|
|
36
|
-
thenCb: (s:
|
|
34
|
+
store: T["istore"],
|
|
35
|
+
thenCb: (s: T["iselection"]) => Promise<T["isubject"]>
|
|
37
36
|
) => {
|
|
38
37
|
return thenCb(store);
|
|
39
38
|
},
|
|
40
39
|
andWhen: async (
|
|
41
|
-
store:
|
|
42
|
-
whenCB:
|
|
40
|
+
store: T["istore"],
|
|
41
|
+
whenCB: T["when"],
|
|
43
42
|
testResource: ITTestResourceConfiguration,
|
|
44
43
|
pm: IPM
|
|
45
44
|
) => {
|
|
@@ -53,7 +52,7 @@ export const BaseTestInterface = <T extends IT>(): ITestInterface<T> => ({
|
|
|
53
52
|
assertThis: (x: any) => x,
|
|
54
53
|
});
|
|
55
54
|
|
|
56
|
-
export const DefaultTestInterface = <T extends
|
|
55
|
+
export const DefaultTestInterface = <T extends Ibdd_in_any>(
|
|
57
56
|
p: Partial<ITestInterface<T>>
|
|
58
57
|
): ITestInterface<T> => {
|
|
59
58
|
return {
|
|
@@ -99,10 +98,8 @@ export type ITestArtificer = (key: string, data: any) => void;
|
|
|
99
98
|
type ITest = {
|
|
100
99
|
toObj(): object;
|
|
101
100
|
name: string;
|
|
102
|
-
givens: IGivens<
|
|
103
|
-
|
|
104
|
-
>;
|
|
105
|
-
checks: BaseCheck<IT>[];
|
|
101
|
+
givens: IGivens<Ibdd_in_any>;
|
|
102
|
+
checks: BaseCheck<Ibdd_in_any>[];
|
|
106
103
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
107
104
|
};
|
|
108
105
|
|
|
@@ -112,7 +109,7 @@ export type ITestJob = {
|
|
|
112
109
|
runner: (
|
|
113
110
|
x: ITTestResourceConfiguration,
|
|
114
111
|
t: ITLog
|
|
115
|
-
) => Promise<BaseSuite<
|
|
112
|
+
) => Promise<BaseSuite<Ibdd_in_any, Ibdd_out_any>>;
|
|
116
113
|
testResourceRequirement: ITTestResourceRequirement;
|
|
117
114
|
receiveTestResourceConfig: (pm: PM_Node | PM_Web | PM_Pure) => IFinalResults;
|
|
118
115
|
};
|
package/src/lib/types.ts
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import type { Ibdd_in_any, Ibdd_out_any } from "../CoreTypes";
|
|
2
3
|
import { PM_Node } from "../PM/node";
|
|
3
4
|
import { PM_Pure } from "../PM/pure";
|
|
4
5
|
import { PM_Web } from "../PM/web";
|
|
5
|
-
import type { IT, OT } from "../Types";
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
IGivens,
|
|
9
9
|
BaseCheck,
|
|
10
|
-
BaseSuite,
|
|
11
10
|
BaseGiven,
|
|
12
11
|
BaseWhen,
|
|
13
12
|
BaseThen,
|
|
14
13
|
} from "./abstractBase";
|
|
14
|
+
import { BaseSuite } from "./BaseSuite";
|
|
15
15
|
|
|
16
16
|
export type IPM = PM_Node | PM_Web | PM_Pure;
|
|
17
17
|
|
|
18
|
-
export type TestPhase =
|
|
18
|
+
export type TestPhase =
|
|
19
|
+
| "beforeAll"
|
|
20
|
+
| "beforeEach"
|
|
21
|
+
| "test"
|
|
22
|
+
| "afterEach"
|
|
23
|
+
| "afterAll";
|
|
19
24
|
|
|
20
25
|
export type TestError = {
|
|
21
26
|
phase: TestPhase;
|
|
@@ -27,7 +32,10 @@ export type TestError = {
|
|
|
27
32
|
isRetryable?: boolean;
|
|
28
33
|
};
|
|
29
34
|
|
|
30
|
-
export type ITestCheckCallback<
|
|
35
|
+
export type ITestCheckCallback<
|
|
36
|
+
I extends Ibdd_in_any,
|
|
37
|
+
O extends Ibdd_out_any
|
|
38
|
+
> = {
|
|
31
39
|
[K in keyof O["checks"]]: (
|
|
32
40
|
name: string,
|
|
33
41
|
features: string[],
|
|
@@ -37,14 +45,14 @@ export type ITestCheckCallback<I extends IT, O extends OT> = {
|
|
|
37
45
|
) => BaseCheck<I>;
|
|
38
46
|
};
|
|
39
47
|
|
|
40
|
-
export type ISuiteKlasser<I extends
|
|
48
|
+
export type ISuiteKlasser<I extends Ibdd_in_any, O extends Ibdd_out_any> = (
|
|
41
49
|
name: string,
|
|
42
50
|
index: number,
|
|
43
51
|
givens: IGivens<I>,
|
|
44
52
|
checks: BaseCheck<I>[]
|
|
45
53
|
) => BaseSuite<I, O>;
|
|
46
54
|
|
|
47
|
-
export type IGivenKlasser<I extends
|
|
55
|
+
export type IGivenKlasser<I extends Ibdd_in_any> = (
|
|
48
56
|
name,
|
|
49
57
|
features,
|
|
50
58
|
whens,
|
|
@@ -52,8 +60,14 @@ export type IGivenKlasser<I extends IT> = (
|
|
|
52
60
|
givenCB
|
|
53
61
|
) => BaseGiven<I>;
|
|
54
62
|
|
|
55
|
-
export type IWhenKlasser<I extends
|
|
63
|
+
export type IWhenKlasser<I extends Ibdd_in_any> = (s, o) => BaseWhen<I>;
|
|
56
64
|
|
|
57
|
-
export type IThenKlasser<I extends
|
|
65
|
+
export type IThenKlasser<I extends Ibdd_in_any> = (s, o) => BaseThen<I>;
|
|
58
66
|
|
|
59
|
-
export type ICheckKlasser<I extends
|
|
67
|
+
export type ICheckKlasser<I extends Ibdd_in_any> = (
|
|
68
|
+
n,
|
|
69
|
+
f,
|
|
70
|
+
cb,
|
|
71
|
+
w,
|
|
72
|
+
t
|
|
73
|
+
) => BaseCheck<I>;
|
package/src/mothership/test.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
-
import { ITTestResourceConfiguration } from "../lib";
|
|
4
|
-
import { IPM } from "../lib/types";
|
|
5
|
-
import Testeranto from "../Node";
|
|
6
|
-
import { PM } from "../PM";
|
|
7
|
-
|
|
8
3
|
import {
|
|
4
|
+
Ibdd_in,
|
|
9
5
|
Ibdd_out,
|
|
10
6
|
ITestSpecification,
|
|
11
|
-
IT,
|
|
12
7
|
ITestImplementation,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "../
|
|
8
|
+
Ibdd_in_any,
|
|
9
|
+
} from "../CoreTypes";
|
|
10
|
+
import { ITTestResourceConfiguration } from "../lib";
|
|
11
|
+
import { IPM } from "../lib/types";
|
|
12
|
+
import Testeranto from "../Node";
|
|
13
|
+
import { PM } from "../PM";
|
|
16
14
|
|
|
17
15
|
import appFactory from "./index";
|
|
18
16
|
|
|
@@ -49,7 +47,12 @@ type O = Ibdd_out<
|
|
|
49
47
|
}
|
|
50
48
|
>;
|
|
51
49
|
|
|
52
|
-
const specification: ITestSpecification<
|
|
50
|
+
const specification: ITestSpecification<Ibdd_in_any, O> = (
|
|
51
|
+
Suite,
|
|
52
|
+
Given,
|
|
53
|
+
When,
|
|
54
|
+
Then
|
|
55
|
+
) => {
|
|
53
56
|
console.log("Suite", Suite);
|
|
54
57
|
return [
|
|
55
58
|
Suite.TheMothership(
|
package/src/run.ts
CHANGED
package/src/style.css
CHANGED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export const testReportPage = (packageName: string, domain: string) => {
|
|
2
|
+
return `
|
|
3
|
+
<!DOCTYPE html>
|
|
4
|
+
<html lang="en">
|
|
5
|
+
|
|
6
|
+
<head>
|
|
7
|
+
<meta name="description" content="Webpage description goes here" />
|
|
8
|
+
<meta charset="utf-8" />
|
|
9
|
+
<title>${packageName} - testeranto</title>
|
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
11
|
+
<meta name="author" content="" />
|
|
12
|
+
|
|
13
|
+
<base href="${domain}" target="_blank">
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../ReportClient.css" />
|
|
16
|
+
<script type="module" src="../ReportClient.js"></script>
|
|
17
|
+
|
|
18
|
+
</head>
|
|
19
|
+
|
|
20
|
+
<body>
|
|
21
|
+
<div id="root">
|
|
22
|
+
react is loading
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
|
|
26
|
+
</html>
|
|
27
|
+
`;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const testsReportPage = (
|
|
31
|
+
packageName: string,
|
|
32
|
+
domain: string,
|
|
33
|
+
projects
|
|
34
|
+
) => {
|
|
35
|
+
return `
|
|
36
|
+
<!DOCTYPE html>
|
|
37
|
+
<html lang="en">
|
|
38
|
+
|
|
39
|
+
<head>
|
|
40
|
+
<meta name="description" content="Webpage description goes here" />
|
|
41
|
+
<meta charset="utf-8" />
|
|
42
|
+
<title>${packageName} - testeranto</title>
|
|
43
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
44
|
+
<meta name="author" content="" />
|
|
45
|
+
<base href="${domain}" target="_blank">
|
|
46
|
+
|
|
47
|
+
<script type="application/json" id="bigConfig">
|
|
48
|
+
${JSON.stringify(Object.keys(projects))}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<link rel="stylesheet" href="./testeranto/Project.css" />
|
|
52
|
+
<script type="module" src="./testeranto/Project.js"></script>
|
|
53
|
+
|
|
54
|
+
</head>
|
|
55
|
+
|
|
56
|
+
<body>
|
|
57
|
+
<div id="root">
|
|
58
|
+
react is loading
|
|
59
|
+
</div>
|
|
60
|
+
</body>
|
|
61
|
+
|
|
62
|
+
</html>
|
|
63
|
+
`;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const idkPage = (testName: string, domain: string) => {
|
|
67
|
+
return `
|
|
68
|
+
<!DOCTYPE html>
|
|
69
|
+
<html lang="en">
|
|
70
|
+
|
|
71
|
+
<head>
|
|
72
|
+
<meta name="description" content="Webpage description goes here" />
|
|
73
|
+
<base href="${domain}" target="_blank">
|
|
74
|
+
<meta charset="utf-8" />
|
|
75
|
+
<title>${testName} - testeranto</title>
|
|
76
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
77
|
+
<meta name="author" content="" />
|
|
78
|
+
|
|
79
|
+
<link rel="stylesheet" href="./testeranto/TestReport.css" />
|
|
80
|
+
<script src="./testeranto/TestReport.js"></script>
|
|
81
|
+
|
|
82
|
+
</head>
|
|
83
|
+
|
|
84
|
+
<body>
|
|
85
|
+
<div id="root"/>
|
|
86
|
+
</body>
|
|
87
|
+
`;
|
|
88
|
+
};
|