testeranto 0.121.1 → 0.125.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 +97001 -0
- package/.aider.conf.yml +5 -0
- package/.aider.input.history +9 -0
- package/.aider.tags.cache.v3/b7/e6/5be87b62aeaf2bc244ff41c1b61a.val +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/e3/e6/3501625caf5d5eb171f0d248462e.val +0 -0
- package/.aider.tags.cache.v3/ec/c0/161c249c35be853cc40cf11f9267.val +0 -0
- package/README.md +9 -0
- package/dist/common/{Init.js → src/Init.js} +1 -32
- package/dist/common/src/Node.js +49 -0
- package/dist/common/src/PM/base.js +230 -0
- package/dist/common/{PM → src/PM}/main.js +300 -233
- package/dist/common/src/PM/node.js +161 -0
- package/dist/common/{PM/node.js → src/PM/pure.js} +27 -18
- package/dist/common/{PM → src/PM}/web.js +14 -47
- package/dist/common/{Node.js → src/Pure.js} +11 -9
- package/dist/common/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +5 -4
- package/dist/common/src/SubPackages/react/component/node.js +10 -0
- package/dist/common/src/SubPackages/react/component/pure.js +10 -0
- package/dist/common/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +2 -2
- package/dist/common/src/SubPackages/react/jsx/index.js +64 -0
- package/dist/common/src/SubPackages/react/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +8 -14
- package/dist/common/src/SubPackages/react-dom/component/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/static.js +26 -0
- package/dist/common/src/SubPackages/react-dom/component/web.js +16 -0
- package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +31 -0
- package/dist/common/src/SubPackages/react-dom/jsx/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/static.js +59 -0
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +16 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/index.js +15 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +8 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +57 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +10 -0
- package/dist/common/{Web.js → src/Web.js} +1 -4
- package/dist/common/{build.js → src/build.js} +37 -57
- package/dist/common/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -4
- package/dist/common/src/esbuildConfigs/pure.js +41 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +5 -2
- package/dist/common/src/examples/react/component/index.js +33 -0
- package/dist/common/src/examples/react/component/test.js +36 -0
- package/dist/common/{lib → src/lib}/abstractBase.js +50 -52
- package/dist/common/{lib → src/lib}/basebuilder.js +18 -13
- package/dist/common/{lib → src/lib}/core.js +5 -43
- package/dist/common/{lib → src/lib}/index.js +1 -1
- package/dist/common/{run.js → src/run.js} +5 -5
- package/dist/common/{utils.js → src/utils.js} +35 -1
- package/dist/common/testeranto.config.js +41 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/{Init.js → src/Init.js} +1 -32
- package/dist/module/src/Node.js +42 -0
- package/dist/module/src/PM/base.js +223 -0
- package/dist/module/{PM → src/PM}/main.js +301 -234
- package/dist/module/src/PM/node.js +154 -0
- package/dist/module/{PM/node.js → src/PM/pure.js} +25 -16
- package/dist/module/{PM → src/PM}/web.js +14 -47
- package/dist/module/{Project.js → src/Project.js} +6 -3
- package/dist/module/{Node.js → src/Pure.js} +9 -7
- package/dist/module/{ReportClient.js → src/ReportClient.js} +1 -1
- package/dist/module/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +3 -4
- package/dist/module/src/SubPackages/react/component/node.js +5 -0
- package/dist/module/src/SubPackages/react/component/pure.js +5 -0
- package/dist/module/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +3 -3
- package/dist/module/src/SubPackages/react/jsx/index.js +58 -0
- package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +5 -13
- package/dist/module/src/SubPackages/react-dom/component/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/static.js +22 -0
- package/dist/module/src/SubPackages/react-dom/component/web.js +11 -0
- package/dist/module/{SubPackages/react-dom/jsx/node.js → src/SubPackages/react-dom/jsx/dynamic.js} +3 -7
- package/dist/module/src/SubPackages/react-dom/jsx/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/static.js +53 -0
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +11 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/index.js +14 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +3 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +54 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +5 -0
- package/dist/module/{TestReport.js → src/TestReport.js} +19 -16
- package/dist/module/{Web.js → src/Web.js} +1 -4
- package/dist/module/{build.js → src/build.js} +37 -57
- package/dist/module/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -4
- package/dist/module/src/esbuildConfigs/pure.js +36 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +5 -2
- package/dist/module/src/examples/react/component/index.js +26 -0
- package/dist/module/src/examples/react/component/test.js +32 -0
- package/dist/module/{lib → src/lib}/abstractBase.js +50 -52
- package/dist/module/{lib → src/lib}/basebuilder.js +18 -13
- package/dist/module/{lib → src/lib}/core.js +5 -43
- package/dist/module/{lib → src/lib}/index.js +1 -1
- package/dist/module/{run.js → src/run.js} +5 -5
- package/dist/module/src/utils.js +53 -0
- package/dist/module/testeranto.config.js +39 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +5 -2
- package/dist/prebuild/ReportClient.js +1 -1
- package/dist/prebuild/TestReport.js +4 -1
- package/dist/prebuild/build.mjs +115 -65
- package/dist/prebuild/init-docs.mjs +1 -0
- package/dist/prebuild/run.mjs +418 -382
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Node.d.ts +9 -0
- package/dist/types/src/PM/base.d.ts +34 -0
- package/dist/types/{PM → src/PM}/index.d.ts +21 -22
- package/dist/types/{PM → src/PM}/main.d.ts +15 -10
- package/dist/types/src/PM/node.d.ts +38 -0
- package/dist/types/{PM/node.d.ts → src/PM/pure.d.ts} +16 -17
- package/dist/types/{PM → src/PM}/web.d.ts +10 -15
- package/dist/types/src/Pure.d.ts +9 -0
- package/dist/types/src/SubPackages/react/component/index.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +20 -0
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/static.d.ts +9 -0
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +11 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.d.ts +1 -1
- package/dist/types/src/Types.d.ts +88 -0
- package/dist/types/src/Web.d.ts +9 -0
- package/dist/types/src/defaultConfig.d.ts +3 -0
- package/dist/types/src/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +2 -1
- package/dist/types/src/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/pure.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/src/examples/react/component/index.d.ts +13 -0
- package/dist/types/src/examples/react/component/test.d.ts +17 -0
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +35 -30
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +7 -8
- package/dist/types/src/lib/classBuilder.d.ts +9 -0
- package/dist/types/src/lib/core.d.ts +7 -0
- package/dist/types/{lib → src/lib}/index.d.ts +14 -36
- package/dist/types/src/lib/types.d.ts +15 -0
- package/dist/types/src/utils.d.ts +18 -0
- package/dist/types/testeranto.config.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/eslint.config.mjs +111 -0
- package/package.json +28 -8
- package/src/Init.ts +1 -39
- package/src/Node.ts +42 -46
- package/src/PM/base.ts +179 -181
- package/src/PM/index.ts +28 -21
- package/src/PM/main.ts +359 -318
- package/src/PM/node.ts +88 -44
- package/src/PM/pure.ts +209 -0
- package/src/PM/web.ts +19 -121
- package/src/Project.tsx +8 -5
- package/src/Pure.ts +69 -0
- package/src/ReportClient.tsx +8 -3
- package/src/SubPackages/react/component/index.ts +28 -0
- package/src/SubPackages/react/component/node.ts +12 -82
- package/src/SubPackages/react/component/pure.ts +17 -0
- package/src/SubPackages/react/component/web.ts +12 -81
- package/src/SubPackages/react/jsx/index.ts +56 -52
- package/src/SubPackages/react/jsx/node.ts +12 -29
- package/src/SubPackages/react/jsx/pure.ts +23 -0
- package/src/SubPackages/react/jsx/web.ts +17 -36
- package/src/SubPackages/react-dom/component/dynamic.ts +107 -0
- package/src/SubPackages/react-dom/component/node.ts +11 -116
- package/src/SubPackages/react-dom/component/pure.ts +17 -0
- package/src/SubPackages/react-dom/component/static.ts +41 -0
- package/src/SubPackages/react-dom/component/web.ts +7 -113
- package/src/SubPackages/react-dom/jsx/dynamic.ts +46 -0
- package/src/SubPackages/react-dom/jsx/node.ts +10 -58
- package/src/SubPackages/react-dom/jsx/pure.ts +18 -0
- package/src/SubPackages/react-dom/jsx/static.ts +87 -0
- package/src/SubPackages/react-dom/jsx/web.ts +7 -135
- package/src/SubPackages/react-test-renderer/component/index.ts +27 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +7 -5
- package/src/SubPackages/react-test-renderer/component/node.ts +7 -25
- package/src/SubPackages/react-test-renderer/component/pure.ts +18 -0
- package/src/SubPackages/react-test-renderer/component/test/implementation.ts +63 -0
- package/src/SubPackages/react-test-renderer/component/test/node.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/pure.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/web.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +7 -23
- package/src/SubPackages/react-test-renderer/jsx/index.ts +13 -46
- package/src/SubPackages/react-test-renderer/jsx/node.ts +9 -15
- package/src/SubPackages/react-test-renderer/jsx/pure.ts +31 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +9 -14
- package/src/TestReport.tsx +7 -4
- package/src/Types.ts +114 -140
- package/src/Web.ts +13 -48
- package/src/build.ts +52 -78
- package/src/defaultConfig.ts +3 -5
- package/src/esbuildConfigs/index.ts +2 -2
- package/src/esbuildConfigs/inputFilesPlugin.ts +2 -1
- package/src/esbuildConfigs/node.ts +7 -5
- package/src/esbuildConfigs/pure.ts +72 -0
- package/src/esbuildConfigs/web.ts +8 -5
- package/src/examples/react/component/index.tsx +35 -0
- package/src/examples/react/component/test.ts +83 -0
- package/src/lib/abstractBase.ts +100 -192
- package/src/lib/basebuilder.ts +40 -40
- package/src/lib/classBuilder.ts +18 -26
- package/src/lib/core.ts +22 -77
- package/src/lib/index.ts +31 -66
- package/src/lib/types.ts +20 -90
- package/src/run.ts +3 -6
- package/src/utils.ts +50 -5
- package/testeranto/Project.css +11367 -0
- package/testeranto/Project.js +24643 -0
- package/testeranto/ReportClient.css +11367 -0
- package/testeranto/ReportClient.js +24641 -0
- package/testeranto/TestReport.css +11367 -0
- package/testeranto/TestReport.js +27485 -0
- package/testeranto/bundles/node/react/metafile.json +627 -0
- package/testeranto/bundles/node/react/src/SubPackages/react-test-renderer/component/test/node.mjs +24687 -0
- package/testeranto/bundles/pure/react/metafile.json +8 -0
- package/testeranto/bundles/pure/react/src/SubPackages/react-test-renderer/component/test/pure.mjs +24625 -0
- package/testeranto/bundles/web/react/metafile.json +8 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.html +19 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.mjs +21290 -0
- package/testeranto/index.html +28 -0
- package/testeranto/reports/react/config.json +22 -0
- package/testeranto/reports/react/index.html +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/node/node/console_log.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/featurePrompt.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/lint_errors.json +3381 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/prompt.txt +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/type_errors.txt +17 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/console_log.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/lint_errors.json +2947 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/prompt.txt +23 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/type_errors.txt +18 -0
- package/testeranto/reports/react/summary.json +8 -0
- package/testeranto.config.ts +45 -0
- package/tsc.log +52 -64
- package/type-fix.txt +2 -0
- package/dist/common/PM/base.js +0 -233
- package/dist/common/SubPackages/react/component/node.js +0 -19
- package/dist/common/SubPackages/react/jsx/index.js +0 -21
- package/dist/common/SubPackages/react-dom/component/node.js +0 -88
- package/dist/common/SubPackages/react-dom/jsx/node.js +0 -39
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -128
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -2
- package/dist/module/PM/base.js +0 -226
- package/dist/module/SubPackages/react/component/node.js +0 -14
- package/dist/module/SubPackages/react/jsx/index.js +0 -15
- package/dist/module/SubPackages/react-dom/component/node.js +0 -80
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -90
- package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
- package/dist/module/utils.js +0 -20
- package/dist/types/Node.d.ts +0 -12
- package/dist/types/PM/base.d.ts +0 -38
- package/dist/types/SubPackages/react/component/node.d.ts +0 -7
- package/dist/types/SubPackages/react/component/web.d.ts +0 -7
- package/dist/types/SubPackages/react/jsx/index.d.ts +0 -12
- package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/SubPackages/react-dom/component/node.d.ts +0 -11
- package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -20
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -7
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -13
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +0 -16
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +0 -9
- package/dist/types/Types.d.ts +0 -61
- package/dist/types/Web.d.ts +0 -9
- package/dist/types/defaultConfig.d.ts +0 -3
- package/dist/types/esbuildConfigs/index.d.ts +0 -4
- package/dist/types/esbuildConfigs/node.d.ts +0 -4
- package/dist/types/esbuildConfigs/web.d.ts +0 -4
- package/dist/types/lib/classBuilder.d.ts +0 -7
- package/dist/types/lib/core.d.ts +0 -7
- package/dist/types/lib/types.d.ts +0 -11
- package/dist/types/utils.d.ts +0 -12
- /package/dist/common/{PM → src/PM}/index.js +0 -0
- /package/dist/common/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Types.js → src/Types.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +0 -0
- /package/dist/common/{init-docs.js → src/init-docs.js} +0 -0
- /package/dist/common/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/common/{lib → src/lib}/types.js +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{Footer.js → src/Footer.js} +0 -0
- /package/dist/module/{PM → src/PM}/index.js +0 -0
- /package/dist/module/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{Types.js → src/Types.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +0 -0
- /package/dist/module/{init-docs.js → src/init-docs.js} +0 -0
- /package/dist/module/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/module/{lib → src/lib}/types.js +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{Init.d.ts → src/Init.d.ts} +0 -0
- /package/dist/types/{ReportServer.d.ts → src/ReportServer.d.ts} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{build.d.ts → src/build.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.d.ts +0 -0
- /package/dist/types/{init-docs.d.ts → src/init-docs.d.ts} +0 -0
- /package/dist/types/{run.d.ts → src/run.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
package/src/PM/node.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import net from "net";
|
|
1
2
|
import fs from "fs";
|
|
2
3
|
import path from "path";
|
|
3
4
|
import { ScreencastOptions } from "puppeteer-core";
|
|
@@ -5,132 +6,175 @@ import { PassThrough } from "stream";
|
|
|
5
6
|
|
|
6
7
|
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
7
8
|
|
|
8
|
-
import { PM } from "
|
|
9
|
-
import { CdpPage, Page } from "puppeteer-core/lib/esm/puppeteer";
|
|
9
|
+
import { PM } from ".";
|
|
10
10
|
|
|
11
11
|
type IFPaths = string[];
|
|
12
12
|
const fPaths: IFPaths = [];
|
|
13
13
|
|
|
14
|
-
type PuppetMasterServer = Record<string, Promise<any>>;
|
|
15
|
-
|
|
16
14
|
export class PM_Node extends PM {
|
|
17
|
-
server: PuppetMasterServer;
|
|
18
15
|
testResourceConfiguration: ITTestResourceConfiguration;
|
|
16
|
+
client: net.Socket;
|
|
19
17
|
|
|
20
18
|
constructor(t: ITTestResourceConfiguration) {
|
|
21
19
|
super();
|
|
22
|
-
this.server = {};
|
|
23
20
|
this.testResourceConfiguration = t;
|
|
24
21
|
}
|
|
25
22
|
|
|
23
|
+
start(): Promise<void> {
|
|
24
|
+
return new Promise((res) => {
|
|
25
|
+
process.on("message", (message: { path?: string }) => {
|
|
26
|
+
if (message.path) {
|
|
27
|
+
this.client = net.createConnection(message.path, () => {
|
|
28
|
+
res();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
stop(): Promise<void> {
|
|
36
|
+
throw new Error("Method not implemented.");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
send<I>(command: string, ...argz): Promise<I> {
|
|
40
|
+
return new Promise<I>((res) => {
|
|
41
|
+
const key = Math.random().toString();
|
|
42
|
+
|
|
43
|
+
const myListener = (event) => {
|
|
44
|
+
const x = JSON.parse(event);
|
|
45
|
+
if (x.key === key) {
|
|
46
|
+
process.removeListener("message", myListener);
|
|
47
|
+
res(x.payload);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
process.addListener("message", myListener);
|
|
52
|
+
|
|
53
|
+
this.client.write(JSON.stringify([command, ...argz, key]));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async pages() {
|
|
58
|
+
return this.send<string[]>("pages", ...arguments);
|
|
59
|
+
}
|
|
60
|
+
|
|
26
61
|
waitForSelector(p: string, s: string): any {
|
|
27
|
-
return
|
|
62
|
+
return this.send("waitForSelector", ...arguments);
|
|
28
63
|
}
|
|
29
64
|
|
|
30
|
-
closePage(p)
|
|
31
|
-
return
|
|
65
|
+
closePage(p) {
|
|
66
|
+
return this.send("closePage", ...arguments);
|
|
67
|
+
// return globalThis["closePage"](p);
|
|
32
68
|
}
|
|
33
69
|
|
|
34
|
-
goto(
|
|
35
|
-
return
|
|
70
|
+
goto(page: string, url: string) {
|
|
71
|
+
return this.send("goto", ...arguments);
|
|
72
|
+
// return globalThis["goto"](cdpPage.mainFrame()._id, url);
|
|
36
73
|
}
|
|
37
74
|
|
|
38
|
-
newPage()
|
|
39
|
-
return
|
|
75
|
+
async newPage() {
|
|
76
|
+
return this.send<string>("newPage");
|
|
40
77
|
}
|
|
41
78
|
|
|
42
|
-
$(selector: string)
|
|
43
|
-
|
|
79
|
+
$(selector: string) {
|
|
80
|
+
return this.send("$", ...arguments);
|
|
44
81
|
}
|
|
45
82
|
|
|
46
83
|
isDisabled(selector: string): Promise<boolean> {
|
|
47
|
-
|
|
84
|
+
return this.send("isDisabled", ...arguments);
|
|
48
85
|
}
|
|
49
86
|
|
|
50
87
|
getAttribute(selector: string, attribute: string) {
|
|
51
|
-
|
|
88
|
+
return this.send("getAttribute", ...arguments);
|
|
52
89
|
}
|
|
90
|
+
|
|
53
91
|
getValue(selector: string) {
|
|
54
|
-
|
|
92
|
+
return this.send("getValue", ...arguments);
|
|
55
93
|
}
|
|
56
94
|
|
|
57
95
|
focusOn(selector: string) {
|
|
58
|
-
|
|
96
|
+
return this.send("focusOn", ...arguments);
|
|
59
97
|
}
|
|
60
98
|
|
|
61
|
-
typeInto(
|
|
62
|
-
|
|
99
|
+
typeInto(selector: string) {
|
|
100
|
+
return this.send("typeInto", ...arguments);
|
|
63
101
|
}
|
|
64
102
|
|
|
65
103
|
page() {
|
|
66
|
-
return
|
|
104
|
+
return this.send<string | undefined>("page");
|
|
67
105
|
}
|
|
68
106
|
|
|
69
|
-
click(selector: string)
|
|
70
|
-
return
|
|
107
|
+
click(selector: string) {
|
|
108
|
+
return this.send("click", ...arguments);
|
|
71
109
|
}
|
|
72
110
|
|
|
73
|
-
screencast(opts: ScreencastOptions, page:
|
|
74
|
-
return
|
|
111
|
+
screencast(opts: ScreencastOptions, page: string) {
|
|
112
|
+
return this.send(
|
|
113
|
+
"screencast",
|
|
75
114
|
{
|
|
76
115
|
...opts,
|
|
77
116
|
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
78
117
|
},
|
|
79
|
-
page
|
|
118
|
+
page,
|
|
80
119
|
this.testResourceConfiguration.name
|
|
81
120
|
);
|
|
82
121
|
}
|
|
83
122
|
|
|
84
123
|
screencastStop(p: string) {
|
|
85
|
-
return
|
|
124
|
+
return this.send("screencastStop", ...arguments);
|
|
86
125
|
}
|
|
87
126
|
|
|
88
|
-
customScreenShot(opts: ScreencastOptions,
|
|
89
|
-
return
|
|
127
|
+
customScreenShot(opts: ScreencastOptions, page?: string) {
|
|
128
|
+
return this.send(
|
|
129
|
+
"customScreenShot",
|
|
90
130
|
{
|
|
91
131
|
...opts,
|
|
92
132
|
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
93
133
|
},
|
|
94
|
-
|
|
134
|
+
page,
|
|
95
135
|
this.testResourceConfiguration.name
|
|
96
136
|
);
|
|
97
137
|
}
|
|
98
138
|
|
|
99
|
-
existsSync(destFolder: string): boolean {
|
|
100
|
-
return
|
|
139
|
+
async existsSync(destFolder: string): Promise<boolean> {
|
|
140
|
+
return await this.send<boolean>(
|
|
141
|
+
"existsSync",
|
|
101
142
|
this.testResourceConfiguration.fs + "/" + destFolder
|
|
102
143
|
);
|
|
103
144
|
}
|
|
104
145
|
|
|
105
146
|
mkdirSync() {
|
|
106
|
-
return
|
|
147
|
+
return this.send("mkdirSync", this.testResourceConfiguration.fs + "/");
|
|
107
148
|
}
|
|
108
149
|
|
|
109
|
-
write(
|
|
110
|
-
return
|
|
150
|
+
async write(uid: number, contents: string): Promise<boolean> {
|
|
151
|
+
return await this.send("write", ...arguments);
|
|
111
152
|
}
|
|
112
153
|
|
|
113
|
-
writeFileSync(filepath: string, contents: string) {
|
|
114
|
-
return
|
|
154
|
+
async writeFileSync(filepath: string, contents: string) {
|
|
155
|
+
return await this.send<boolean>(
|
|
156
|
+
"writeFileSync",
|
|
115
157
|
this.testResourceConfiguration.fs + "/" + filepath,
|
|
116
158
|
contents,
|
|
117
159
|
this.testResourceConfiguration.name
|
|
118
160
|
);
|
|
119
161
|
}
|
|
120
162
|
|
|
121
|
-
createWriteStream(filepath: string)
|
|
122
|
-
return
|
|
163
|
+
async createWriteStream(filepath: string) {
|
|
164
|
+
return await this.send<string>(
|
|
165
|
+
"createWriteStream",
|
|
123
166
|
this.testResourceConfiguration.fs + "/" + filepath,
|
|
124
167
|
this.testResourceConfiguration.name
|
|
125
168
|
);
|
|
126
169
|
}
|
|
127
170
|
|
|
128
|
-
end(
|
|
129
|
-
return
|
|
171
|
+
async end(uid) {
|
|
172
|
+
return await this.send<boolean>("end", ...arguments);
|
|
130
173
|
}
|
|
131
174
|
|
|
132
|
-
customclose() {
|
|
133
|
-
|
|
175
|
+
async customclose() {
|
|
176
|
+
return await this.send(
|
|
177
|
+
"customclose",
|
|
134
178
|
this.testResourceConfiguration.fs,
|
|
135
179
|
this.testResourceConfiguration.name
|
|
136
180
|
);
|
package/src/PM/pure.ts
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { ScreencastOptions } from "puppeteer-core";
|
|
4
|
+
import { CdpPage } from "puppeteer-core/lib/esm/puppeteer";
|
|
5
|
+
import { PassThrough } from "stream";
|
|
6
|
+
|
|
7
|
+
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
8
|
+
|
|
9
|
+
import { PM } from ".";
|
|
10
|
+
|
|
11
|
+
type IFPaths = string[];
|
|
12
|
+
const fPaths: IFPaths = [];
|
|
13
|
+
|
|
14
|
+
type PuppetMasterServer = Record<string, Promise<any>>;
|
|
15
|
+
|
|
16
|
+
export class PM_Pure extends PM {
|
|
17
|
+
server: PuppetMasterServer;
|
|
18
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
19
|
+
|
|
20
|
+
constructor(t: ITTestResourceConfiguration) {
|
|
21
|
+
super();
|
|
22
|
+
this.server = {};
|
|
23
|
+
this.testResourceConfiguration = t;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
start(): Promise<void> {
|
|
27
|
+
return new Promise((r) => r());
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
stop(): Promise<void> {
|
|
31
|
+
return new Promise((r) => r());
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
pages() {
|
|
35
|
+
return globalThis["pages"]();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
waitForSelector(p: string, s: string): any {
|
|
39
|
+
return globalThis["waitForSelector"](p, s);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
closePage(p): string {
|
|
43
|
+
return globalThis["closePage"](p);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
goto(cdpPage: CdpPage, url: string): any {
|
|
47
|
+
return globalThis["goto"](cdpPage.mainFrame()._id, url);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
newPage() {
|
|
51
|
+
return globalThis["newPage"]();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
$(selector: string): boolean {
|
|
55
|
+
return globalThis["$"](selector);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
isDisabled(selector: string): Promise<boolean> {
|
|
59
|
+
return globalThis["isDisabled"](selector);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
getAttribute(selector: string, attribute: string) {
|
|
63
|
+
return globalThis["getAttribute"](selector, attribute);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
getValue(selector: string) {
|
|
67
|
+
return globalThis["getValue"](selector);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
focusOn(selector: string) {
|
|
71
|
+
return globalThis["focusOn"](selector);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
typeInto(selector: string, value: string) {
|
|
75
|
+
return globalThis["typeInto"](selector, value);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
page() {
|
|
79
|
+
return globalThis["page"]();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
click(selector: string): string | undefined {
|
|
83
|
+
return globalThis["click"](selector);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
screencast(opts: ScreencastOptions, page: string) {
|
|
87
|
+
return globalThis["screencast"](
|
|
88
|
+
{
|
|
89
|
+
...opts,
|
|
90
|
+
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
91
|
+
},
|
|
92
|
+
page,
|
|
93
|
+
this.testResourceConfiguration.name
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
screencastStop(p: string) {
|
|
98
|
+
return globalThis["screencastStop"](p);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
customScreenShot(opts: ScreencastOptions, page: string) {
|
|
102
|
+
return globalThis["customScreenShot"](
|
|
103
|
+
{
|
|
104
|
+
...opts,
|
|
105
|
+
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
106
|
+
},
|
|
107
|
+
page,
|
|
108
|
+
this.testResourceConfiguration.name
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
existsSync(destFolder: string): Promise<boolean> {
|
|
113
|
+
return globalThis["existsSync"](
|
|
114
|
+
this.testResourceConfiguration.fs + "/" + destFolder
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
mkdirSync() {
|
|
119
|
+
return globalThis["mkdirSync"](this.testResourceConfiguration.fs + "/");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
write(uid: number, contents: string) {
|
|
123
|
+
return globalThis["write"](uid, contents);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
writeFileSync(filepath: string, contents: string) {
|
|
127
|
+
return globalThis["writeFileSync"](
|
|
128
|
+
this.testResourceConfiguration.fs + "/" + filepath,
|
|
129
|
+
contents,
|
|
130
|
+
this.testResourceConfiguration.name
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
createWriteStream(filepath: string): any {
|
|
135
|
+
return globalThis["createWriteStream"](
|
|
136
|
+
this.testResourceConfiguration.fs + "/" + filepath,
|
|
137
|
+
this.testResourceConfiguration.name
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
end(uid: number) {
|
|
142
|
+
return globalThis["end"](uid);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
customclose() {
|
|
146
|
+
globalThis["customclose"](
|
|
147
|
+
this.testResourceConfiguration.fs,
|
|
148
|
+
this.testResourceConfiguration.name
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise) => void) {
|
|
153
|
+
return (fPath, value: string | Buffer | PassThrough) => {
|
|
154
|
+
callback(
|
|
155
|
+
new Promise<void>((res, rej) => {
|
|
156
|
+
tLog("testArtiFactory =>", fPath);
|
|
157
|
+
|
|
158
|
+
const cleanPath = path.resolve(fPath);
|
|
159
|
+
fPaths.push(cleanPath.replace(process.cwd(), ``));
|
|
160
|
+
|
|
161
|
+
const targetDir = cleanPath.split("/").slice(0, -1).join("/");
|
|
162
|
+
|
|
163
|
+
fs.mkdir(targetDir, { recursive: true }, async (error) => {
|
|
164
|
+
if (error) {
|
|
165
|
+
console.error(`❗️testArtiFactory failed`, targetDir, error);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
fs.writeFileSync(
|
|
169
|
+
path.resolve(
|
|
170
|
+
targetDir.split("/").slice(0, -1).join("/"),
|
|
171
|
+
"manifest"
|
|
172
|
+
),
|
|
173
|
+
fPaths.join(`\n`),
|
|
174
|
+
{
|
|
175
|
+
encoding: "utf-8",
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
if (Buffer.isBuffer(value)) {
|
|
180
|
+
fs.writeFileSync(fPath, value, "binary");
|
|
181
|
+
res();
|
|
182
|
+
} else if (`string` === typeof value) {
|
|
183
|
+
fs.writeFileSync(fPath, value.toString(), {
|
|
184
|
+
encoding: "utf-8",
|
|
185
|
+
});
|
|
186
|
+
res();
|
|
187
|
+
} else {
|
|
188
|
+
/* @ts-ignore:next-line */
|
|
189
|
+
const pipeStream: PassThrough = value;
|
|
190
|
+
const myFile = fs.createWriteStream(fPath);
|
|
191
|
+
pipeStream.pipe(myFile);
|
|
192
|
+
pipeStream.on("close", () => {
|
|
193
|
+
myFile.close();
|
|
194
|
+
res();
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
})
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// launch(options?: PuppeteerLaunchOptions): Promise<Browser>;
|
|
204
|
+
startPuppeteer(options?: any): any {
|
|
205
|
+
// return puppeteer.connect(options).then((b) => {
|
|
206
|
+
// this.browser = b;
|
|
207
|
+
// });
|
|
208
|
+
}
|
|
209
|
+
}
|
package/src/PM/web.ts
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import { PassThrough } from "stream";
|
|
2
2
|
|
|
3
|
-
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
4
|
-
|
|
5
|
-
import { PM } from "./index.js";
|
|
6
3
|
import { ScreencastOptions, ScreenshotOptions } from "puppeteer-core";
|
|
7
|
-
import { CdpPage } from "puppeteer-core/lib/esm/puppeteer";
|
|
4
|
+
import { CdpPage, Page } from "puppeteer-core/lib/esm/puppeteer";
|
|
8
5
|
|
|
9
|
-
|
|
6
|
+
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
10
7
|
|
|
11
|
-
export class PM_Web
|
|
12
|
-
|
|
8
|
+
export class PM_Web {
|
|
9
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
13
10
|
|
|
14
11
|
constructor(t: ITTestResourceConfiguration) {
|
|
15
|
-
super();
|
|
16
|
-
this.server = {};
|
|
17
12
|
this.testResourceConfiguration = t;
|
|
18
13
|
}
|
|
19
14
|
|
|
15
|
+
start(): Promise<void> {
|
|
16
|
+
return new Promise((r) => r());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
stop(): Promise<void> {
|
|
20
|
+
return new Promise((r) => r());
|
|
21
|
+
}
|
|
22
|
+
|
|
20
23
|
waitForSelector(p: string, s: string): any {
|
|
21
24
|
return window["waitForSelector"](p, s);
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
screencast(opts: ScreencastOptions) {
|
|
27
|
+
screencast(opts: ScreencastOptions, page: Page) {
|
|
25
28
|
return window["screencast"](
|
|
26
29
|
{
|
|
27
30
|
...opts,
|
|
28
31
|
path: this.testResourceConfiguration.fs + "/" + opts.path,
|
|
29
32
|
},
|
|
33
|
+
page.mainFrame()._id,
|
|
30
34
|
this.testResourceConfiguration.name
|
|
31
35
|
);
|
|
32
36
|
}
|
|
@@ -78,7 +82,7 @@ export class PM_Web extends PM {
|
|
|
78
82
|
return window["click"](selector);
|
|
79
83
|
}
|
|
80
84
|
|
|
81
|
-
customScreenShot(opts: ScreenshotOptions) {
|
|
85
|
+
customScreenShot(opts: ScreenshotOptions, page: Page) {
|
|
82
86
|
return window["customScreenShot"](
|
|
83
87
|
{
|
|
84
88
|
...opts,
|
|
@@ -96,8 +100,8 @@ export class PM_Web extends PM {
|
|
|
96
100
|
return window["mkdirSync"](this.testResourceConfiguration.fs + "/");
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
write(
|
|
100
|
-
return window["write"](
|
|
103
|
+
write(uid: number, contents: string): Promise<boolean> {
|
|
104
|
+
return window["write"](uid, contents);
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
writeFileSync(filepath: string, contents: string) {
|
|
@@ -115,8 +119,8 @@ export class PM_Web extends PM {
|
|
|
115
119
|
);
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
end(
|
|
119
|
-
return window["end"](
|
|
122
|
+
end(uid: number): boolean {
|
|
123
|
+
return window["end"](uid);
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
customclose() {
|
|
@@ -131,114 +135,8 @@ export class PM_Web extends PM {
|
|
|
131
135
|
callback(
|
|
132
136
|
new Promise<void>((res, rej) => {
|
|
133
137
|
tLog("testArtiFactory =>", fPath);
|
|
134
|
-
|
|
135
|
-
// const cleanPath = path.resolve(fPath);
|
|
136
|
-
// fPaths.push(cleanPath.replace(process.cwd(), ``));
|
|
137
|
-
|
|
138
|
-
// const targetDir = cleanPath.split("/").slice(0, -1).join("/");
|
|
139
|
-
|
|
140
|
-
// fs.mkdir(targetDir, { recursive: true }, async (error) => {
|
|
141
|
-
// if (error) {
|
|
142
|
-
// console.error(`❗️testArtiFactory failed`, targetDir, error);
|
|
143
|
-
// }
|
|
144
|
-
|
|
145
|
-
// fs.writeFileSync(
|
|
146
|
-
// path.resolve(
|
|
147
|
-
// targetDir.split("/").slice(0, -1).join("/"),
|
|
148
|
-
// "manifest"
|
|
149
|
-
// ),
|
|
150
|
-
// fPaths.join(`\n`),
|
|
151
|
-
// {
|
|
152
|
-
// encoding: "utf-8",
|
|
153
|
-
// }
|
|
154
|
-
// );
|
|
155
|
-
|
|
156
|
-
// if (Buffer.isBuffer(value)) {
|
|
157
|
-
// fs.writeFileSync(fPath, value, "binary");
|
|
158
|
-
// res();
|
|
159
|
-
// } else if (`string` === typeof value) {
|
|
160
|
-
// fs.writeFileSync(fPath, value.toString(), {
|
|
161
|
-
// encoding: "utf-8",
|
|
162
|
-
// });
|
|
163
|
-
// res();
|
|
164
|
-
// } else {
|
|
165
|
-
// /* @ts-ignore:next-line */
|
|
166
|
-
// const pipeStream: PassThrough = value;
|
|
167
|
-
// const myFile = fs.createWriteStream(fPath);
|
|
168
|
-
// pipeStream.pipe(myFile);
|
|
169
|
-
// pipeStream.on("close", () => {
|
|
170
|
-
// myFile.close();
|
|
171
|
-
// res();
|
|
172
|
-
// });
|
|
173
|
-
// }
|
|
174
|
-
// });
|
|
175
138
|
})
|
|
176
139
|
);
|
|
177
140
|
};
|
|
178
141
|
}
|
|
179
|
-
|
|
180
|
-
// startPuppeteer(options, destFolder: string): Promise<any> {
|
|
181
|
-
// const name = this.testResourceConfiguration.name;
|
|
182
|
-
|
|
183
|
-
// return fetch(`http://localhost:3234/json/version`)
|
|
184
|
-
// .then((v) => {
|
|
185
|
-
// return v.json();
|
|
186
|
-
// })
|
|
187
|
-
// .then((json) => {
|
|
188
|
-
// console.log(json);
|
|
189
|
-
|
|
190
|
-
// return puppeteer
|
|
191
|
-
// .connect({
|
|
192
|
-
// // "ws://localhost:3234/devtools/browser/01cc60a5-dad6-4b65-a848-09d77764a3fa"
|
|
193
|
-
// // browserWSEndpoint: json.webSocketDebuggerUrl,
|
|
194
|
-
// browserURL: "http://localhost:3234/json/version",
|
|
195
|
-
// })
|
|
196
|
-
// .then(async (b) => {
|
|
197
|
-
// this.browser = b;
|
|
198
|
-
|
|
199
|
-
// // const t = this.browser.targets()[2];
|
|
200
|
-
// // const s = this.browser.defaultBrowserContext().
|
|
201
|
-
// console.log(this.browser);
|
|
202
|
-
// console.log(this.browser.browserContexts());
|
|
203
|
-
// // const handler2 = {
|
|
204
|
-
// // get(target, prop, receiver) {
|
|
205
|
-
// // if (prop === "screenshot") {
|
|
206
|
-
// // return async (x) => {
|
|
207
|
-
// // return await window["custom-screenshot"](
|
|
208
|
-
// // {
|
|
209
|
-
// // ...x,
|
|
210
|
-
// // // path: destFolder + "/" + x.path,
|
|
211
|
-
// // path: x.path,
|
|
212
|
-
// // },
|
|
213
|
-
// // name
|
|
214
|
-
// // );
|
|
215
|
-
// // };
|
|
216
|
-
// // } else if (prop === "mainFrame") {
|
|
217
|
-
// // return () => target[prop](...arguments);
|
|
218
|
-
// // } else {
|
|
219
|
-
// // return Reflect.get(...arguments);
|
|
220
|
-
// // }
|
|
221
|
-
// // },
|
|
222
|
-
// // };
|
|
223
|
-
// // const handler1 = {
|
|
224
|
-
// // get(target, prop, receiver) {
|
|
225
|
-
// // if (prop === "pages") {
|
|
226
|
-
// // return async () => {
|
|
227
|
-
// // return target.pages().then((pages) => {
|
|
228
|
-
// // return pages.map((p) => {
|
|
229
|
-
// // return new Proxy(p, handler2);
|
|
230
|
-
// // });
|
|
231
|
-
// // });
|
|
232
|
-
// // };
|
|
233
|
-
// // }
|
|
234
|
-
|
|
235
|
-
// // return Reflect.get(...arguments);
|
|
236
|
-
// // },
|
|
237
|
-
// // };
|
|
238
|
-
|
|
239
|
-
// // const proxy3 = new Proxy(this.browser, handler1);
|
|
240
|
-
// // this.browser = proxy3;
|
|
241
|
-
// });
|
|
242
|
-
// });
|
|
243
|
-
// }
|
|
244
142
|
}
|
package/src/Project.tsx
CHANGED
|
@@ -4,10 +4,11 @@ import React, { useEffect, useState } from "react";
|
|
|
4
4
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
5
5
|
import "./style.css"
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
import { Footer } from "./Footer";
|
|
9
9
|
import { Table } from "react-bootstrap";
|
|
10
|
-
|
|
10
|
+
import { ITestTypes, IRunTime, IBuiltConfig } from "./lib";
|
|
11
|
+
|
|
11
12
|
|
|
12
13
|
type ISummary = {
|
|
13
14
|
staticAnalysis: number | "?";
|
|
@@ -34,7 +35,9 @@ type ICollations = ICollation[];
|
|
|
34
35
|
|
|
35
36
|
const BigBoard = () => {
|
|
36
37
|
|
|
37
|
-
const
|
|
38
|
+
const bigConfigElement = document.getElementById('bigConfig');
|
|
39
|
+
if (!bigConfigElement) throw new Error('bigConfig element not found');
|
|
40
|
+
const projects = JSON.parse(bigConfigElement.innerHTML) as string[];
|
|
38
41
|
// const projects = Object.keys(bigConfig.projects);
|
|
39
42
|
|
|
40
43
|
// const [configs, setConfigs] = useState<IBuiltConfig>();
|
|
@@ -190,8 +193,8 @@ const BigBoard = () => {
|
|
|
190
193
|
document.addEventListener("DOMContentLoaded", function () {
|
|
191
194
|
const elem = document.getElementById("root");
|
|
192
195
|
if (elem) {
|
|
193
|
-
ReactDom.createRoot(elem).render(React.createElement(BigBoard, {}
|
|
196
|
+
ReactDom.createRoot(elem).render(React.createElement(BigBoard, {}));
|
|
194
197
|
}
|
|
195
198
|
});
|
|
196
199
|
|
|
197
|
-
console.log("hello BigBoard!")
|
|
200
|
+
console.log("hello BigBoard!")
|