testeranto 0.82.0 → 0.85.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/README.md +0 -2
- package/dist/common/package.json +3 -0
- package/dist/common/src/Node.js +2 -0
- package/dist/common/src/PM/main.js +182 -79
- package/dist/common/src/PM/node.js +32 -6
- package/dist/common/src/PM/web.js +28 -54
- package/dist/common/src/Project.js +0 -3
- package/dist/common/src/Puppeteer.js +9 -51
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +11 -11
- package/dist/common/src/Web.js +2 -0
- package/dist/common/src/esbuildConfigs/featuresPlugin.js +39 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +62 -41
- package/dist/common/src/esbuildConfigs/node.js +10 -3
- package/dist/common/src/esbuildConfigs/web.js +6 -2
- package/dist/common/src/lib/abstractBase.js +343 -335
- package/dist/common/src/lib/basebuilder.js +7 -3
- package/dist/common/src/lib/core.js +1 -1
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/package.json +3 -0
- package/dist/module/src/Node.js +1 -1
- package/dist/module/src/PM/main.js +182 -79
- package/dist/module/src/PM/node.js +32 -6
- package/dist/module/src/PM/web.js +28 -51
- package/dist/module/src/Project.js +0 -3
- package/dist/module/src/Puppeteer.js +9 -51
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +10 -10
- package/dist/module/src/Web.js +1 -1
- package/dist/module/src/esbuildConfigs/featuresPlugin.js +34 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +62 -41
- package/dist/module/src/esbuildConfigs/node.js +10 -3
- package/dist/module/src/esbuildConfigs/web.js +6 -2
- package/dist/module/src/lib/abstractBase.js +343 -335
- package/dist/module/src/lib/basebuilder.js +7 -3
- package/dist/module/src/lib/core.js +1 -1
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Puppeteer.mjs +82033 -0
- package/dist/types/src/Node.d.ts +5 -1
- package/dist/types/src/PM/index.d.ts +10 -4
- package/dist/types/src/PM/main.d.ts +21 -9
- package/dist/types/src/PM/node.d.ts +11 -3
- package/dist/types/src/PM/web.d.ts +11 -2
- package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +1 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +1 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +1 -0
- package/dist/types/src/Types.d.ts +2 -2
- package/dist/types/src/Web.d.ts +5 -1
- package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +5 -0
- package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +4 -2
- package/dist/types/src/lib/abstractBase.d.ts +5 -5
- package/dist/types/src/lib/types.d.ts +7 -5
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +18 -41
- package/pupBuild.js +18 -0
- package/src/Node.ts +1 -3
- package/src/PM/index.ts +12 -3
- package/src/PM/main.ts +300 -164
- package/src/PM/node.ts +40 -6
- package/src/PM/web.ts +108 -58
- package/src/Project.ts +0 -8
- package/src/Puppeteer.ts +11 -57
- package/src/SubPackages/react-dom/jsx/web.ts +15 -10
- package/src/Types.ts +5 -2
- package/src/Web.ts +1 -1
- package/src/esbuildConfigs/featuresPlugin.ts +43 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +98 -66
- package/src/esbuildConfigs/node.ts +18 -3
- package/src/esbuildConfigs/web.ts +14 -2
- package/src/lib/abstractBase.ts +381 -364
- package/src/lib/basebuilder.ts +7 -7
- package/src/lib/core.ts +1 -1
- package/src/lib/types.ts +13 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testeranto",
|
|
3
3
|
"description": "teeny tiny tightly-typed typescript tests",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.85.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "18.18.0"
|
|
7
7
|
},
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"types": "./dist/index.d.mts",
|
|
10
10
|
"module": "dist/module/index.js",
|
|
11
11
|
"exports": {
|
|
12
|
+
"./Puppeteer": {
|
|
13
|
+
"import": "./dist/prebuild/Puppeteer.mjs",
|
|
14
|
+
"require": "./dist/prebuild/Puppeteer.mjs"
|
|
15
|
+
},
|
|
12
16
|
"./src/cjs-shim.ts": {
|
|
13
17
|
"import": "./dist/cjs-shim.js",
|
|
14
18
|
"require": "./dist/cjs-shim.js"
|
|
@@ -141,10 +145,6 @@
|
|
|
141
145
|
"import": "./dist/module/src/Aider.js",
|
|
142
146
|
"require": "./dist/common/src/Aider.js"
|
|
143
147
|
},
|
|
144
|
-
"./src/Puppeteer": {
|
|
145
|
-
"import": "./dist/module/src/Puppeteer.js",
|
|
146
|
-
"require": "./dist/common/src/Puppeteer.js"
|
|
147
|
-
},
|
|
148
148
|
"./src/Init": {
|
|
149
149
|
"import": "./dist/module/src/Init.js",
|
|
150
150
|
"require": "./dist/common/src/Init.js"
|
|
@@ -189,16 +189,17 @@
|
|
|
189
189
|
"doit": "rm -rf node_modules && yarn install && yarn build",
|
|
190
190
|
"build": "sh prebuild.sh; cp ./src/cjs-shim.js ./dist/cjs-shim.js; tsc -p tsconfig.module.json; tsc -p tsconfig.common.json; tsc -p tsconfig.types.json; sh postBuild.sh",
|
|
191
191
|
"dev": "cp ./src/cjs-shim.js ./dist/cjs-shim.js && tsc -p tsconfig.module.json --watch & tsc -p tsconfig.common.json --watch & tsc -p tsconfig.types.json --watch ",
|
|
192
|
+
"prebuild-puppeteer": "node pupBuild.js",
|
|
192
193
|
"build-module": "tsc -p tsconfig.module.json",
|
|
193
194
|
"build-common": "tsc -p tsconfig.common.json",
|
|
194
195
|
"build-types": "tsc -p tsconfig.types.json",
|
|
195
196
|
"build-tests": "ts-node-esm ./project.ts",
|
|
196
197
|
"run-tests": "ts-node-esm ./run-tests.ts",
|
|
197
198
|
"init-docs": "ts-node-esm init-docs.ts",
|
|
198
|
-
"test": "yarn build-tests & yarn run-tests"
|
|
199
|
+
"test": "yarn build-tests & yarn run-tests",
|
|
200
|
+
"scratch": "node scratch/build.js && node dist/scratch/server.js"
|
|
199
201
|
},
|
|
200
202
|
"peerDependencies": {
|
|
201
|
-
"@hello-pangea/dnd": ">=16",
|
|
202
203
|
"@types/react": "18.2.0",
|
|
203
204
|
"@types/react-dom": "18.2.0",
|
|
204
205
|
"@types/react-test-renderer": "19.0.0",
|
|
@@ -209,11 +210,13 @@
|
|
|
209
210
|
},
|
|
210
211
|
"devDependencies": {
|
|
211
212
|
"@swc/core": "^1.3.26",
|
|
213
|
+
"@types/express": "^5.0.0",
|
|
214
|
+
"@types/express-session": "^1.18.1",
|
|
212
215
|
"@types/node": "^22.7.5",
|
|
213
216
|
"@types/react": "18.2.55",
|
|
214
|
-
"@types/react-bootstrap": "^0.32.32",
|
|
215
217
|
"@types/react-dom": "18.2.0",
|
|
216
218
|
"@types/react-test-renderer": "19.0.0",
|
|
219
|
+
"@types/uuid": "^10.0.0",
|
|
217
220
|
"@types/ws": "^8.5.10",
|
|
218
221
|
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
|
219
222
|
"@typescript-eslint/parser": "^5.46.0",
|
|
@@ -221,58 +224,32 @@
|
|
|
221
224
|
"typescript": "4.8.2"
|
|
222
225
|
},
|
|
223
226
|
"dependencies": {
|
|
224
|
-
"@asseinfo/react-kanban": "^2.2.0",
|
|
225
|
-
"@caldwell619/react-kanban": "^0.0.12",
|
|
226
|
-
"@gitgraph/core": "^1.5.0",
|
|
227
|
-
"@gitgraph/js": "^1.4.0",
|
|
228
|
-
"@gitgraph/react": "^1.6.0",
|
|
229
|
-
"@hello-pangea/dnd": "^18.0.1",
|
|
230
|
-
"@octokit/types": "^13.8.0",
|
|
231
|
-
"@types/express": "^5.0.0",
|
|
232
|
-
"@types/express-session": "^1.18.1",
|
|
233
|
-
"@types/uuid": "^10.0.0",
|
|
234
|
-
"@xyflow/react": "^12.4.3",
|
|
235
|
-
"@zodform/core": "^0.2.0",
|
|
236
227
|
"babel-loader": "^8.2.5",
|
|
237
|
-
"bootstrap": "^5.2.3",
|
|
238
228
|
"chai": "^5.2.0",
|
|
229
|
+
"chromium": "^3.0.3",
|
|
239
230
|
"dot-prop": "^9.0.0",
|
|
240
231
|
"esbuild": "0.17.5",
|
|
241
232
|
"esbuild-plugin-external-package": "^1.0.0",
|
|
242
233
|
"esbuild-plugin-import-map": "^2.1.0",
|
|
234
|
+
"esbuild-plugin-markdown": "^0.0.3",
|
|
243
235
|
"eslint": "^8.29.0",
|
|
244
236
|
"eslint-plugin-react": "^7.31.11",
|
|
245
237
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
246
238
|
"express": "^4.21.2",
|
|
247
|
-
"express-session": "^1.18.1",
|
|
248
239
|
"fs-extra": "^11.2.0",
|
|
249
240
|
"fs.promises.exists": "^1.1.4",
|
|
250
|
-
"gantt-task-react": "^0.3.9",
|
|
251
241
|
"glob": "^10.3.12",
|
|
252
|
-
"graphology": "^0.25.1",
|
|
253
|
-
"graphology-dag": "^0.2.0",
|
|
254
|
-
"graphology-types": "^0.24.5",
|
|
255
|
-
"html": "^1.0.0",
|
|
256
|
-
"ipc": "^0.0.1",
|
|
257
242
|
"iterm-tab": "^0.4.0",
|
|
258
|
-
"jsonc": "^2.0.0",
|
|
259
|
-
"npm-watch": "^0.11.0",
|
|
260
243
|
"octokit": "^4.1.2",
|
|
261
|
-
"
|
|
262
|
-
"
|
|
263
|
-
"
|
|
264
|
-
"react-bootstrap": "2.10.6",
|
|
265
|
-
"react-github-login": "^1.0.3",
|
|
266
|
-
"react-login-github": "^1.0.8",
|
|
244
|
+
"puppeteer": "^24.4.0",
|
|
245
|
+
"puppeteer-core": "24.4.0",
|
|
246
|
+
"react-dom": "18.2.0",
|
|
267
247
|
"react-router-dom": "6.29.0",
|
|
268
|
-
"react-sigma": "^1.2.35",
|
|
269
248
|
"react-test-renderer": "18.2.0",
|
|
270
249
|
"recursive-watch": "^1.1.4",
|
|
271
|
-
"selenium-webdriver": "4.27.0",
|
|
272
250
|
"url": "^0.11.4",
|
|
273
251
|
"uuid": "^10.0.0",
|
|
274
252
|
"why-is-node-running": "^3.2.2",
|
|
275
|
-
"ws": "^8.16.0"
|
|
276
|
-
"zod": "^3.24.2"
|
|
253
|
+
"ws": "^8.16.0"
|
|
277
254
|
}
|
|
278
|
-
}
|
|
255
|
+
}
|
package/pupBuild.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild'
|
|
2
|
+
|
|
3
|
+
await esbuild.build({
|
|
4
|
+
entryPoints: ['src/Puppeteer.ts'],
|
|
5
|
+
bundle: true,
|
|
6
|
+
format: "esm",
|
|
7
|
+
platform: "node",
|
|
8
|
+
// format: "node",
|
|
9
|
+
outfile: 'dist/prebuild/Puppeteer.mjs',
|
|
10
|
+
// external: ['crypto', 'os'],
|
|
11
|
+
supported: {
|
|
12
|
+
"dynamic-import": true,
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
banner: {
|
|
16
|
+
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
17
|
+
},
|
|
18
|
+
})
|
package/src/Node.ts
CHANGED
|
@@ -4,17 +4,15 @@ import {
|
|
|
4
4
|
ITTestResourceConfiguration,
|
|
5
5
|
ITTestResourceRequest,
|
|
6
6
|
} from "./lib/index.js";
|
|
7
|
-
|
|
8
7
|
import type {
|
|
9
8
|
IBaseTest,
|
|
10
9
|
ITestImplementation,
|
|
11
10
|
ITestSpecification,
|
|
12
11
|
} from "./Types.js";
|
|
13
12
|
import { ITestInterface, INodeTestInterface } from "./lib/types.js";
|
|
14
|
-
|
|
15
13
|
import { PM_Node } from "./PM/node.js";
|
|
16
14
|
|
|
17
|
-
class NodeTesteranto<
|
|
15
|
+
export class NodeTesteranto<
|
|
18
16
|
TestShape extends IBaseTest<
|
|
19
17
|
unknown,
|
|
20
18
|
unknown,
|
package/src/PM/index.ts
CHANGED
|
@@ -10,10 +10,9 @@ const fPaths: IFPaths = [];
|
|
|
10
10
|
|
|
11
11
|
export abstract class PM {
|
|
12
12
|
server: any;
|
|
13
|
-
browser: Browser;
|
|
14
13
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
15
14
|
|
|
16
|
-
abstract startPuppeteer(options: any, destfolder: string): Promise<Browser>;
|
|
15
|
+
// abstract startPuppeteer(options: any, destfolder: string): Promise<Browser>;
|
|
17
16
|
abstract testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise) => void);
|
|
18
17
|
abstract createWriteStream(filepath: string): any;
|
|
19
18
|
abstract writeFileSync(fp: string, contents: string);
|
|
@@ -21,5 +20,15 @@ export abstract class PM {
|
|
|
21
20
|
abstract existsSync(fp: string): boolean;
|
|
22
21
|
abstract write(accessObject: { uid: number }, contents: string): boolean;
|
|
23
22
|
abstract end(accessObject: { uid: number }): boolean;
|
|
24
|
-
abstract customScreenShot(opts: object
|
|
23
|
+
abstract customScreenShot(opts: object): any;
|
|
24
|
+
abstract screencast(opts: object): any;
|
|
25
|
+
|
|
26
|
+
abstract page(): string | undefined;
|
|
27
|
+
abstract click(selector: string): any;
|
|
28
|
+
abstract focusOn(selector: string): any;
|
|
29
|
+
abstract typeInto(value: string): any;
|
|
30
|
+
abstract getValue(value: string): any;
|
|
31
|
+
abstract getAttribute(selector: string, attribute: string): any;
|
|
32
|
+
abstract isDisabled(selector: string): boolean;
|
|
33
|
+
abstract $(selector: string): any;
|
|
25
34
|
}
|