testeranto 0.177.0 → 0.197.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/ALL_LICENSES.txt +11246 -0
- package/LICENSE +21 -0
- package/README.md +24 -4
- package/default-project.json +44 -0
- package/design-editor/DesignEditor.tsx +247 -0
- package/design-editor/index.ts +2 -0
- package/design-editor/server.ts +121 -0
- package/design-editor/types.ts +16 -0
- package/designs/default-project.json +210 -0
- package/dist/common/design-editor/DesignEditor.js +239 -0
- package/dist/common/design-editor/index.js +18 -0
- package/dist/common/design-editor/server.js +98 -0
- package/dist/common/design-editor/types.js +2 -0
- package/dist/common/src/App.js +53 -0
- package/dist/common/src/Node.js +4 -8
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +10 -34
- package/dist/common/src/PM/base.js +1 -1
- package/dist/common/src/PM/main.js +581 -113
- package/dist/common/src/PM/node.js +4 -2
- package/dist/common/src/PM/nodeSidecar.js +1 -0
- package/dist/common/src/PM/pure.js +20 -57
- package/dist/common/src/PM/pureSidecar.js +1 -1
- package/dist/common/src/PM/types.js +1 -0
- package/dist/common/src/PM/web.js +7 -4
- package/dist/common/src/Pure.js +1 -1
- package/dist/common/src/Pure.test.js +49 -79
- package/dist/common/src/ReportServer.js +8 -2
- package/dist/common/src/build.js +31 -40
- package/dist/common/src/components/DesignEditorPage.js +169 -0
- package/dist/common/src/components/SunriseAnimation.js +291 -0
- package/dist/common/src/components/SunriseAnimation.test/interface.js +67 -0
- package/dist/common/src/components/SunriseAnimation.test/types.js +2 -0
- package/dist/common/src/components/TestStatusBadge.js +1 -21
- package/dist/common/src/components/pure/AppFrame.js +69 -0
- package/dist/common/src/components/pure/AppFrame.test/implementation.js +63 -0
- package/dist/common/src/components/pure/AppFrame.test/index.js +14 -0
- package/dist/common/src/components/pure/AppFrame.test/specification.js +25 -0
- package/dist/common/src/components/pure/AppFrame.test/types.js +3 -0
- package/dist/common/src/components/pure/FeaturesReporterView.js +23 -0
- package/dist/common/src/components/pure/FeaturesReporterView.test/implementation.js +84 -0
- package/dist/common/src/components/pure/FeaturesReporterView.test/index.js +14 -0
- package/dist/common/src/components/pure/FeaturesReporterView.test/specification.js +27 -0
- package/dist/common/src/components/pure/FeaturesReporterView.test/types.js +2 -0
- package/dist/common/src/components/pure/ModalContent.js +86 -0
- package/dist/common/src/components/pure/ModalContent.test/implementation.js +35 -0
- package/dist/common/src/components/pure/ModalContent.test/index.js +58 -0
- package/dist/common/src/components/pure/ModalContent.test/specification.js +19 -0
- package/dist/common/src/components/pure/ModalContent.test/types.js +4 -0
- package/dist/common/src/{NavBar.js → components/pure/NavBar.js} +9 -10
- package/dist/common/src/components/pure/ProcessManager.js +112 -0
- package/dist/common/src/components/pure/ProcessManagerView.js +237 -0
- package/dist/common/src/components/pure/ProjectPageView.js +53 -76
- package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +167 -54
- package/dist/common/src/components/pure/ProjectPageView.test/index.js +5 -1
- package/dist/common/src/components/pure/ProjectPageView.test/specification.js +15 -2
- package/dist/common/src/components/pure/ProjectPageView.test/types.js +2 -0
- package/dist/common/src/components/pure/ProjectsPageView.js +72 -0
- package/dist/common/src/components/pure/SettingsButton.js +13 -0
- package/dist/common/src/components/pure/SingleProcessView.js +214 -0
- package/dist/common/src/components/pure/TestPageView.js +513 -0
- package/dist/common/src/components/pure/TestPageView.test/implementation.js +157 -0
- package/dist/common/src/components/pure/TestPageView.test/index.js +15 -0
- package/dist/common/src/components/pure/TestPageView.test/specification.js +26 -0
- package/dist/common/src/components/pure/TestPageView.test/types.js +4 -0
- package/dist/common/src/components/pure/ThemeCard.js +15 -0
- package/dist/common/src/components/stateful/FeaturesReporter.js +59 -0
- package/dist/common/src/components/stateful/FileTree.js +40 -0
- package/dist/common/src/components/stateful/ProcessManagerPage.js +112 -0
- package/dist/common/src/components/stateful/ProjectPage.js +101 -0
- package/dist/common/src/components/stateful/ProjectsPage.js +118 -0
- package/dist/common/src/components/stateful/SettingsPage.js +72 -0
- package/dist/common/src/components/stateful/SingleProcessPage.js +147 -0
- package/dist/common/src/components/stateful/TestPage.js +229 -0
- package/dist/common/src/components/stateful/TextEditorPage.js +154 -0
- package/dist/common/src/defaultConfig.js +1 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +3 -4
- package/dist/common/src/esbuildConfigs/web.js +1 -1
- package/dist/common/src/lib/BaseSuite.js +7 -3
- package/dist/common/src/lib/BaseSuite.test/mock.js +17 -41
- package/dist/common/src/lib/BaseSuite.test/test.js +33 -42
- package/dist/common/src/lib/Sidecar.js +1 -0
- package/dist/common/src/lib/abstractBase.js +40 -13
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +12 -12
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +15 -13
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.mock.js +28 -17
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.pure.js +2 -2
- package/dist/common/src/lib/basebuilder.js +29 -35
- package/dist/common/src/lib/classBuilder.js +5 -3
- package/dist/common/src/lib/core.js +3 -6
- package/dist/common/src/lib/core.test/MockCore.js +0 -14
- package/dist/common/src/lib/core.test/core.test.adapter.js +2 -9
- package/dist/common/src/lib/core.test/core.test.implementation.js +3 -7
- package/dist/common/src/lib/index.js +13 -14
- package/dist/common/src/lib/pmProxy.js +37 -16
- package/dist/common/src/lib/pmProxy.test/adapter.js +20 -4
- package/dist/common/src/lib/pmProxy.test/implementation.js +93 -34
- package/dist/common/src/lib/pmProxy.test/mockPMBase.js +9 -0
- package/dist/common/src/lib/pmProxy.test/specification.js +3 -0
- package/dist/common/src/mothership/index.js +5 -0
- package/dist/common/src/mothership/test.js +44 -25
- package/dist/common/src/types/features.js +34 -0
- package/dist/common/src/utils/api.js +57 -27
- package/dist/common/src/utils/featureUtils.js +29 -0
- package/dist/common/src/utils/logFiles.js +51 -0
- package/dist/common/src/utils/makePrompt.js +116 -0
- package/dist/common/src/web.html.js +2 -6
- package/dist/common/testeranto.config.js +54 -24
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/design-editor/DesignEditor.js +203 -0
- package/dist/module/design-editor/index.js +2 -0
- package/dist/module/design-editor/server.js +92 -0
- package/dist/module/design-editor/types.js +1 -0
- package/dist/module/src/App.js +19 -17
- package/dist/module/src/Node.js +4 -8
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +11 -35
- package/dist/module/src/PM/base.js +1 -1
- package/dist/module/src/PM/main.js +577 -109
- package/dist/module/src/PM/node.js +4 -2
- package/dist/module/src/PM/nodeSidecar.js +1 -0
- package/dist/module/src/PM/pure.js +20 -57
- package/dist/module/src/PM/pureSidecar.js +1 -1
- package/dist/module/src/PM/types.js +1 -0
- package/dist/module/src/PM/web.js +7 -4
- package/dist/module/src/Pure.js +1 -1
- package/dist/module/src/Pure.test.js +49 -79
- package/dist/module/src/ReportServer.js +8 -2
- package/dist/module/src/build.js +26 -38
- package/dist/module/src/components/DesignEditorPage.js +132 -0
- package/dist/module/src/components/SunriseAnimation.test/interface.js +32 -1
- package/dist/module/src/components/SunriseAnimation.test/types.js +1 -0
- package/dist/module/src/components/TestStatusBadge.js +1 -21
- package/dist/module/src/components/pure/AppFrame.js +32 -0
- package/dist/module/src/components/pure/AppFrame.test/implementation.js +57 -0
- package/dist/module/src/components/pure/AppFrame.test/index.js +9 -0
- package/dist/module/src/components/pure/AppFrame.test/specification.js +21 -0
- package/dist/module/src/components/pure/AppFrame.test/types.js +2 -0
- package/dist/module/src/components/pure/FeaturesReporterView.js +16 -0
- package/dist/module/src/components/pure/FeaturesReporterView.test/implementation.js +81 -0
- package/dist/module/src/components/pure/FeaturesReporterView.test/index.js +9 -0
- package/dist/module/src/components/pure/FeaturesReporterView.test/specification.js +23 -0
- package/dist/module/src/components/pure/FeaturesReporterView.test/types.js +1 -0
- package/dist/module/src/components/pure/ModalContent.js +79 -0
- package/dist/module/src/components/pure/ModalContent.test/implementation.js +32 -0
- package/dist/module/src/components/pure/ModalContent.test/index.js +53 -0
- package/dist/module/src/components/pure/ModalContent.test/specification.js +15 -0
- package/dist/module/src/components/pure/ModalContent.test/types.js +3 -0
- package/dist/module/src/{NavBar.js → components/pure/NavBar.js} +10 -11
- package/dist/module/src/components/pure/ProcessManager.js +75 -0
- package/dist/module/src/components/pure/ProcessManagerView.js +200 -0
- package/dist/module/src/components/pure/ProjectPageView.js +54 -77
- package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +167 -54
- package/dist/module/src/components/pure/ProjectPageView.test/index.js +5 -1
- package/dist/module/src/components/pure/ProjectPageView.test/specification.js +15 -2
- package/dist/module/src/components/pure/ProjectPageView.test/types.js +2 -0
- package/dist/module/src/components/pure/ProjectsPageView.js +21 -14
- package/dist/module/src/components/pure/SettingsButton.js +6 -0
- package/dist/module/src/components/pure/SingleProcessView.js +214 -0
- package/dist/module/src/components/pure/TestPageView.js +470 -142
- package/dist/module/src/components/pure/TestPageView.test/implementation.js +121 -0
- package/dist/module/src/components/pure/TestPageView.test/index.js +10 -0
- package/dist/module/src/components/pure/TestPageView.test/specification.js +22 -0
- package/dist/module/src/components/pure/TestPageView.test/types.js +3 -0
- package/dist/module/src/components/pure/ThemeCard.js +8 -0
- package/dist/module/src/components/stateful/FeaturesReporter.js +22 -0
- package/dist/module/src/components/stateful/FileTree.js +33 -0
- package/dist/module/src/components/stateful/ProcessManagerPage.js +75 -0
- package/dist/module/src/components/stateful/ProjectPage.js +7 -6
- package/dist/module/src/components/stateful/ProjectsPage.js +32 -6
- package/dist/module/src/components/stateful/SettingsPage.js +35 -0
- package/dist/module/src/components/stateful/SingleProcessPage.js +110 -0
- package/dist/module/src/components/stateful/TestPage.js +123 -13
- package/dist/module/src/components/stateful/TextEditorPage.js +117 -0
- package/dist/module/src/defaultConfig.js +1 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +3 -4
- package/dist/module/src/esbuildConfigs/web.js +1 -1
- package/dist/module/src/lib/BaseSuite.js +7 -3
- package/dist/module/src/lib/BaseSuite.test/mock.js +17 -41
- package/dist/module/src/lib/BaseSuite.test/test.js +33 -42
- package/dist/module/src/lib/Sidecar.js +1 -0
- package/dist/module/src/lib/abstractBase.js +40 -13
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +12 -12
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +15 -13
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.mock.js +28 -17
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.pure.js +1 -1
- package/dist/module/src/lib/basebuilder.js +29 -35
- package/dist/module/src/lib/classBuilder.js +5 -3
- package/dist/module/src/lib/core.js +3 -6
- package/dist/module/src/lib/core.test/MockCore.js +0 -14
- package/dist/module/src/lib/core.test/core.test.adapter.js +2 -9
- package/dist/module/src/lib/core.test/core.test.implementation.js +3 -7
- package/dist/module/src/lib/index.js +13 -14
- package/dist/module/src/lib/pmProxy.js +37 -16
- package/dist/module/src/lib/pmProxy.test/adapter.js +20 -4
- package/dist/module/src/lib/pmProxy.test/implementation.js +93 -34
- package/dist/module/src/lib/pmProxy.test/mockPMBase.js +9 -0
- package/dist/module/src/lib/pmProxy.test/specification.js +3 -0
- package/dist/module/src/mothership/index.js +5 -0
- package/dist/module/src/mothership/test.js +44 -25
- package/dist/module/src/types/features.js +31 -0
- package/dist/module/src/utils/api.js +56 -25
- package/dist/module/src/utils/featureUtils.js +24 -0
- package/dist/module/src/utils/logFiles.js +46 -0
- package/dist/module/src/utils/makePrompt.js +109 -0
- package/dist/module/src/web.html.js +2 -6
- package/dist/module/testeranto.config.js +54 -24
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/App.css +53 -80
- package/dist/prebuild/App.js +15520 -4397
- package/dist/prebuild/ReportServer.mjs +104 -6
- package/dist/prebuild/build.mjs +95 -108
- package/dist/prebuild/mothership/index.mjs +5 -0
- package/dist/prebuild/run.mjs +704 -221
- package/dist/types/design-editor/DesignEditor.d.ts +18 -0
- package/dist/types/design-editor/server.d.ts +1 -0
- package/dist/types/src/App.d.ts +1 -0
- package/dist/types/src/PM/index.d.ts +1 -1
- package/dist/types/src/PM/main.d.ts +37 -3
- package/dist/types/src/PM/pure.d.ts +10 -7
- package/dist/types/src/PM/web.d.ts +1 -1
- package/dist/types/src/Pure.test.d.ts +13 -1
- package/dist/types/src/Types.d.ts +1 -0
- package/dist/types/src/components/DesignEditorPage.d.ts +1 -0
- package/dist/types/src/components/SunriseAnimation.d.ts +5 -0
- package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +11 -0
- package/dist/types/src/components/SunriseAnimation.test/types.d.ts +39 -0
- package/dist/types/src/components/pure/AppFrame.d.ts +11 -0
- package/dist/types/src/components/pure/AppFrame.test/implementation.d.ts +3 -0
- package/dist/types/src/components/pure/AppFrame.test/index.d.ts +5 -0
- package/dist/types/src/components/pure/AppFrame.test/specification.d.ts +3 -0
- package/dist/types/src/components/pure/AppFrame.test/types.d.ts +33 -0
- package/dist/types/src/components/pure/FeaturesReporterView.d.ts +7 -0
- package/dist/types/src/components/pure/FeaturesReporterView.test/implementation.d.ts +3 -0
- package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +2 -0
- package/dist/types/src/components/pure/FeaturesReporterView.test/specification.d.ts +3 -0
- package/dist/types/src/components/pure/FeaturesReporterView.test/types.d.ts +54 -0
- package/dist/types/src/components/pure/ModalContent.d.ts +7 -0
- package/dist/types/src/components/pure/ModalContent.test/implementation.d.ts +3 -0
- package/dist/types/src/components/pure/ModalContent.test/index.d.ts +3 -0
- package/dist/types/src/components/pure/ModalContent.test/specification.d.ts +3 -0
- package/dist/types/src/components/pure/ModalContent.test/types.d.ts +45 -0
- package/dist/types/src/{NavBar.d.ts → components/pure/NavBar.d.ts} +4 -0
- package/dist/types/src/components/pure/ProcessManager.d.ts +8 -0
- package/dist/types/src/components/pure/ProcessManagerView.d.ts +20 -0
- package/dist/types/src/components/pure/ProjectPageView.d.ts +7 -7
- package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +1 -2
- package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +29 -11
- package/dist/types/src/components/pure/ProjectsPageView.d.ts +29 -0
- package/dist/types/src/components/pure/SettingsButton.d.ts +2 -0
- package/dist/types/src/components/pure/SingleProcessView.d.ts +0 -0
- package/dist/types/src/components/pure/TestPageView.d.ts +15 -0
- package/dist/types/src/components/pure/TestPageView.test/implementation.d.ts +12 -0
- package/dist/types/src/components/pure/TestPageView.test/index.d.ts +3 -0
- package/dist/types/src/components/pure/TestPageView.test/specification.d.ts +11 -0
- package/dist/types/src/components/pure/TestPageView.test/types.d.ts +65 -0
- package/dist/types/src/components/pure/ThemeCard.d.ts +9 -0
- package/dist/types/src/components/stateful/FeaturesReporter.d.ts +2 -0
- package/dist/types/src/components/stateful/FileTree.d.ts +8 -0
- package/dist/types/src/components/stateful/ProcessManagerPage.d.ts +2 -0
- package/dist/types/src/components/stateful/ProjectPage.d.ts +1 -0
- package/dist/types/src/components/stateful/ProjectsPage.d.ts +1 -0
- package/dist/types/src/components/stateful/SettingsPage.d.ts +2 -0
- package/dist/types/src/components/stateful/SingleProcessPage.d.ts +2 -0
- package/dist/types/src/components/stateful/TestPage.d.ts +1 -0
- package/dist/types/src/components/stateful/TextEditorPage.d.ts +1 -0
- package/dist/types/src/lib/BaseSuite.test/mock.d.ts +3 -3
- package/dist/types/src/lib/abstractBase.d.ts +1 -1
- package/dist/types/src/lib/abstractBase.test/MockGiven.d.ts +1 -1
- package/dist/types/src/lib/baseBuilder.test/baseBuilder.test.pure.d.ts +1 -1
- package/dist/types/src/lib/basebuilder.d.ts +1 -1
- package/dist/types/src/lib/index.d.ts +8 -8
- package/dist/types/src/lib/pmProxy.test/mockPMBase.d.ts +1 -1
- package/dist/types/src/types/features.d.ts +7 -0
- package/dist/types/src/utils/api.d.ts +1 -5
- package/dist/types/src/utils/featureUtils.d.ts +6 -0
- package/dist/types/src/utils/logFiles.d.ts +71 -0
- package/dist/types/src/utils/makePrompt.d.ts +2 -0
- package/dist/types/src/web.html.d.ts +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +17 -0
- package/docs/test-page-components.md +91 -0
- package/docs/testing.prompt.txt +1 -3
- package/index.d.ts +38 -13
- package/marketing.md +166 -0
- package/package.json +38 -11
- package/src/App.tsx +22 -25
- package/src/Node.ts +6 -9
- package/src/PM/PM_WithEslintAndTsc.ts +16 -97
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +2 -0
- package/src/PM/base.ts +1 -3
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +673 -128
- package/src/PM/node.ts +5 -2
- package/src/PM/nodeSidecar.ts +1 -0
- package/src/PM/pure.ts +28 -72
- package/src/PM/pureSidecar.ts +1 -1
- package/src/PM/types.ts +0 -0
- package/src/PM/web.ts +9 -4
- package/src/Pure.test.ts +66 -101
- package/src/Pure.ts +1 -1
- package/src/README.md +85 -0
- package/src/ReportServer.ts +10 -3
- package/src/Types.ts +1 -0
- package/src/app.scss +169 -0
- package/src/build.ts +33 -55
- package/src/components/DesignEditorPage.tsx +169 -0
- package/src/components/{pure/ProjectPageView.test/index.ts → SunriseAnimation.test/index.tsx} +7 -4
- package/src/components/SunriseAnimation.test/interface.ts +49 -0
- package/src/components/SunriseAnimation.test/types.ts +53 -0
- package/src/components/TestStatusBadge.tsx +2 -23
- package/src/components/pure/AppFrame.test/implementation.tsx +72 -0
- package/src/components/pure/AppFrame.test/index.tsx +22 -0
- package/src/components/pure/AppFrame.test/specification.ts +35 -0
- package/src/components/pure/AppFrame.test/types.ts +65 -0
- package/src/components/pure/AppFrame.tsx +134 -0
- package/src/components/pure/FeaturesReporterView.test/implementation.tsx +106 -0
- package/src/components/pure/FeaturesReporterView.test/index.tsx +18 -0
- package/src/components/pure/FeaturesReporterView.test/specification.ts +39 -0
- package/src/components/pure/FeaturesReporterView.test/types.ts +77 -0
- package/src/components/pure/FeaturesReporterView.tsx +37 -0
- package/src/components/pure/ModalContent.test/implementation.tsx +45 -0
- package/src/components/pure/ModalContent.test/index.tsx +67 -0
- package/src/components/pure/ModalContent.test/specification.ts +27 -0
- package/src/components/pure/ModalContent.test/types.ts +72 -0
- package/src/components/pure/ModalContent.tsx +182 -0
- package/src/{NavBar.tsx → components/pure/NavBar.tsx} +31 -15
- package/src/components/pure/ProcessManager.tsx +117 -0
- package/src/components/pure/ProcessManagerView.tsx +414 -0
- package/src/components/pure/ProjectPageView.test/implementation.tsx +186 -57
- package/src/components/pure/ProjectPageView.test/index.tsx +18 -0
- package/src/components/pure/ProjectPageView.test/specification.ts +15 -2
- package/src/components/pure/ProjectPageView.test/types.ts +57 -13
- package/src/components/pure/ProjectPageView.tsx +155 -121
- package/src/components/pure/ProjectsPageView.tsx +73 -32
- package/src/components/pure/SettingsButton.md +1 -0
- package/src/components/pure/SettingsButton.tsx +11 -0
- package/src/components/pure/SingleProcessView.tsx +235 -0
- package/src/components/pure/TestPageView.test/implementation.ts +162 -0
- package/src/components/pure/TestPageView.test/index.tsx +20 -0
- package/src/components/pure/TestPageView.test/specification.ts +58 -0
- package/src/components/pure/TestPageView.test/types.ts +92 -0
- package/src/components/pure/TestPageView.tsx +1009 -299
- package/src/components/pure/ThemeCard.tsx +34 -0
- package/src/components/stateful/FeaturesReporter.tsx +24 -0
- package/src/components/stateful/FileTree.tsx +66 -0
- package/src/components/stateful/ProcessManagerPage.tsx +108 -0
- package/src/components/stateful/ProjectPage.tsx +10 -8
- package/src/components/stateful/ProjectsPage.tsx +36 -7
- package/src/components/stateful/SettingsPage.tsx +82 -0
- package/src/components/stateful/SingleProcessPage.tsx +155 -0
- package/src/components/stateful/TestPage.tsx +147 -30
- package/src/components/stateful/TextEditorPage.tsx +170 -0
- package/src/defaultConfig.ts +1 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +3 -4
- package/src/esbuildConfigs/web.ts +2 -1
- package/src/lib/BaseSuite.test/mock.ts +21 -68
- package/src/lib/BaseSuite.test/test.ts +39 -65
- package/src/lib/BaseSuite.ts +9 -3
- package/src/lib/Sidecar.ts +2 -0
- package/src/lib/abstractBase.test/MockGiven.ts +1 -1
- package/src/lib/abstractBase.ts +47 -20
- package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +14 -13
- package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +17 -14
- package/src/lib/baseBuilder.test/baseBuilder.test.mock.ts +27 -17
- package/src/lib/baseBuilder.test/baseBuilder.test.pure.ts +1 -1
- package/src/lib/basebuilder.ts +48 -54
- package/src/lib/classBuilder.ts +11 -10
- package/src/lib/core.test/MockCore.ts +0 -23
- package/src/lib/core.test/core.test.adapter.ts +6 -12
- package/src/lib/core.test/core.test.implementation.ts +7 -10
- package/src/lib/core.ts +5 -20
- package/src/lib/index.ts +28 -27
- package/src/lib/pmProxy.test/adapter.ts +18 -4
- package/src/lib/pmProxy.test/implementation.ts +130 -46
- package/src/lib/pmProxy.test/mockPMBase.ts +12 -1
- package/src/lib/pmProxy.test/specification.ts +11 -0
- package/src/lib/pmProxy.ts +42 -17
- package/src/lib/types.ts +2 -0
- package/src/mothership/index.ts +6 -0
- package/src/mothership/test.ts +53 -26
- package/src/style.md +2 -0
- package/src/style.scss +3 -486
- package/src/templates/frontpage.html +331 -0
- package/src/templates/frontpage.md +79 -0
- package/src/themes.scss +48 -16
- package/src/types/features.ts +38 -0
- package/src/utils/api.ts +66 -33
- package/src/utils/featureUtils.tsx +42 -0
- package/src/utils/logFiles.ts +60 -0
- package/src/utils/makePrompt.ts +149 -0
- package/src/web.html.ts +6 -6
- package/stargazers.txt +15 -0
- package/stargzers.js +68 -0
- package/testeranto/App.css +53 -80
- package/testeranto/App.js +15520 -4397
- package/testeranto/bundles/node/core/chunk-4CSH4UJE.mjs +872 -0
- package/testeranto/bundles/node/core/chunk-4JTDLQVA.mjs +253 -0
- package/testeranto/bundles/node/core/chunk-C3APFDUV.mjs +70 -0
- package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +295 -0
- package/testeranto/bundles/node/core/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +243 -0
- package/testeranto/bundles/node/core/src/lib/classBuilder.test/classBuilder.test.mjs +411 -0
- package/testeranto/bundles/node/core/src/lib/core.test/core.test.mjs +494 -0
- package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +4755 -0
- package/testeranto/bundles/pure/core/chunk-62UVCSQC.mjs +1022 -0
- package/testeranto/bundles/pure/core/src/Pure.test.mjs +410 -0
- package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +352 -0
- package/testeranto/bundles/pure/core/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +241 -0
- package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.html +15 -0
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.html +1 -5
- package/testeranto/bundles/web/core/src/components/pure/TestPageView.test/index.html +15 -0
- package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.html +15 -0
- package/testeranto/bundles/web/core/src/lib/baseBuilder.test/baseBuilder.test.web.html +15 -0
- package/testeranto/metafiles/node/core.json +2906 -0
- package/testeranto/metafiles/pure/core.json +860 -0
- package/testeranto/metafiles/web/core.json +546 -0
- package/testeranto/reports/core/config.json +103 -2
- package/testeranto/reports/core/src/Pure.test/pure/exit.log +0 -0
- package/testeranto/reports/core/src/Pure.test/pure/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/Pure.test/pure/message.txt +17 -0
- package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +14 -0
- package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +71 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/debug.log +0 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +3 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/exit.log +1 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +0 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/warn.log +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/debug.log +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +3 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/exit.log +1 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/warn.log +0 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/debug.log +0 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/error.log +3 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/exit.log +1 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/info.log +0 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/warn.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +14 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stderr.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stdout.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +31 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +61 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/exit.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/message.txt +17 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +15 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +61 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/debug.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +3 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/exit.log +1 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/info.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/warn.log +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +10 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +17 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/stderr.log +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/stdout.log +6 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-0/butThen/hello.txt +1 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/suite-0/given-testInitialization/then-1/butThen/artifact_test.txt +1 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +71 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +42 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/exit.log +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +10 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +17 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +17 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +42 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/debug.log +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/error.log +3 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/exit.log +1 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/info.log +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/warn.log +0 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +17 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/stderr.log +0 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/stdout.log +619 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/tests.json +165 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +88 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/lint_errors.txt +21 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/prompt.txt +19 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/stderr.log +0 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/stdout.log +0 -0
- package/testeranto/reports/core/src/lib/core.test/core.test/node/type_errors.txt +45 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/lint_errors.txt +15 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +17 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +88 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +10 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/tests.json +152 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +52 -0
- package/testeranto/reports/core/summary.json +74 -5
- package/testeranto/reportsweb_build_errors +546 -0
- package/testeranto.config.ts +58 -25
- package/tsc.log +378 -211
- package/tsconfig.common.json +4 -2
- package/tsconfig.json +9 -6
- package/tsconfig.module.json +3 -2
- package/tsconfig.types.json +3 -1
- package/dist/common/src/components/pure/ProjectPageView.test/adapter.js +0 -20
- package/dist/common/src/lib/dailyAnimation.js +0 -130
- package/dist/module/src/Footer.js +0 -5
- package/dist/module/src/ProjectPage.js +0 -319
- package/dist/module/src/ProjectsPage.js +0 -1
- package/dist/module/src/SettingsButton.js +0 -157
- package/dist/module/src/TestPage.js +0 -271
- package/dist/module/src/TestReport.js +0 -368
- package/dist/module/src/components/pure/ProjectPageView.test/adapter.js +0 -17
- package/dist/module/src/lib/dailyAnimation.js +0 -130
- package/dist/types/src/components/pure/ProjectPageView.test/adapter.d.ts +0 -3
- package/dist/types/testeranto.config.d.ts +0 -3
- package/docs/testing.ai.txt +0 -106
- package/docs.html +0 -572
- package/example.css +0 -351
- package/index.html +0 -284
- package/scripts/compile-docs.js +0 -140
- package/src/App.scss +0 -132
- package/src/Footer.tsx +0 -8
- package/src/Project.scss +0 -1
- package/src/ProjectPage.tsx +0 -459
- package/src/ProjectsPage.tsx +0 -1
- package/src/ReportApp.scss +0 -1
- package/src/SettingsButton.tsx +0 -268
- package/src/TestPage.tsx +0 -476
- package/src/TestReport.scss +0 -24
- package/src/TestReport.tsx +0 -411
- package/src/components/pure/ProjectPageView.test/adapter.ts +0 -21
- package/src/fonts.scss +0 -55
- package/src/lib/dailyAnimation.ts +0 -147
- package/style.css +0 -12156
- package/testeranto/bundles/node/core/metafile.json +0 -8
- package/testeranto/bundles/pure/core/metafile.json +0 -8
- package/testeranto/bundles/web/core/metafile.json +0 -15086
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +0 -39991
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +0 -18
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/logs.txt +0 -59
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +0 -2
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +0 -27
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/suite-0/given-basicRender/then-0/butThen/happyPath.png +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +0 -50
- /package/dist/types/src/{lib/dailyAnimation.d.ts → PM/types.d.ts} +0 -0
|
@@ -7,10 +7,16 @@ const baseProxy = function (pm, mappings) {
|
|
|
7
7
|
const method = mapping[0];
|
|
8
8
|
const arger = mapping[1];
|
|
9
9
|
if (prop === method) {
|
|
10
|
-
return (...x) =>
|
|
10
|
+
return (...x) => {
|
|
11
|
+
// Add debug logging
|
|
12
|
+
const modifiedArgs = arger(...x);
|
|
13
|
+
return target[prop](...modifiedArgs);
|
|
14
|
+
};
|
|
11
15
|
}
|
|
12
16
|
}
|
|
13
|
-
return (...x) =>
|
|
17
|
+
return (...x) => {
|
|
18
|
+
return target[prop](...x);
|
|
19
|
+
};
|
|
14
20
|
},
|
|
15
21
|
});
|
|
16
22
|
};
|
|
@@ -50,10 +56,27 @@ export const butThenProxy = (pm, filepath, addArtifact) => {
|
|
|
50
56
|
],
|
|
51
57
|
[
|
|
52
58
|
"writeFileSync",
|
|
53
|
-
(fp, contents) => {
|
|
59
|
+
(fp, contents, testName) => {
|
|
60
|
+
console.log(`[DEBUG] butThenProxy writeFileSync: fp="${fp}" (type: ${typeof fp}), contents="${contents}" (type: ${typeof contents}), testName="${testName}" (type: ${typeof testName})`);
|
|
61
|
+
// Check if fp is being treated as individual characters
|
|
62
|
+
if (typeof fp !== "string") {
|
|
63
|
+
console.log(`[ERROR] fp is not a string:`, fp);
|
|
64
|
+
// If fp is not a string, try to handle it
|
|
65
|
+
if (Array.isArray(fp)) {
|
|
66
|
+
// If it's an array, join it back into a string
|
|
67
|
+
fp = fp.join("");
|
|
68
|
+
console.log(`[DEBUG] Converted array to string: "${fp}"`);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// For other cases, convert to string
|
|
72
|
+
fp = String(fp);
|
|
73
|
+
console.log(`[DEBUG] Converted to string: "${fp}"`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
54
76
|
const path = `${filepath}/butThen/${fp}`;
|
|
77
|
+
console.log(`[DEBUG] Generated path: "${path}"`);
|
|
55
78
|
addArtifact(path);
|
|
56
|
-
return [path, contents];
|
|
79
|
+
return [path, contents, testName];
|
|
57
80
|
},
|
|
58
81
|
],
|
|
59
82
|
[
|
|
@@ -92,10 +115,10 @@ export const andWhenProxy = (pm, filepath, addArtifact) => {
|
|
|
92
115
|
],
|
|
93
116
|
[
|
|
94
117
|
"writeFileSync",
|
|
95
|
-
(fp, contents) => {
|
|
118
|
+
(fp, contents, testName) => {
|
|
96
119
|
const path = `${filepath}/andWhen/${fp}`;
|
|
97
120
|
addArtifact(path);
|
|
98
|
-
return [path, contents];
|
|
121
|
+
return [path, contents, testName];
|
|
99
122
|
},
|
|
100
123
|
],
|
|
101
124
|
[
|
|
@@ -135,10 +158,10 @@ export const afterEachProxy = (pm, suite, given, addArtifact) => {
|
|
|
135
158
|
],
|
|
136
159
|
[
|
|
137
160
|
"writeFileSync",
|
|
138
|
-
(fp, contents) => {
|
|
161
|
+
(fp, contents, testName) => {
|
|
139
162
|
const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
|
|
140
163
|
addArtifact(path);
|
|
141
|
-
return [path, contents];
|
|
164
|
+
return [path, contents, testName];
|
|
142
165
|
},
|
|
143
166
|
],
|
|
144
167
|
[
|
|
@@ -170,10 +193,10 @@ export const beforeEachProxy = (pm, suite, addArtifact) => {
|
|
|
170
193
|
],
|
|
171
194
|
[
|
|
172
195
|
"writeFileSync",
|
|
173
|
-
(fp, contents) => {
|
|
196
|
+
(fp, contents, testName) => {
|
|
174
197
|
const path = `suite-${suite}/beforeEach/${fp}`;
|
|
175
198
|
addArtifact(path);
|
|
176
|
-
return [path, contents];
|
|
199
|
+
return [path, contents, testName];
|
|
177
200
|
},
|
|
178
201
|
],
|
|
179
202
|
[
|
|
@@ -201,10 +224,10 @@ export const beforeAllProxy = (pm, suite, addArtifact) => {
|
|
|
201
224
|
return baseProxy(pm, [
|
|
202
225
|
[
|
|
203
226
|
"writeFileSync",
|
|
204
|
-
(fp, contents) => {
|
|
227
|
+
(fp, contents, testName) => {
|
|
205
228
|
const path = `suite-${suite}/beforeAll/${fp}`;
|
|
206
229
|
addArtifact(path);
|
|
207
|
-
return [path, contents];
|
|
230
|
+
return [path, contents, testName];
|
|
208
231
|
},
|
|
209
232
|
],
|
|
210
233
|
[
|
|
@@ -240,11 +263,10 @@ export const afterAllProxy = (pm, suite, addArtifact) => {
|
|
|
240
263
|
],
|
|
241
264
|
[
|
|
242
265
|
"writeFileSync",
|
|
243
|
-
(fp, contents) => {
|
|
266
|
+
(fp, contents, testName) => {
|
|
244
267
|
const path = `suite-${suite}/afterAll/${fp}`;
|
|
245
|
-
console.log("MARK10");
|
|
246
268
|
addArtifact(path);
|
|
247
|
-
return [path, contents];
|
|
269
|
+
return [path, contents, testName];
|
|
248
270
|
},
|
|
249
271
|
],
|
|
250
272
|
[
|
|
@@ -252,7 +274,6 @@ export const afterAllProxy = (pm, suite, addArtifact) => {
|
|
|
252
274
|
(opts, p) => {
|
|
253
275
|
const path = `suite-${suite}/afterAll/${opts.path}`;
|
|
254
276
|
addArtifact(path);
|
|
255
|
-
console.log("MARK9");
|
|
256
277
|
return [
|
|
257
278
|
Object.assign(Object.assign({}, opts), { path }),
|
|
258
279
|
p,
|
|
@@ -15,11 +15,17 @@ export const testAdapter = {
|
|
|
15
15
|
// };
|
|
16
16
|
},
|
|
17
17
|
andWhen: async (store, whenCB, testResource, pm) => {
|
|
18
|
-
const proxiedPM = andWhenProxy(pm, "some/path",
|
|
18
|
+
const proxiedPM = andWhenProxy(pm, "some/path", (path) => {
|
|
19
|
+
console.log("Artifact added:", path);
|
|
20
|
+
return path;
|
|
21
|
+
});
|
|
19
22
|
return whenCB(store, proxiedPM);
|
|
20
23
|
},
|
|
21
24
|
butThen: async (store, thenCB, testResource, pm) => {
|
|
22
|
-
const proxiedPM = butThenProxy(pm, "some/path",
|
|
25
|
+
const proxiedPM = butThenProxy(pm, "some/path", (path) => {
|
|
26
|
+
console.log("Artifact added:", path);
|
|
27
|
+
return path;
|
|
28
|
+
});
|
|
23
29
|
return thenCB(store, proxiedPM);
|
|
24
30
|
},
|
|
25
31
|
afterEach: async (store, key, pm) => store,
|
|
@@ -29,7 +35,17 @@ export const testAdapter = {
|
|
|
29
35
|
beforeEachProxy: input.butThenProxy(new MockPMBase(), theGivenString),
|
|
30
36
|
};
|
|
31
37
|
},
|
|
32
|
-
assertThis: (
|
|
33
|
-
|
|
38
|
+
assertThis: (actualResult, expectedResult) => {
|
|
39
|
+
// Handle both path assertions and our new test result
|
|
40
|
+
if (typeof actualResult === 'string' && actualResult.startsWith('PASS')) {
|
|
41
|
+
assert.equal(actualResult, 'PASS', 'tests.json should be written with correct path and content');
|
|
42
|
+
}
|
|
43
|
+
else if (typeof actualResult === 'string' && actualResult.startsWith('FAIL')) {
|
|
44
|
+
// For the tests.json write test, we want to see what's actually happening
|
|
45
|
+
assert.fail(`Test failed: ${actualResult}`);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
assert.equal(actualResult, expectedResult);
|
|
49
|
+
}
|
|
34
50
|
},
|
|
35
51
|
};
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import { MockPMBase } from "./mockPMBase";
|
|
2
|
+
import { butThenProxy } from "../pmProxy";
|
|
3
|
+
function createPathRewriter(basePath) {
|
|
4
|
+
return (path) => {
|
|
5
|
+
if (!path)
|
|
6
|
+
return path;
|
|
7
|
+
// Normalize paths and handle edge cases
|
|
8
|
+
const normalizedPath = path.replace(/\\/g, "/");
|
|
9
|
+
const normalizedBase = basePath.replace(/\\/g, "/");
|
|
10
|
+
// Handle absolute paths
|
|
11
|
+
if (normalizedPath.startsWith("/")) {
|
|
12
|
+
return `${normalizedBase}${normalizedPath}`;
|
|
13
|
+
}
|
|
14
|
+
// Handle parent directory references
|
|
15
|
+
if (normalizedPath.includes("../")) {
|
|
16
|
+
const parts = normalizedPath.split("/");
|
|
17
|
+
const baseParts = normalizedBase.split("/");
|
|
18
|
+
for (const part of parts) {
|
|
19
|
+
if (part === "..") {
|
|
20
|
+
baseParts.pop();
|
|
21
|
+
}
|
|
22
|
+
else if (part !== ".") {
|
|
23
|
+
baseParts.push(part);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return baseParts.join("/");
|
|
27
|
+
}
|
|
28
|
+
return `${normalizedBase}/${normalizedPath}`;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
2
31
|
export const implementation = {
|
|
3
32
|
suites: {
|
|
4
33
|
Default: "PM Proxy Tests",
|
|
@@ -10,58 +39,55 @@ export const implementation = {
|
|
|
10
39
|
// functions have no mutations
|
|
11
40
|
},
|
|
12
41
|
thens: {
|
|
13
|
-
theButTheProxyReturns: (method, expectedPath) => (store) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
42
|
+
theButTheProxyReturns: (method, expectedPath) => async (store) => {
|
|
15
43
|
const mockPm = new MockPMBase();
|
|
16
44
|
const filepath = "test/path";
|
|
17
|
-
|
|
45
|
+
// Track the actual path that was used
|
|
18
46
|
let actualPath;
|
|
19
|
-
|
|
47
|
+
// Monkey patch to track the path
|
|
48
|
+
const originalWriteFileSync = mockPm.writeFileSync;
|
|
49
|
+
mockPm.writeFileSync = async (path, content, testName) => {
|
|
50
|
+
actualPath = path;
|
|
51
|
+
return originalWriteFileSync.call(mockPm, path, content, testName);
|
|
52
|
+
};
|
|
53
|
+
const originalCreateWriteStream = mockPm.createWriteStream;
|
|
54
|
+
mockPm.createWriteStream = async (path, testName) => {
|
|
55
|
+
actualPath = path;
|
|
56
|
+
return originalCreateWriteStream.call(mockPm, path, testName);
|
|
57
|
+
};
|
|
58
|
+
const originalScreencast = mockPm.screencast;
|
|
59
|
+
mockPm.screencast = async (opts, testName, page) => {
|
|
60
|
+
actualPath = opts.path;
|
|
61
|
+
return originalScreencast.call(mockPm, opts, testName, page);
|
|
62
|
+
};
|
|
63
|
+
const originalCustomScreenShot = mockPm.customScreenShot;
|
|
64
|
+
mockPm.customScreenShot = async (opts, testName, pageUid) => {
|
|
65
|
+
actualPath = opts.path;
|
|
66
|
+
return originalCustomScreenShot.call(mockPm, opts, testName, pageUid);
|
|
67
|
+
};
|
|
20
68
|
try {
|
|
21
69
|
switch (method) {
|
|
22
70
|
case "writeFileSync":
|
|
23
|
-
|
|
24
|
-
? "test content"
|
|
25
|
-
: "default content";
|
|
26
|
-
proxiedPm.writeFileSync(expectedPath.includes("empty")
|
|
27
|
-
? ""
|
|
28
|
-
: expectedPath.includes("nested")
|
|
29
|
-
? "nested/folder/test.txt"
|
|
30
|
-
: expectedPath.includes("spaces")
|
|
31
|
-
? "file with spaces.txt"
|
|
32
|
-
: expectedPath.includes("invalid")
|
|
33
|
-
? "../invalid.txt"
|
|
34
|
-
: "test.txt", content);
|
|
35
|
-
actualPath = (_a = mockPm.getLastCall("writeFileSync")) === null || _a === void 0 ? void 0 : _a.path;
|
|
36
|
-
actualContent = (_b = mockPm.getLastCall("writeFileSync")) === null || _b === void 0 ? void 0 : _b.content;
|
|
71
|
+
await butThenProxy(mockPm, filepath, {}).writeFileSync("test.txt", "content", "test");
|
|
37
72
|
break;
|
|
38
73
|
case "createWriteStream":
|
|
39
|
-
|
|
40
|
-
actualPath = (_c = mockPm.getLastCall("createWriteStream")) === null || _c === void 0 ? void 0 : _c.path;
|
|
74
|
+
await butThenProxy(mockPm, filepath, {}).createWriteStream("stream.txt", "test");
|
|
41
75
|
break;
|
|
42
76
|
case "screencast":
|
|
43
|
-
|
|
44
|
-
path: "screen.png",
|
|
45
|
-
quality: 80,
|
|
46
|
-
fullPage: true,
|
|
47
|
-
}, "test");
|
|
48
|
-
actualPath = (_e = (_d = mockPm.getLastCall("screencast")) === null || _d === void 0 ? void 0 : _d.opts) === null || _e === void 0 ? void 0 : _e.path;
|
|
49
|
-
actualContent = (_f = mockPm.getLastCall("screencast")) === null || _f === void 0 ? void 0 : _f.opts;
|
|
77
|
+
await butThenProxy(mockPm, filepath, {}).screencast({ path: "screen.png" }, "test");
|
|
50
78
|
break;
|
|
51
79
|
case "customScreenShot":
|
|
52
|
-
|
|
53
|
-
actualPath = (_h = (_g = mockPm.getLastCall("customScreenShot")) === null || _g === void 0 ? void 0 : _g.opts) === null || _h === void 0 ? void 0 : _h.path;
|
|
80
|
+
await butThenProxy(mockPm, filepath, {}).customScreenShot({ path: "shot.png" }, "test");
|
|
54
81
|
break;
|
|
55
82
|
default:
|
|
56
83
|
throw new Error(`Unknown method: ${method}`);
|
|
57
84
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return [actualPath, expectedPath, actualContent];
|
|
85
|
+
// For now, just return the actual path to be asserted against expectedPath
|
|
86
|
+
// The testAdapter.assertThis will handle the comparison
|
|
87
|
+
return actualPath;
|
|
62
88
|
}
|
|
63
89
|
catch (error) {
|
|
64
|
-
|
|
90
|
+
throw error;
|
|
65
91
|
}
|
|
66
92
|
},
|
|
67
93
|
verifyContent: (expectedContent) => (result) => {
|
|
@@ -71,5 +97,38 @@ export const implementation = {
|
|
|
71
97
|
}
|
|
72
98
|
return result;
|
|
73
99
|
},
|
|
100
|
+
// Test to verify tests.json is written correctly
|
|
101
|
+
verifyTestsJsonWrite: () => async (store) => {
|
|
102
|
+
const mockPm = new MockPMBase();
|
|
103
|
+
// Track the actual parameters passed to writeFileSync
|
|
104
|
+
let actualArgs;
|
|
105
|
+
const originalWriteFileSync = mockPm.writeFileSync;
|
|
106
|
+
mockPm.writeFileSync = async (...args) => {
|
|
107
|
+
actualArgs = args;
|
|
108
|
+
// Check if the first argument is being split
|
|
109
|
+
if (args[0] && typeof args[0] === "string") {
|
|
110
|
+
console.log(`[TESTS.JSON DEBUG] First argument length: ${args[0].length}, value: "${args[0]}"`);
|
|
111
|
+
}
|
|
112
|
+
return originalWriteFileSync.apply(mockPm, args);
|
|
113
|
+
};
|
|
114
|
+
// Simulate writing tests.json through the proxy
|
|
115
|
+
// This should mimic the call in BaseBuilder: puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2))
|
|
116
|
+
const testData = { test: "data" };
|
|
117
|
+
// const result = await butThenProxy(mockPm, "test/path", {}).writeFileSync(
|
|
118
|
+
// "tests.json",
|
|
119
|
+
// JSON.stringify(testData, null, 2),
|
|
120
|
+
// "test"
|
|
121
|
+
// );
|
|
122
|
+
// Check if both path and content are correct
|
|
123
|
+
if (actualArgs &&
|
|
124
|
+
actualArgs[0] === "test/path/butThen/tests.json" &&
|
|
125
|
+
actualArgs[1] === JSON.stringify(testData, null, 2) &&
|
|
126
|
+
actualArgs[2] === "test") {
|
|
127
|
+
return "PASS";
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return `FAIL: args=${JSON.stringify(actualArgs)}`;
|
|
131
|
+
}
|
|
132
|
+
},
|
|
74
133
|
},
|
|
75
134
|
};
|
|
@@ -19,6 +19,15 @@ export class MockPMBase {
|
|
|
19
19
|
const calls = this.calls[method];
|
|
20
20
|
return calls ? calls[calls.length - 1] : null;
|
|
21
21
|
}
|
|
22
|
+
// Add missing methods used in tests
|
|
23
|
+
// writeFileSync(path: string, content: string): Promise<boolean> {
|
|
24
|
+
// this.trackCall('writeFileSync', { path, content });
|
|
25
|
+
// return Promise.resolve(true);
|
|
26
|
+
// }
|
|
27
|
+
// end(uid: number): Promise<boolean> {
|
|
28
|
+
// this.trackCall('end', { uid });
|
|
29
|
+
// return Promise.resolve(true);
|
|
30
|
+
// }
|
|
22
31
|
// Minimal implementations of required methods
|
|
23
32
|
launchSideCar(n, testName, projectName) {
|
|
24
33
|
this.trackCall("launchSideCar", { n, testName, projectName });
|
|
@@ -21,6 +21,9 @@ export const specification = (Suite, Given, When, Then) => [
|
|
|
21
21
|
specialCharsTest: Given.SomeBaseString(["butThenProxy should handle special characters in paths"], [], [
|
|
22
22
|
Then.theButTheProxyReturns("writeFileSync", "test/path/butThen/file with spaces.txt"),
|
|
23
23
|
], "special chars test"),
|
|
24
|
+
testsJsonTest: Given.SomeBaseString(["butThenProxy should handle tests.json correctly"], [], [
|
|
25
|
+
Then.theButTheProxyReturns("writeFileSync", "test/path/butThen/tests.json"),
|
|
26
|
+
], "tests.json test"),
|
|
24
27
|
}),
|
|
25
28
|
Suite.Default("Proxy Type Coverage", {
|
|
26
29
|
// Test all proxy types
|
|
@@ -3,6 +3,11 @@ const app = express();
|
|
|
3
3
|
app.get("/", (req, res) => {
|
|
4
4
|
res.send("Hello World!");
|
|
5
5
|
});
|
|
6
|
+
app.get("/claim", (req, res) => {
|
|
7
|
+
const { resource } = req.query;
|
|
8
|
+
console.log(`Resource claimed: ${resource}`);
|
|
9
|
+
res.status(200).json({ status: 'claimed', resource });
|
|
10
|
+
});
|
|
6
11
|
export default (port) => {
|
|
7
12
|
app.listen(port, () => {
|
|
8
13
|
console.log(`Example app listening on port ${port}`);
|
|
@@ -4,9 +4,7 @@ const specification = (Suite, Given, When, Then) => {
|
|
|
4
4
|
console.log("Suite", Suite);
|
|
5
5
|
return [
|
|
6
6
|
Suite.TheMothership("the mothership allows the coordination of test resources", {
|
|
7
|
-
test0: Given.ItIsRunning([`a resource can be claimed`], [When.IClaimTheResource("test")], [
|
|
8
|
-
// Then.TheResourceIsClaimed("test")
|
|
9
|
-
]),
|
|
7
|
+
test0: Given.ItIsRunning([`a resource can be claimed`], [When.IClaimTheResource("test")], [Then.TheResourceIsClaimed("test")]),
|
|
10
8
|
}, []),
|
|
11
9
|
];
|
|
12
10
|
};
|
|
@@ -14,8 +12,21 @@ const implementation = {
|
|
|
14
12
|
suites: { TheMothership: (x) => x },
|
|
15
13
|
givens: { ItIsRunning: () => undefined },
|
|
16
14
|
whens: {
|
|
17
|
-
IClaimTheResource: (resource) => async (
|
|
18
|
-
|
|
15
|
+
IClaimTheResource: (resource) => async (app, tr, pm) => {
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetch(`http://localhost:${tr.ports[0]}/claim?resource=${resource}`);
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
const errorText = await response.text();
|
|
20
|
+
console.error(`[ERROR] Failed to claim resource: ${errorText}`);
|
|
21
|
+
throw new Error(`Failed to claim resource: ${errorText}`);
|
|
22
|
+
}
|
|
23
|
+
const result = await response.json();
|
|
24
|
+
return app;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
console.error("[ERROR] Resource claim failed:", error);
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
19
30
|
},
|
|
20
31
|
IReleaseTheResource: function (resource) {
|
|
21
32
|
throw new Error("Function not implemented.");
|
|
@@ -25,8 +36,10 @@ const implementation = {
|
|
|
25
36
|
},
|
|
26
37
|
},
|
|
27
38
|
thens: {
|
|
28
|
-
TheResourceIsClaimed: (
|
|
29
|
-
|
|
39
|
+
TheResourceIsClaimed: (expectedResource) => async (app, pm) => {
|
|
40
|
+
// In a real implementation, we'd check the server state
|
|
41
|
+
// For now just log and return success
|
|
42
|
+
return app;
|
|
30
43
|
},
|
|
31
44
|
TheResourceIsUnClaimed: function (It_0) {
|
|
32
45
|
throw new Error("Function not implemented.");
|
|
@@ -34,26 +47,32 @@ const implementation = {
|
|
|
34
47
|
},
|
|
35
48
|
};
|
|
36
49
|
const testAdapter = {
|
|
37
|
-
// assertThis: function (x: any) {
|
|
38
|
-
// throw new Error("Function not implemented.");
|
|
39
|
-
// },
|
|
40
|
-
// andWhen: function (store: any, whenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
41
|
-
// throw new Error("Function not implemented.");
|
|
42
|
-
// },
|
|
43
|
-
// butThen: function (store: any, thenCB: any, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
44
|
-
// throw new Error("Function not implemented.");
|
|
45
|
-
// },
|
|
46
|
-
// afterAll: function (store: any, pm: IPM) {
|
|
47
|
-
// throw new Error("Function not implemented.");
|
|
48
|
-
// },
|
|
49
|
-
// afterEach: function (store: any, key: string, pm: IPM): Promise<unknown> {
|
|
50
|
-
// throw new Error("Function not implemented.");
|
|
51
|
-
// },
|
|
52
|
-
// beforeAll: function (input: Express, testResource: ITTestResourceConfiguration, pm: IPM): Promise<any> {
|
|
53
|
-
// throw new Error("Function not implemented.");
|
|
54
|
-
// },
|
|
55
50
|
beforeEach: async (subject, initializer, testResource, initialValues, pm) => {
|
|
51
|
+
console.log("beforeEach - starting app on port", testResource.ports[0]);
|
|
56
52
|
return subject(testResource.ports[0]);
|
|
57
53
|
},
|
|
54
|
+
andWhen: async (store, whenCB, testResource, pm) => {
|
|
55
|
+
console.log("andWhen - executing action");
|
|
56
|
+
return whenCB(store, testResource, pm);
|
|
57
|
+
},
|
|
58
|
+
butThen: async (store, thenCB, testResource, pm) => {
|
|
59
|
+
console.log("butThen - making assertions");
|
|
60
|
+
return thenCB(store, pm);
|
|
61
|
+
},
|
|
62
|
+
afterEach: async (store, key, pm) => {
|
|
63
|
+
console.log("afterEach - cleaning up");
|
|
64
|
+
return store;
|
|
65
|
+
},
|
|
66
|
+
afterAll: async (store, pm) => {
|
|
67
|
+
console.log("afterAll - final cleanup");
|
|
68
|
+
},
|
|
69
|
+
beforeAll: async (input, testResource, pm) => {
|
|
70
|
+
console.log("beforeAll - initial setup");
|
|
71
|
+
return input;
|
|
72
|
+
},
|
|
73
|
+
assertThis: (x) => {
|
|
74
|
+
console.log("assertThis - validating result");
|
|
75
|
+
return x;
|
|
76
|
+
},
|
|
58
77
|
};
|
|
59
78
|
export default Testeranto(appFactory, specification, implementation, testAdapter);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export function buildTree(projects) {
|
|
2
|
+
return projects.map(projectName => ({
|
|
3
|
+
name: projectName,
|
|
4
|
+
type: 'project',
|
|
5
|
+
children: [{
|
|
6
|
+
name: 'src',
|
|
7
|
+
type: 'file',
|
|
8
|
+
children: [{
|
|
9
|
+
name: 'components',
|
|
10
|
+
type: 'file',
|
|
11
|
+
children: [{
|
|
12
|
+
name: 'pure',
|
|
13
|
+
type: 'file',
|
|
14
|
+
children: [
|
|
15
|
+
{ name: 'AppFrame.test', type: 'file', path: 'src/components/pure/AppFrame.test' },
|
|
16
|
+
{ name: 'FeaturesReporterView.test', type: 'file', path: 'src/components/pure/FeaturesReporterView.test' },
|
|
17
|
+
{ name: 'ProjectPageView.test', type: 'file', path: 'src/components/pure/ProjectPageView.test' }
|
|
18
|
+
]
|
|
19
|
+
}]
|
|
20
|
+
}, {
|
|
21
|
+
name: 'lib',
|
|
22
|
+
type: 'file',
|
|
23
|
+
children: [{
|
|
24
|
+
name: 'baseBuilder.test',
|
|
25
|
+
type: 'file',
|
|
26
|
+
path: 'src/lib/baseBuilder.test'
|
|
27
|
+
}]
|
|
28
|
+
}]
|
|
29
|
+
}]
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getLogFilesForRuntime, STANDARD_LOGS } from "./logFiles";
|
|
1
2
|
export const fetchProjectData = async (projectName) => {
|
|
2
3
|
const [summaryRes, configRes] = await Promise.all([
|
|
3
4
|
fetch(`reports/${projectName}/summary.json`),
|
|
@@ -14,40 +15,70 @@ export const fetchTestData = async (projectName, filepath, runTime) => {
|
|
|
14
15
|
.slice(0, -1)
|
|
15
16
|
.join(".")}/${runTime}`;
|
|
16
17
|
try {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const logFiles = getLogFilesForRuntime(runTime);
|
|
19
|
+
const logs = {};
|
|
20
|
+
// Fetch all log files in parallel
|
|
21
|
+
const logRequests = logFiles.map(async (file) => {
|
|
22
|
+
try {
|
|
23
|
+
const response = await fetch(`${basePath}/${file}`);
|
|
24
|
+
if (!response.ok)
|
|
25
|
+
return null;
|
|
26
|
+
const content = file.endsWith('.json')
|
|
27
|
+
? await response.json()
|
|
28
|
+
: await response.text();
|
|
29
|
+
return { file, content };
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
console.error(`Failed to fetch ${file}:`, err);
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
// Wait for all requests and populate logs
|
|
37
|
+
const logResults = await Promise.all(logRequests);
|
|
38
|
+
logResults.forEach(result => {
|
|
39
|
+
if (result) {
|
|
40
|
+
logs[result.file] = result.content;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
// Ensure we fetch all standard logs
|
|
44
|
+
for (const file of Object.values(STANDARD_LOGS)) {
|
|
45
|
+
if (!logs[file]) {
|
|
46
|
+
try {
|
|
47
|
+
const response = await fetch(`${basePath}/${file}`);
|
|
48
|
+
if (response.ok) {
|
|
49
|
+
logs[file] = file.endsWith('.json')
|
|
50
|
+
? await response.json()
|
|
51
|
+
: await response.text();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
console.error(`Failed to fetch ${file}:`, err);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// const logs = await logFiles.reduce(async (acc, file, i) => {
|
|
60
|
+
// acc[file.split(".")[0]] = await logRes[i].text();
|
|
61
|
+
// return acc;
|
|
62
|
+
// }, {});
|
|
63
|
+
// Check if we got any logs at all
|
|
64
|
+
if (Object.keys(logs).length === 0) {
|
|
24
65
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
typeErrors: await typeRes.text(),
|
|
28
|
-
lintErrors: await lintRes.text(),
|
|
29
|
-
error: "Tests did not complete successfully. Please check the build and runtime logs for errors."
|
|
66
|
+
logs: {},
|
|
67
|
+
error: "No test logs found. The test may not have run or the report files are missing."
|
|
30
68
|
};
|
|
31
69
|
}
|
|
32
70
|
return {
|
|
33
|
-
|
|
34
|
-
logs: await logsRes.text(),
|
|
35
|
-
typeErrors: await typeRes.text(),
|
|
36
|
-
lintErrors: await lintRes.text(),
|
|
71
|
+
logs,
|
|
37
72
|
error: null
|
|
38
73
|
};
|
|
39
74
|
}
|
|
40
75
|
catch (err) {
|
|
41
76
|
return {
|
|
42
|
-
testData: null,
|
|
43
|
-
logs:
|
|
44
|
-
typeErrors: "",
|
|
45
|
-
lintErrors: "",
|
|
46
|
-
error: `Failed to load test data: ${err instanceof Error ? err.message : String(err)}
|
|
77
|
+
// testData: null,
|
|
78
|
+
logs: {},
|
|
79
|
+
// typeErrors: "",
|
|
80
|
+
// lintErrors: "",
|
|
81
|
+
error: `Failed to load test data: ${err instanceof Error ? err.message : String(err)}`,
|
|
47
82
|
};
|
|
48
83
|
}
|
|
49
84
|
};
|
|
50
|
-
export const fetchBuildLogs = async (projectName, runtime) => {
|
|
51
|
-
const res = await fetch(`reports/${projectName}/src/lib/${projectName}.${testName}/${runtime}/metafile.json`);
|
|
52
|
-
return await res.json();
|
|
53
|
-
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const buildTree = (features) => {
|
|
2
|
+
const tree = {};
|
|
3
|
+
features.forEach(({ name, status }) => {
|
|
4
|
+
const parts = name.split(" - ");
|
|
5
|
+
const projectAndTest = parts.slice(0, 2).join(" - ");
|
|
6
|
+
const givenAndThen = parts.slice(2).join(" - ");
|
|
7
|
+
const pathParts = projectAndTest.split("/");
|
|
8
|
+
let current = tree;
|
|
9
|
+
pathParts.forEach((part) => {
|
|
10
|
+
if (!current[part]) {
|
|
11
|
+
current[part] = {};
|
|
12
|
+
}
|
|
13
|
+
current = current[part];
|
|
14
|
+
});
|
|
15
|
+
current[givenAndThen] = status;
|
|
16
|
+
});
|
|
17
|
+
return tree;
|
|
18
|
+
};
|
|
19
|
+
export const renderTree = (nodes) => (React.createElement("ul", null, Object.entries(nodes).map(([key, value]) => (React.createElement("li", { key: key }, typeof value === "string" ? (React.createElement("span", null,
|
|
20
|
+
key,
|
|
21
|
+
" - ",
|
|
22
|
+
value)) : (React.createElement(React.Fragment, null,
|
|
23
|
+
React.createElement("span", null, key),
|
|
24
|
+
renderTree(value))))))));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const LOG_FILES = {
|
|
2
|
+
TESTS: 'tests.json',
|
|
3
|
+
TYPE_ERRORS: 'type_errors.txt',
|
|
4
|
+
LINT_ERRORS: 'lint_errors.txt',
|
|
5
|
+
EXIT: 'exit.log',
|
|
6
|
+
MESSAGE: 'message.txt',
|
|
7
|
+
PROMPT: 'prompt.txt',
|
|
8
|
+
STDOUT: 'stdout.log',
|
|
9
|
+
STDERR: 'stderr.log',
|
|
10
|
+
INFO: 'info.log',
|
|
11
|
+
ERROR: 'error.log',
|
|
12
|
+
WARN: 'warn.log',
|
|
13
|
+
DEBUG: 'debug.log'
|
|
14
|
+
};
|
|
15
|
+
export const STANDARD_LOGS = {
|
|
16
|
+
TESTS: 'tests.json',
|
|
17
|
+
TYPE_ERRORS: 'type_errors.txt',
|
|
18
|
+
LINT_ERRORS: 'lint_errors.txt',
|
|
19
|
+
EXIT: 'exit.log',
|
|
20
|
+
MESSAGE: 'message.txt',
|
|
21
|
+
PROMPT: 'prompt.txt'
|
|
22
|
+
};
|
|
23
|
+
export const RUNTIME_SPECIFIC_LOGS = {
|
|
24
|
+
node: {
|
|
25
|
+
STDOUT: 'stdout.log',
|
|
26
|
+
STDERR: 'stderr.log'
|
|
27
|
+
},
|
|
28
|
+
web: {
|
|
29
|
+
INFO: 'info.log',
|
|
30
|
+
ERROR: 'error.log',
|
|
31
|
+
WARN: 'warn.log',
|
|
32
|
+
DEBUG: 'debug.log'
|
|
33
|
+
},
|
|
34
|
+
pure: {} // No runtime-specific logs for pure
|
|
35
|
+
};
|
|
36
|
+
export const ALL_LOGS = Object.assign(Object.assign({}, STANDARD_LOGS), Object.values(RUNTIME_SPECIFIC_LOGS).reduce((acc, logs) => (Object.assign(Object.assign({}, acc), logs)), {}));
|
|
37
|
+
export const getRuntimeLogs = (runtime) => {
|
|
38
|
+
return {
|
|
39
|
+
standard: Object.values(STANDARD_LOGS),
|
|
40
|
+
runtimeSpecific: Object.values(RUNTIME_SPECIFIC_LOGS[runtime])
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export function getLogFilesForRuntime(runtime) {
|
|
44
|
+
const { standard, runtimeSpecific } = getRuntimeLogs(runtime);
|
|
45
|
+
return [...standard, ...runtimeSpecific];
|
|
46
|
+
}
|