testeranto 0.114.1 → 0.121.1
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/README.md +6 -1
- package/bundle.js +1 -1
- package/dist/common/Init.js +55 -61
- package/dist/common/PM/base.js +233 -0
- package/dist/common/PM/main.js +217 -434
- package/dist/common/build.js +113 -92
- package/dist/common/defaultConfig.js +2 -2
- package/dist/common/esbuildConfigs/index.js +1 -1
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +7 -3
- package/dist/common/esbuildConfigs/node.js +5 -3
- package/dist/common/esbuildConfigs/web.js +3 -3
- package/dist/common/init-docs.js +2 -46
- package/dist/common/lib/abstractBase.js +60 -54
- package/dist/common/lib/basebuilder.js +7 -8
- package/dist/common/lib/classBuilder.js +8 -5
- package/dist/common/lib/core.js +6 -18
- package/dist/common/lib/index.js +6 -1
- package/dist/common/run.js +10 -2
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/utils.js +9 -21
- package/dist/module/Init.js +55 -61
- package/dist/module/PM/base.js +226 -0
- package/dist/module/PM/main.js +218 -435
- package/dist/module/Project.js +117 -0
- package/dist/module/TestReport.js +13 -4
- package/dist/module/build.js +113 -92
- package/dist/module/defaultConfig.js +2 -2
- package/dist/module/esbuildConfigs/index.js +1 -1
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +7 -3
- package/dist/module/esbuildConfigs/node.js +5 -3
- package/dist/module/esbuildConfigs/web.js +3 -3
- package/dist/module/init-docs.js +2 -13
- package/dist/module/lib/abstractBase.js +60 -54
- package/dist/module/lib/basebuilder.js +7 -8
- package/dist/module/lib/classBuilder.js +8 -5
- package/dist/module/lib/core.js +6 -18
- package/dist/module/lib/index.js +6 -1
- package/dist/module/run.js +10 -2
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/utils.js +8 -17
- package/dist/prebuild/Project.css +11367 -0
- package/dist/prebuild/Project.js +24640 -0
- package/dist/prebuild/ReportClient.js +1 -1
- package/dist/prebuild/TestReport.js +9 -11
- package/dist/prebuild/build.mjs +142 -81
- package/dist/prebuild/init-docs.mjs +28 -83
- package/dist/prebuild/run.mjs +618 -537
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/Init.d.ts +1 -1
- package/dist/types/PM/base.d.ts +38 -0
- package/dist/types/PM/main.d.ts +20 -44
- package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +1 -1
- package/dist/types/esbuildConfigs/node.d.ts +1 -1
- package/dist/types/esbuildConfigs/web.d.ts +1 -1
- package/dist/types/lib/abstractBase.d.ts +19 -11
- package/dist/types/lib/basebuilder.d.ts +1 -2
- package/dist/types/lib/index.d.ts +3 -3
- package/dist/types/lib/types.d.ts +2 -5
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils.d.ts +4 -7
- package/package.json +6 -5
- package/src/Init.ts +60 -68
- package/src/PM/base.ts +301 -0
- package/src/PM/main.ts +276 -567
- package/src/Project.tsx +197 -0
- package/src/ReportClient.tsx +1 -1
- package/src/TestReport.tsx +30 -15
- package/src/build.ts +140 -104
- package/src/defaultConfig.ts +2 -2
- package/src/esbuildConfigs/index.ts +1 -1
- package/src/esbuildConfigs/inputFilesPlugin.ts +7 -6
- package/src/esbuildConfigs/node.ts +5 -3
- package/src/esbuildConfigs/web.ts +4 -3
- package/src/init-docs.ts +2 -15
- package/src/lib/abstractBase.ts +113 -93
- package/src/lib/basebuilder.ts +8 -9
- package/src/lib/classBuilder.ts +11 -10
- package/src/lib/core.ts +15 -27
- package/src/lib/index.ts +13 -6
- package/src/lib/types.ts +3 -8
- package/src/run.ts +21 -5
- package/src/utils.ts +27 -39
- package/tsc.log +12 -23
- package/dist/common/puppeteerConfiger.js +0 -24
- package/dist/module/puppeteerConfiger.js +0 -19
- package/dist/types/puppeteerConfiger.d.ts +0 -4
- package/src/puppeteerConfiger.ts +0 -26
package/dist/types/Init.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (
|
|
1
|
+
declare const _default: () => Promise<void>;
|
|
2
2
|
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CdpPage } from "puppeteer-core/lib/esm/puppeteer";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { Browser } from "puppeteer-core";
|
|
4
|
+
import { PassThrough } from "stream";
|
|
5
|
+
import { IBuiltConfig, ITLog } from "../lib/index.js";
|
|
6
|
+
import { PM } from "./index.js";
|
|
7
|
+
export declare abstract class PM_Base extends PM {
|
|
8
|
+
browser: Browser;
|
|
9
|
+
configs: IBuiltConfig;
|
|
10
|
+
constructor(configs: IBuiltConfig);
|
|
11
|
+
customclose(): void;
|
|
12
|
+
waitForSelector(p: string, s: string): any;
|
|
13
|
+
closePage(p: any): any;
|
|
14
|
+
newPage(): CdpPage;
|
|
15
|
+
goto(p: any, url: string): any;
|
|
16
|
+
$(selector: string): boolean;
|
|
17
|
+
screencast(opts: object): void;
|
|
18
|
+
customScreenShot(opts: object, cdpPage?: CdpPage): void;
|
|
19
|
+
end(accessObject: {
|
|
20
|
+
uid: number;
|
|
21
|
+
}): boolean;
|
|
22
|
+
existsSync(destFolder: string): boolean;
|
|
23
|
+
mkdirSync(fp: string): Promise<string | false | undefined>;
|
|
24
|
+
writeFileSync(fp: string, contents: string): void;
|
|
25
|
+
createWriteStream(filepath: string): fs.WriteStream;
|
|
26
|
+
testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise: any) => void): (fPath: any, value: string | Buffer | PassThrough) => void;
|
|
27
|
+
write(accessObject: {
|
|
28
|
+
uid: number;
|
|
29
|
+
}, contents: string): boolean;
|
|
30
|
+
page(): string | undefined;
|
|
31
|
+
click(selector: string): string | undefined;
|
|
32
|
+
focusOn(selector: string): void;
|
|
33
|
+
typeInto(value: string): void;
|
|
34
|
+
getValue(value: string): void;
|
|
35
|
+
getAttribute(selector: string, attribute: string): void;
|
|
36
|
+
isDisabled(selector: string): Promise<boolean>;
|
|
37
|
+
screencastStop(s: string): void;
|
|
38
|
+
}
|
package/dist/types/PM/main.d.ts
CHANGED
|
@@ -1,51 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Page } from "puppeteer-core/lib/esm/puppeteer";
|
|
2
2
|
import fs from "fs";
|
|
3
|
-
import {
|
|
4
|
-
import { PassThrough } from "stream";
|
|
5
|
-
import { IBuiltConfig, ITestTypes, ITLog } from "../lib/index.js";
|
|
3
|
+
import { IBuiltConfig, IRunnables, ITestTypes } from "../lib/index.js";
|
|
6
4
|
import { ISummary } from "../utils";
|
|
7
|
-
import {
|
|
8
|
-
export declare class PM_Main extends
|
|
9
|
-
|
|
10
|
-
shutdownMode: boolean;
|
|
11
|
-
configs: IBuiltConfig;
|
|
5
|
+
import { PM_Base } from "./base.js";
|
|
6
|
+
export declare class PM_Main extends PM_Base {
|
|
7
|
+
name: string;
|
|
12
8
|
ports: Record<number, boolean>;
|
|
13
9
|
queue: any[];
|
|
14
|
-
mode: "
|
|
10
|
+
mode: "once" | "dev";
|
|
15
11
|
bigBoard: ISummary;
|
|
16
12
|
webMetafileWatcher: fs.FSWatcher;
|
|
17
13
|
nodeMetafileWatcher: fs.FSWatcher;
|
|
18
|
-
constructor(configs: IBuiltConfig);
|
|
14
|
+
constructor(configs: IBuiltConfig, name: string, mode: "once" | "dev");
|
|
15
|
+
start(): Promise<any>;
|
|
19
16
|
stop: () => void;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
goto(p: any, url: string): any;
|
|
25
|
-
$(selector: string): boolean;
|
|
26
|
-
screencast(opts: object): void;
|
|
27
|
-
customScreenShot(opts: object, cdpPage?: CdpPage): void;
|
|
28
|
-
end(accessObject: {
|
|
29
|
-
uid: number;
|
|
30
|
-
}): boolean;
|
|
31
|
-
existsSync(destFolder: string): boolean;
|
|
32
|
-
mkdirSync(fp: string): Promise<string | false | undefined>;
|
|
33
|
-
writeFileSync(fp: string, contents: string): void;
|
|
34
|
-
createWriteStream(filepath: string): fs.WriteStream;
|
|
35
|
-
testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise: any) => void): (fPath: any, value: string | Buffer | PassThrough) => void;
|
|
36
|
-
write(accessObject: {
|
|
37
|
-
uid: number;
|
|
38
|
-
}, contents: string): boolean;
|
|
39
|
-
page(): string | undefined;
|
|
40
|
-
click(selector: string): string | undefined;
|
|
41
|
-
focusOn(selector: string): void;
|
|
42
|
-
typeInto(value: string): void;
|
|
43
|
-
getValue(value: string): void;
|
|
44
|
-
getAttribute(selector: string, attribute: string): void;
|
|
45
|
-
isDisabled(selector: string): Promise<boolean>;
|
|
46
|
-
screencastStop(s: string): void;
|
|
17
|
+
getRunnables: (tests: ITestTypes[], payload?: {
|
|
18
|
+
nodeEntryPoints: {};
|
|
19
|
+
webEntryPoints: {};
|
|
20
|
+
}) => IRunnables;
|
|
47
21
|
metafileOutputs(platform: "web" | "node"): Promise<void>;
|
|
48
|
-
start(): Promise<any>;
|
|
49
22
|
tscCheck: ({ entrypoint, addableFiles, platform, }: {
|
|
50
23
|
platform: "web" | "node";
|
|
51
24
|
entrypoint: string;
|
|
@@ -54,13 +27,16 @@ export declare class PM_Main extends PM {
|
|
|
54
27
|
eslintCheck: (entrypoint: string, platform: "web" | "node", addableFiles: string[]) => Promise<void>;
|
|
55
28
|
makePrompt: (entryPoint: string, addableFiles: string[], platform: "web" | "node") => Promise<void>;
|
|
56
29
|
checkForShutdown: () => void;
|
|
57
|
-
|
|
58
|
-
|
|
30
|
+
typeCheckIsRunning: (src: string) => void;
|
|
31
|
+
typeCheckIsNowDone: (src: string, failures: number) => void;
|
|
32
|
+
lintIsRunning: (src: string) => void;
|
|
33
|
+
lintIsNowDone: (src: string, failures: number) => void;
|
|
34
|
+
bddTestIsRunning: (src: string) => void;
|
|
35
|
+
bddTestIsNowDone: (src: string, failures: number) => void;
|
|
59
36
|
launchNode: (src: string, dest: string) => Promise<void>;
|
|
60
37
|
launchWebSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<Page>;
|
|
61
38
|
launchNodeSideCar: (src: string, dest: string, testConfig: ITestTypes) => Promise<void>;
|
|
62
|
-
launchWeb: (
|
|
63
|
-
receiveFeatures: (features: string[], destFolder: string, srcTest: string) => void;
|
|
64
|
-
receiveExitCode: (srcTest: string, failures: number) => void;
|
|
39
|
+
launchWeb: (src: string, dest: string) => void;
|
|
40
|
+
receiveFeatures: (features: string[], destFolder: string, srcTest: string, platform: "node" | "web") => void;
|
|
65
41
|
writeBigBoard: () => void;
|
|
66
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Plugin } from "esbuild";
|
|
2
|
-
declare const _default: (platform: "web" | "node",
|
|
2
|
+
declare const _default: (platform: "web" | "node", testName: string) => {
|
|
3
3
|
register: (entrypoint: string, sources: string[]) => void;
|
|
4
4
|
inputFilesPluginFactory: Plugin;
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BuildOptions } from "esbuild";
|
|
2
2
|
import { IBaseConfig } from "../lib/index.js";
|
|
3
|
-
declare const _default: (config: IBaseConfig, entryPoints: Set<string> | string[]) => BuildOptions;
|
|
3
|
+
declare const _default: (config: IBaseConfig, entryPoints: Set<string> | string[], testName: string) => BuildOptions;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BuildOptions } from "esbuild";
|
|
2
2
|
import { IBaseConfig } from "../lib/index.js";
|
|
3
|
-
declare const _default: (config: IBaseConfig, entryPoints: Set<string> | string[]) => BuildOptions;
|
|
3
|
+
declare const _default: (config: IBaseConfig, entryPoints: Set<string> | string[], testName: string) => BuildOptions;
|
|
4
4
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PM } from "../PM/index.js";
|
|
2
|
-
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
3
2
|
import { Ibdd_in, Ibdd_out } from "../Types.js";
|
|
3
|
+
import { ITTestResourceConfiguration, ITestArtifactory, ITLog } from ".";
|
|
4
4
|
export type IGivens<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = Record<string, BaseGiven<I>>;
|
|
5
5
|
export declare abstract class BaseSuite<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> {
|
|
6
6
|
name: string;
|
|
@@ -28,6 +28,7 @@ export declare abstract class BaseSuite<I extends Ibdd_in<unknown, unknown, unkn
|
|
|
28
28
|
error: (string | Error | undefined)[] | null;
|
|
29
29
|
features: string[];
|
|
30
30
|
}[];
|
|
31
|
+
checks: any[];
|
|
31
32
|
fails: BaseGiven<I>[];
|
|
32
33
|
features: string[];
|
|
33
34
|
};
|
|
@@ -84,27 +85,34 @@ export declare abstract class BaseWhen<I extends Ibdd_in<unknown, unknown, unkno
|
|
|
84
85
|
export declare abstract class BaseThen<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> {
|
|
85
86
|
name: string;
|
|
86
87
|
thenCB: (storeState: I["iselection"]) => I["then"];
|
|
88
|
+
go: (storeState: I["iselection"]) => I["then"];
|
|
87
89
|
error: boolean;
|
|
88
90
|
constructor(name: string, thenCB: (val: I["iselection"]) => I["then"]);
|
|
89
91
|
toObj(): {
|
|
90
92
|
name: string;
|
|
91
93
|
error: boolean;
|
|
92
94
|
};
|
|
93
|
-
abstract butThen(store: I["istore"], thenCB:
|
|
95
|
+
abstract butThen(store: I["istore"], thenCB: (s: I["iselection"]) => I["isubject"], testResourceConfiguration: ITTestResourceConfiguration, pm: PM): Promise<I["iselection"]>;
|
|
94
96
|
test(store: I["istore"], testResourceConfiguration: any, tLog: ITLog, pm: PM, filepath: string): Promise<I["then"] | undefined>;
|
|
97
|
+
check(): void;
|
|
95
98
|
}
|
|
96
99
|
export declare abstract class BaseCheck<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> {
|
|
100
|
+
key: string;
|
|
97
101
|
name: string;
|
|
98
102
|
features: string[];
|
|
99
|
-
checkCB: (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
checkCB: (store: I["istore"], pm: PM) => any;
|
|
104
|
+
initialValues: any;
|
|
105
|
+
store: I["istore"];
|
|
106
|
+
checker: any;
|
|
107
|
+
constructor(name: string, features: string[], checker: (store: I["istore"], pm: PM) => any, x: any, checkCB: any);
|
|
108
|
+
abstract checkThat(subject: I["isubject"], testResourceConfiguration: any, artifactory: ITestArtifactory, initializer: any, initialValues: any, pm: PM): Promise<I["istore"]>;
|
|
109
|
+
toObj(): {
|
|
110
|
+
key: string;
|
|
111
|
+
name: string;
|
|
112
|
+
functionAsString: string;
|
|
113
|
+
features: string[];
|
|
105
114
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
afterEach(store: I["istore"], key: string, cb: any, pm: PM): Promise<unknown>;
|
|
115
|
+
afterEach(store: I["istore"], key: string, artifactory: ITestArtifactory, pm: PM): Promise<unknown>;
|
|
116
|
+
beforeAll(store: I["istore"], initializer: any, artifactory: any, testResource: any, initialValues: any, pm: any): I["istore"];
|
|
109
117
|
check(subject: I["isubject"], key: string, testResourceConfiguration: any, tester: any, artifactory: ITestArtifactory, tLog: ITLog, pm: PM): Promise<void>;
|
|
110
118
|
}
|
|
@@ -4,7 +4,6 @@ import { ISuiteKlasser, IGivenKlasser, IWhenKlasser, IThenKlasser, ICheckKlasser
|
|
|
4
4
|
import { BaseCheck, BaseWhen, BaseThen, BaseGiven } from "./abstractBase.js";
|
|
5
5
|
import { PM } from "../PM/index.js";
|
|
6
6
|
export declare abstract class BaseBuilder<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, SuiteExtensions, GivenExtensions, WhenExtensions, ThenExtensions, CheckExtensions> {
|
|
7
|
-
readonly input: I["iinput"];
|
|
8
7
|
specs: any;
|
|
9
8
|
assertThis: (t: I["then"]) => {};
|
|
10
9
|
testResourceRequirement: ITTestResourceRequest;
|
|
@@ -23,5 +22,5 @@ export declare abstract class BaseBuilder<I extends Ibdd_in<unknown, unknown, un
|
|
|
23
22
|
Given(): Record<keyof GivenExtensions, (name: string, features: string[], whens: BaseWhen<I>[], thens: BaseThen<I>[], gcb: any) => BaseGiven<I>>;
|
|
24
23
|
When(): Record<keyof WhenExtensions, (arg0: I["istore"], ...arg1: any) => BaseWhen<I>>;
|
|
25
24
|
Then(): Record<keyof ThenExtensions, (selection: I["iselection"], expectation: any) => BaseThen<I>>;
|
|
26
|
-
Check(): Record<keyof CheckExtensions, (feature: string, callback: (whens: any, thens: any) => any, whens: any, thens: any, x: any) => BaseCheck<I, O>>;
|
|
25
|
+
Check(): Record<keyof CheckExtensions, (feature: string, callback: (whens: any, thens: any, pm: PM) => any, whens: any, thens: any, x: any) => BaseCheck<I, O>>;
|
|
27
26
|
}
|
|
@@ -66,11 +66,8 @@ export type IBaseConfig = {
|
|
|
66
66
|
src: string;
|
|
67
67
|
clearScreen: boolean;
|
|
68
68
|
debugger: boolean;
|
|
69
|
-
devMode: boolean;
|
|
70
69
|
externals: string[];
|
|
71
70
|
minify: boolean;
|
|
72
|
-
outbase: string;
|
|
73
|
-
outdir: string;
|
|
74
71
|
ports: string[];
|
|
75
72
|
tests: ITestTypes[];
|
|
76
73
|
nodePlugins: IPluginFactory[];
|
|
@@ -80,4 +77,7 @@ export type IBaseConfig = {
|
|
|
80
77
|
export type IBuiltConfig = {
|
|
81
78
|
buildDir: string;
|
|
82
79
|
} & IBaseConfig;
|
|
80
|
+
export type IConfigV2 = {
|
|
81
|
+
projects: Record<string, IBaseConfig>;
|
|
82
|
+
};
|
|
83
83
|
export {};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { PM } from "../PM";
|
|
1
2
|
import { Ibdd_in, Ibdd_out } from "../Types";
|
|
2
3
|
import { IGivens, BaseCheck, BaseSuite, BaseGiven, BaseWhen, BaseThen } from "./abstractBase";
|
|
3
4
|
export type ITestCheckCallback<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = {
|
|
4
|
-
[K in keyof O["checks"]]: (name: string, features: string[],
|
|
5
|
-
[K in keyof O["whens"]]: (...unknown: any[]) => BaseWhen<I>;
|
|
6
|
-
}, thens: {
|
|
7
|
-
[K in keyof O["thens"]]: (...unknown: any[]) => BaseThen<I>;
|
|
8
|
-
}) => Promise<any>, ...xtrasA: O["checks"][K]) => BaseCheck<I, O>;
|
|
5
|
+
[K in keyof O["checks"]]: (name: string, features: string[], checkCallback: (store: I["istore"], pm: PM) => Promise<any>, ...xtrasA: O["checks"][K]) => BaseCheck<I, O>;
|
|
9
6
|
};
|
|
10
7
|
export type ISuiteKlasser<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> = (name: string, index: number, givens: IGivens<I>, checks: BaseCheck<I, O>[]) => BaseSuite<I, O>;
|
|
11
8
|
export type IGivenKlasser<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = (name: any, features: any, whens: any, thens: any, givenCB: any) => BaseGiven<I>;
|