bmad-elsabro 1.0.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/.auto-claude-security.json +209 -0
- package/.claude_settings.json +34 -0
- package/.coderabbit.yaml +40 -0
- package/.nvmrc +1 -0
- package/.prettierignore +9 -0
- package/AI_TEST_GENERATOR_VERIFICATION.md +260 -0
- package/BUDGET_ALERT_TESTING.md +325 -0
- package/CHANGELOG.md +1488 -0
- package/CNAME +1 -0
- package/CONTRIBUTING.md +167 -0
- package/CONTRIBUTORS.md +32 -0
- package/LEGACY_MIGRATION_TESTING.md +428 -0
- package/LICENSE +30 -0
- package/PARTY_MODE_VERIFICATION.md +274 -0
- package/PROJECT_DETECTOR_TESTING.md +288 -0
- package/README.md +236 -0
- package/SECURITY.md +85 -0
- package/TRADEMARK.md +55 -0
- package/WORKFLOW_ROUTER_IMPLEMENTATION.md +379 -0
- package/Wordmark.png +0 -0
- package/banner-bmad-method.png +0 -0
- package/build/icons/512x512.png +0 -0
- package/build-mac.sh +3 -0
- package/docs/404.md +9 -0
- package/docs/_STYLE_GUIDE.md +367 -0
- package/docs/developer/api-reference.md +945 -0
- package/docs/developer/architecture.md +563 -0
- package/docs/developer/contributing.md +831 -0
- package/docs/downloads.md +74 -0
- package/docs/explanation/advanced-elicitation.md +24 -0
- package/docs/explanation/adversarial-review.md +57 -0
- package/docs/explanation/brainstorming.md +31 -0
- package/docs/explanation/brownfield-faq.md +55 -0
- package/docs/explanation/party-mode.md +57 -0
- package/docs/explanation/preventing-agent-conflicts.md +110 -0
- package/docs/explanation/quick-flow.md +27 -0
- package/docs/explanation/why-solutioning-matters.md +75 -0
- package/docs/how-to/brownfield/index.md +84 -0
- package/docs/how-to/brownfield/quick-fix-in-brownfield.md +76 -0
- package/docs/how-to/customize-bmad.md +158 -0
- package/docs/how-to/get-answers-about-bmad.md +102 -0
- package/docs/how-to/install-bmad.md +82 -0
- package/docs/how-to/shard-large-documents.md +101 -0
- package/docs/how-to/upgrade-to-v6.md +131 -0
- package/docs/index.md +56 -0
- package/docs/reference/workflow-map.md +83 -0
- package/docs/tea/explanation/engagement-models.md +710 -0
- package/docs/tea/explanation/fixture-architecture.md +457 -0
- package/docs/tea/explanation/knowledge-base-system.md +554 -0
- package/docs/tea/explanation/network-first-patterns.md +853 -0
- package/docs/tea/explanation/risk-based-testing.md +586 -0
- package/docs/tea/explanation/tea-overview.md +410 -0
- package/docs/tea/explanation/test-quality-standards.md +907 -0
- package/docs/tea/explanation/testing-as-engineering.md +112 -0
- package/docs/tea/glossary/index.md +159 -0
- package/docs/tea/how-to/brownfield/use-tea-for-enterprise.md +525 -0
- package/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md +577 -0
- package/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md +424 -0
- package/docs/tea/how-to/customization/integrate-playwright-utils.md +813 -0
- package/docs/tea/how-to/workflows/run-atdd.md +436 -0
- package/docs/tea/how-to/workflows/run-automate.md +653 -0
- package/docs/tea/how-to/workflows/run-nfr-assess.md +679 -0
- package/docs/tea/how-to/workflows/run-test-design.md +135 -0
- package/docs/tea/how-to/workflows/run-test-review.md +605 -0
- package/docs/tea/how-to/workflows/run-trace.md +883 -0
- package/docs/tea/how-to/workflows/setup-ci.md +712 -0
- package/docs/tea/how-to/workflows/setup-test-framework.md +98 -0
- package/docs/tea/reference/commands.md +276 -0
- package/docs/tea/reference/configuration.md +678 -0
- package/docs/tea/reference/knowledge-base.md +340 -0
- package/docs/tea/tutorials/tea-lite-quickstart.md +444 -0
- package/docs/tutorials/getting-started.md +205 -0
- package/docs/user-guide/getting-started.md +348 -0
- package/docs/user-guide/token-economy.md +601 -0
- package/docs/user-guide/workflows.md +546 -0
- package/electron-builder.yml +75 -0
- package/eslint.config.mjs +152 -0
- package/package.json +162 -0
- package/prettier.config.mjs +32 -0
- package/public/monaco-workers/index.js +21 -0
- package/renderer/App.tsx +311 -0
- package/renderer/components/ChatPanel.tsx +285 -0
- package/renderer/components/CodeEditor.tsx +327 -0
- package/renderer/components/CodeEditor.types.ts +245 -0
- package/renderer/components/FlowSelector.tsx +534 -0
- package/renderer/components/MessageInput.tsx +252 -0
- package/renderer/components/MessageList.tsx +204 -0
- package/renderer/components/MigrationWizard.tsx +896 -0
- package/renderer/components/NotificationCenter.tsx +291 -0
- package/renderer/components/OnboardingWizard.tsx +112 -0
- package/renderer/components/PartyMode.tsx +555 -0
- package/renderer/components/Sidebar.module.css +258 -0
- package/renderer/components/Sidebar.tsx +157 -0
- package/renderer/components/TemplateSelector.tsx +553 -0
- package/renderer/components/Terminal.tsx +523 -0
- package/renderer/components/TestCenter.tsx +364 -0
- package/renderer/components/TokenAnalytics.tsx +607 -0
- package/renderer/components/TokenMonitor.tsx +331 -0
- package/renderer/components/TutorialOverlay.tsx +483 -0
- package/renderer/components/WorkflowEditor.tsx +470 -0
- package/renderer/components/onboarding/Step1Welcome.tsx +72 -0
- package/renderer/components/onboarding/Step2Setup.tsx +193 -0
- package/renderer/components/onboarding/Step3CreateProject.tsx +209 -0
- package/renderer/components/test-center/CoverageDashboard.tsx +588 -0
- package/renderer/components/test-center/ELI5Guide.tsx +521 -0
- package/renderer/components/test-center/TestList.tsx +381 -0
- package/renderer/components/test-center/TestRunner.tsx +431 -0
- package/renderer/components/test-center/TestStepWizard.tsx +1000 -0
- package/renderer/components/test-center/VisualTestBuilder.tsx +460 -0
- package/renderer/components/workflow/DependencyEdge.tsx +200 -0
- package/renderer/components/workflow/StepNode.tsx +234 -0
- package/renderer/components/workflow/StepPalette.tsx +412 -0
- package/renderer/context/ThemeContext.tsx +97 -0
- package/renderer/data/shortcuts.json +94 -0
- package/renderer/data/testing-guides.json +261 -0
- package/renderer/data/tutorials.json +546 -0
- package/renderer/hooks/useKeyboardShortcuts.ts +249 -0
- package/renderer/hooks/useNotifications.ts +267 -0
- package/renderer/hooks/useTheme.ts +149 -0
- package/renderer/hooks/useTokenTracking.ts +464 -0
- package/renderer/hooks/useWorkflowState.ts +309 -0
- package/renderer/index.html +16 -0
- package/renderer/index.tsx +17 -0
- package/renderer/lib/MONACO_OFFLINE_CONFIG.md +153 -0
- package/renderer/lib/chart-utils.ts +472 -0
- package/renderer/lib/file-system-provider.ts +295 -0
- package/renderer/lib/monaco-loader.ts +247 -0
- package/renderer/renderer/components/NOTIFICATION_SYSTEM.md +192 -0
- package/renderer/styles.css +55 -0
- package/renderer/types/css-modules.d.ts +21 -0
- package/renderer/types/electron.d.ts +316 -0
- package/src/bmm/_module-installer/installer.js +48 -0
- package/src/bmm/agents/analyst.agent.yaml +36 -0
- package/src/bmm/agents/architect.agent.yaml +28 -0
- package/src/bmm/agents/dev.agent.yaml +38 -0
- package/src/bmm/agents/parallel-orchestrator.agent.yaml +50 -0
- package/src/bmm/agents/pm.agent.yaml +46 -0
- package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +32 -0
- package/src/bmm/agents/sm.agent.yaml +36 -0
- package/src/bmm/agents/tea.agent.yaml +63 -0
- package/src/bmm/agents/tech-writer/tech-writer-sidecar/documentation-standards.md +224 -0
- package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +45 -0
- package/src/bmm/agents/ux-designer.agent.yaml +26 -0
- package/src/bmm/agents/yolo-dev.agent.yaml +41 -0
- package/src/bmm/data/auto-testing-config.yaml +84 -0
- package/src/bmm/data/guided-mode-instructions.yaml +112 -0
- package/src/bmm/data/parallelization-config.yaml +136 -0
- package/src/bmm/data/project-context-template.md +26 -0
- package/src/bmm/data/speed-profiles.yaml +127 -0
- package/src/bmm/module-help.csv +32 -0
- package/src/bmm/module.yaml +60 -0
- package/src/bmm/teams/default-party.csv +21 -0
- package/src/bmm/teams/team-fullstack.yaml +12 -0
- package/src/bmm/testarch/knowledge/adr-quality-readiness-checklist.md +350 -0
- package/src/bmm/testarch/knowledge/api-request.md +442 -0
- package/src/bmm/testarch/knowledge/api-testing-patterns.md +843 -0
- package/src/bmm/testarch/knowledge/auth-session.md +552 -0
- package/src/bmm/testarch/knowledge/burn-in.md +273 -0
- package/src/bmm/testarch/knowledge/ci-burn-in.md +675 -0
- package/src/bmm/testarch/knowledge/component-tdd.md +486 -0
- package/src/bmm/testarch/knowledge/contract-testing.md +957 -0
- package/src/bmm/testarch/knowledge/data-factories.md +500 -0
- package/src/bmm/testarch/knowledge/email-auth.md +721 -0
- package/src/bmm/testarch/knowledge/error-handling.md +725 -0
- package/src/bmm/testarch/knowledge/feature-flags.md +750 -0
- package/src/bmm/testarch/knowledge/file-utils.md +463 -0
- package/src/bmm/testarch/knowledge/fixture-architecture.md +401 -0
- package/src/bmm/testarch/knowledge/fixtures-composition.md +382 -0
- package/src/bmm/testarch/knowledge/intercept-network-call.md +430 -0
- package/src/bmm/testarch/knowledge/log.md +429 -0
- package/src/bmm/testarch/knowledge/network-error-monitor.md +405 -0
- package/src/bmm/testarch/knowledge/network-first.md +486 -0
- package/src/bmm/testarch/knowledge/network-recorder.md +527 -0
- package/src/bmm/testarch/knowledge/nfr-criteria.md +670 -0
- package/src/bmm/testarch/knowledge/overview.md +286 -0
- package/src/bmm/testarch/knowledge/playwright-config.md +730 -0
- package/src/bmm/testarch/knowledge/probability-impact.md +601 -0
- package/src/bmm/testarch/knowledge/recurse.md +421 -0
- package/src/bmm/testarch/knowledge/risk-governance.md +615 -0
- package/src/bmm/testarch/knowledge/selective-testing.md +732 -0
- package/src/bmm/testarch/knowledge/selector-resilience.md +527 -0
- package/src/bmm/testarch/knowledge/test-healing-patterns.md +644 -0
- package/src/bmm/testarch/knowledge/test-levels-framework.md +473 -0
- package/src/bmm/testarch/knowledge/test-priorities-matrix.md +373 -0
- package/src/bmm/testarch/knowledge/test-quality.md +664 -0
- package/src/bmm/testarch/knowledge/timing-debugging.md +372 -0
- package/src/bmm/testarch/knowledge/visual-debugging.md +524 -0
- package/src/bmm/testarch/tea-index.csv +35 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/product-brief.template.md +10 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-01-init.md +177 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-01b-continue.md +161 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +199 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +202 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +205 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +219 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +162 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/workflow.md +58 -0
- package/src/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +137 -0
- package/src/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +229 -0
- package/src/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +238 -0
- package/src/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +206 -0
- package/src/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +234 -0
- package/src/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +443 -0
- package/src/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +182 -0
- package/src/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +237 -0
- package/src/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +200 -0
- package/src/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +249 -0
- package/src/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +259 -0
- package/src/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +177 -0
- package/src/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +475 -0
- package/src/bmm/workflows/1-analysis/research/research.template.md +29 -0
- package/src/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +137 -0
- package/src/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +239 -0
- package/src/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +248 -0
- package/src/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +202 -0
- package/src/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +239 -0
- package/src/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +486 -0
- package/src/bmm/workflows/1-analysis/research/workflow.md +173 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/data/domain-complexity.csv +13 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +197 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/data/project-types.csv +11 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-01-init.md +191 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-01b-continue.md +153 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +224 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +226 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +213 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +207 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +226 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +237 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +228 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +231 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +242 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +217 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +124 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +247 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01b-legacy-conversion.md +208 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +249 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-03-edit.md +253 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-04-complete.md +168 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +218 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +191 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +209 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +174 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md +214 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md +228 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md +217 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md +205 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md +243 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md +263 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +209 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +264 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md +242 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +231 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/templates/prd-template.md +10 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/validation-report-prd-workflow.md +433 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/workflow.md +150 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +135 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01b-continue.md +127 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +190 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +216 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +219 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +234 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +252 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +254 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +224 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +224 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +241 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +248 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +237 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +264 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +171 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +13 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +43 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-01-document-discovery.md +190 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-02-prd-analysis.md +178 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-03-epic-coverage-validation.md +179 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-04-ux-alignment.md +139 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-05-epic-quality-review.md +252 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +135 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/templates/readiness-report-template.md +4 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md +55 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/architecture-decision-template.md +12 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/data/domain-complexity.csv +11 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/data/project-types.csv +7 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-01-init.md +153 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-01b-continue.md +164 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +224 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +331 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +318 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +359 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +379 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +359 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +76 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/workflow.md +50 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +259 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +233 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +272 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +149 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +57 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +59 -0
- package/src/bmm/workflows/4-implementation/code-review/checklist.md +23 -0
- package/src/bmm/workflows/4-implementation/code-review/instructions.xml +227 -0
- package/src/bmm/workflows/4-implementation/code-review/workflow.yaml +51 -0
- package/src/bmm/workflows/4-implementation/correct-course/checklist.md +288 -0
- package/src/bmm/workflows/4-implementation/correct-course/instructions.md +206 -0
- package/src/bmm/workflows/4-implementation/correct-course/workflow.yaml +60 -0
- package/src/bmm/workflows/4-implementation/create-story/checklist.md +358 -0
- package/src/bmm/workflows/4-implementation/create-story/instructions.xml +345 -0
- package/src/bmm/workflows/4-implementation/create-story/template.md +49 -0
- package/src/bmm/workflows/4-implementation/create-story/workflow.yaml +61 -0
- package/src/bmm/workflows/4-implementation/dev-story/checklist.md +80 -0
- package/src/bmm/workflows/4-implementation/dev-story/instructions.xml +410 -0
- package/src/bmm/workflows/4-implementation/dev-story/workflow.yaml +32 -0
- package/src/bmm/workflows/4-implementation/fix-and-test/workflow.md +197 -0
- package/src/bmm/workflows/4-implementation/retrospective/instructions.md +1443 -0
- package/src/bmm/workflows/4-implementation/retrospective/workflow.yaml +58 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/checklist.md +33 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/instructions.md +225 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +55 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +54 -0
- package/src/bmm/workflows/4-implementation/sprint-status/instructions.md +229 -0
- package/src/bmm/workflows/4-implementation/sprint-status/workflow.yaml +36 -0
- package/src/bmm/workflows/bmad-quick-flow/brownfield-fast-track/steps/step-01-detect.md +55 -0
- package/src/bmm/workflows/bmad-quick-flow/brownfield-fast-track/steps/step-02-confirm.md +48 -0
- package/src/bmm/workflows/bmad-quick-flow/brownfield-fast-track/steps/step-03-implement.md +61 -0
- package/src/bmm/workflows/bmad-quick-flow/brownfield-fast-track/workflow.md +41 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md +176 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md +120 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md +153 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-04-self-check.md +113 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +106 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md +149 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +73 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md +192 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md +145 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md +128 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +201 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/tech-spec-template.md +74 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +93 -0
- package/src/bmm/workflows/bmad-quick-flow/yolo-mode/steps/step-01-rapid-spec.md +54 -0
- package/src/bmm/workflows/bmad-quick-flow/yolo-mode/steps/step-02-ship-it.md +65 -0
- package/src/bmm/workflows/bmad-quick-flow/yolo-mode/workflow.md +54 -0
- package/src/bmm/workflows/document-project/checklist.md +245 -0
- package/src/bmm/workflows/document-project/documentation-requirements.csv +12 -0
- package/src/bmm/workflows/document-project/instructions.md +221 -0
- package/src/bmm/workflows/document-project/templates/deep-dive-template.md +345 -0
- package/src/bmm/workflows/document-project/templates/index-template.md +169 -0
- package/src/bmm/workflows/document-project/templates/project-overview-template.md +103 -0
- package/src/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -0
- package/src/bmm/workflows/document-project/templates/source-tree-template.md +135 -0
- package/src/bmm/workflows/document-project/workflow.yaml +30 -0
- package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
- package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -0
- package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
- package/src/bmm/workflows/document-project/workflows/full-scan.yaml +31 -0
- package/src/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-library.json +90 -0
- package/src/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-templates.yaml +127 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-dataflow/checklist.md +39 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-dataflow/instructions.md +130 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml +27 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-diagram/checklist.md +43 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-diagram/instructions.md +141 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml +27 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-flowchart/checklist.md +49 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-flowchart/instructions.md +241 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml +27 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-wireframe/checklist.md +38 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-wireframe/instructions.md +133 -0
- package/src/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml +27 -0
- package/src/bmm/workflows/parallel-work/parallel-analysis/steps/step-01-parse-target.md +49 -0
- package/src/bmm/workflows/parallel-work/parallel-analysis/steps/step-02-launch-streams.md +135 -0
- package/src/bmm/workflows/parallel-work/parallel-analysis/steps/step-03-sync-point.md +74 -0
- package/src/bmm/workflows/parallel-work/parallel-analysis/steps/step-04-merge-insights.md +179 -0
- package/src/bmm/workflows/parallel-work/parallel-analysis/workflow.md +55 -0
- package/src/bmm/workflows/parallel-work/parallel-generation/workflow.md +109 -0
- package/src/bmm/workflows/parallel-work/parallel-reviews/workflow.md +111 -0
- package/src/bmm/workflows/parallel-work/parallel-stories/workflow.md +112 -0
- package/src/bmm/workflows/parallel-work/sprint-mode/steps/step-01-load-sprint.md +54 -0
- package/src/bmm/workflows/parallel-work/sprint-mode/steps/step-02-plan-execution.md +63 -0
- package/src/bmm/workflows/parallel-work/sprint-mode/steps/step-03-execute-stories.md +112 -0
- package/src/bmm/workflows/parallel-work/sprint-mode/steps/step-04-code-review.md +148 -0
- package/src/bmm/workflows/parallel-work/sprint-mode/steps/step-05-integration-testing.md +200 -0
- package/src/bmm/workflows/parallel-work/sprint-mode/steps/step-06-sprint-report.md +290 -0
- package/src/bmm/workflows/parallel-work/sprint-mode/workflow.md +58 -0
- package/src/bmm/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
- package/src/bmm/workflows/testarch/atdd/checklist.md +374 -0
- package/src/bmm/workflows/testarch/atdd/instructions.md +806 -0
- package/src/bmm/workflows/testarch/atdd/workflow.yaml +47 -0
- package/src/bmm/workflows/testarch/automate/checklist.md +582 -0
- package/src/bmm/workflows/testarch/automate/instructions.md +1324 -0
- package/src/bmm/workflows/testarch/automate/workflow.yaml +54 -0
- package/src/bmm/workflows/testarch/ci/checklist.md +247 -0
- package/src/bmm/workflows/testarch/ci/github-actions-template.yaml +198 -0
- package/src/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +149 -0
- package/src/bmm/workflows/testarch/ci/instructions.md +536 -0
- package/src/bmm/workflows/testarch/ci/workflow.yaml +47 -0
- package/src/bmm/workflows/testarch/framework/checklist.md +320 -0
- package/src/bmm/workflows/testarch/framework/instructions.md +481 -0
- package/src/bmm/workflows/testarch/framework/workflow.yaml +49 -0
- package/src/bmm/workflows/testarch/nfr-assess/checklist.md +407 -0
- package/src/bmm/workflows/testarch/nfr-assess/instructions.md +726 -0
- package/src/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +461 -0
- package/src/bmm/workflows/testarch/nfr-assess/workflow.yaml +49 -0
- package/src/bmm/workflows/testarch/test-design/checklist.md +407 -0
- package/src/bmm/workflows/testarch/test-design/instructions.md +1158 -0
- package/src/bmm/workflows/testarch/test-design/test-design-architecture-template.md +213 -0
- package/src/bmm/workflows/testarch/test-design/test-design-qa-template.md +286 -0
- package/src/bmm/workflows/testarch/test-design/test-design-template.md +294 -0
- package/src/bmm/workflows/testarch/test-design/workflow.yaml +71 -0
- package/src/bmm/workflows/testarch/test-review/checklist.md +472 -0
- package/src/bmm/workflows/testarch/test-review/instructions.md +628 -0
- package/src/bmm/workflows/testarch/test-review/test-review-template.md +390 -0
- package/src/bmm/workflows/testarch/test-review/workflow.yaml +48 -0
- package/src/bmm/workflows/testarch/trace/checklist.md +642 -0
- package/src/bmm/workflows/testarch/trace/instructions.md +1030 -0
- package/src/bmm/workflows/testarch/trace/trace-template.md +675 -0
- package/src/bmm/workflows/testarch/trace/workflow.yaml +57 -0
- package/src/core/_module-installer/installer.js +60 -0
- package/src/core/agents/bmad-master.agent.yaml +29 -0
- package/src/core/module-help.csv +9 -0
- package/src/core/module.yaml +25 -0
- package/src/core/resources/excalidraw/README.md +160 -0
- package/src/core/resources/excalidraw/excalidraw-helpers.md +127 -0
- package/src/core/resources/excalidraw/library-loader.md +50 -0
- package/src/core/resources/excalidraw/validate-json-instructions.md +79 -0
- package/src/core/tasks/editorial-review-prose.xml +100 -0
- package/src/core/tasks/editorial-review-structure.xml +209 -0
- package/src/core/tasks/help.md +62 -0
- package/src/core/tasks/index-docs.xml +65 -0
- package/src/core/tasks/review-adversarial-general.xml +48 -0
- package/src/core/tasks/shard-doc.xml +109 -0
- package/src/core/tasks/workflow.xml +235 -0
- package/src/core/workflows/advanced-elicitation/methods.csv +51 -0
- package/src/core/workflows/advanced-elicitation/workflow.xml +117 -0
- package/src/core/workflows/brainstorming/brain-methods.csv +62 -0
- package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +197 -0
- package/src/core/workflows/brainstorming/steps/step-01b-continue.md +122 -0
- package/src/core/workflows/brainstorming/steps/step-02a-user-selected.md +225 -0
- package/src/core/workflows/brainstorming/steps/step-02b-ai-recommended.md +237 -0
- package/src/core/workflows/brainstorming/steps/step-02c-random-selection.md +209 -0
- package/src/core/workflows/brainstorming/steps/step-02d-progressive-flow.md +264 -0
- package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +399 -0
- package/src/core/workflows/brainstorming/steps/step-04-idea-organization.md +303 -0
- package/src/core/workflows/brainstorming/template.md +15 -0
- package/src/core/workflows/brainstorming/workflow.md +58 -0
- package/src/core/workflows/party-mode/steps/step-01-agent-loading.md +138 -0
- package/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +187 -0
- package/src/core/workflows/party-mode/steps/step-03-graceful-exit.md +157 -0
- package/src/core/workflows/party-mode/workflow.md +194 -0
- package/src/utility/agent-components/activation-rules.txt +6 -0
- package/src/utility/agent-components/activation-steps.txt +14 -0
- package/src/utility/agent-components/agent-command-header.md +1 -0
- package/src/utility/agent-components/agent.customize.template.yaml +41 -0
- package/src/utility/agent-components/handler-action.txt +4 -0
- package/src/utility/agent-components/handler-data.txt +5 -0
- package/src/utility/agent-components/handler-exec.txt +6 -0
- package/src/utility/agent-components/handler-multi.txt +14 -0
- package/src/utility/agent-components/handler-tmpl.txt +5 -0
- package/src/utility/agent-components/handler-validate-workflow.txt +7 -0
- package/src/utility/agent-components/handler-workflow.txt +10 -0
- package/src/utility/agent-components/menu-handlers.txt +6 -0
- package/tools/bmad-npx-wrapper.js +69 -0
- package/tools/build-docs.js +577 -0
- package/tools/cli/README.md +7 -0
- package/tools/cli/bmad-cli.js +65 -0
- package/tools/cli/commands/diagnostics.js +303 -0
- package/tools/cli/commands/install.js +87 -0
- package/tools/cli/commands/module.js +210 -0
- package/tools/cli/commands/status.js +65 -0
- package/tools/cli/commands/uninstall.js +86 -0
- package/tools/cli/external-official-modules.yaml +54 -0
- package/tools/cli/installers/install-messages.yaml +59 -0
- package/tools/cli/installers/lib/core/config-collector.js +1079 -0
- package/tools/cli/installers/lib/core/custom-module-cache.js +259 -0
- package/tools/cli/installers/lib/core/dependency-resolver.js +739 -0
- package/tools/cli/installers/lib/core/detector.js +223 -0
- package/tools/cli/installers/lib/core/ide-config-manager.js +156 -0
- package/tools/cli/installers/lib/core/installer.js +2812 -0
- package/tools/cli/installers/lib/core/manifest-generator.js +1054 -0
- package/tools/cli/installers/lib/core/manifest.js +1036 -0
- package/tools/cli/installers/lib/custom/handler.js +363 -0
- package/tools/cli/installers/lib/ide/_base-ide.js +655 -0
- package/tools/cli/installers/lib/ide/_config-driven.js +450 -0
- package/tools/cli/installers/lib/ide/codex.js +440 -0
- package/tools/cli/installers/lib/ide/kilo.js +250 -0
- package/tools/cli/installers/lib/ide/kiro-cli.js +326 -0
- package/tools/cli/installers/lib/ide/manager.js +271 -0
- package/tools/cli/installers/lib/ide/platform-codes.js +100 -0
- package/tools/cli/installers/lib/ide/platform-codes.yaml +227 -0
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +181 -0
- package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +163 -0
- package/tools/cli/installers/lib/ide/shared/module-injections.js +136 -0
- package/tools/cli/installers/lib/ide/shared/path-utils.js +292 -0
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +270 -0
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +319 -0
- package/tools/cli/installers/lib/ide/templates/agent-command-template.md +14 -0
- package/tools/cli/installers/lib/ide/templates/combined/antigravity.md +8 -0
- package/tools/cli/installers/lib/ide/templates/combined/default-agent.md +15 -0
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +14 -0
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +6 -0
- package/tools/cli/installers/lib/ide/templates/combined/gemini-agent.toml +14 -0
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +16 -0
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +14 -0
- package/tools/cli/installers/lib/ide/templates/combined/rovodev.md +9 -0
- package/tools/cli/installers/lib/ide/templates/combined/trae.md +9 -0
- package/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md +10 -0
- package/tools/cli/installers/lib/ide/templates/split/opencode/body.md +10 -0
- package/tools/cli/installers/lib/ide/templates/split/opencode/header.md +4 -0
- package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +13 -0
- package/tools/cli/installers/lib/ide/templates/workflow-commander.md +5 -0
- package/tools/cli/installers/lib/message-loader.js +85 -0
- package/tools/cli/installers/lib/modules/external-manager.js +135 -0
- package/tools/cli/installers/lib/modules/manager.js +1375 -0
- package/tools/cli/lib/activation-builder.js +163 -0
- package/tools/cli/lib/agent/compiler.js +522 -0
- package/tools/cli/lib/agent/compiler.ts +572 -0
- package/tools/cli/lib/agent/installer.js +716 -0
- package/tools/cli/lib/agent/template-engine.js +152 -0
- package/tools/cli/lib/agent/types.ts +155 -0
- package/tools/cli/lib/agent-analyzer.js +109 -0
- package/tools/cli/lib/agent-party-generator.js +194 -0
- package/tools/cli/lib/cli-utils.js +227 -0
- package/tools/cli/lib/config.js +213 -0
- package/tools/cli/lib/config.ts +227 -0
- package/tools/cli/lib/file-ops.js +204 -0
- package/tools/cli/lib/file-ops.ts +215 -0
- package/tools/cli/lib/platform-codes.js +116 -0
- package/tools/cli/lib/project-root.js +77 -0
- package/tools/cli/lib/prompts.js +433 -0
- package/tools/cli/lib/prompts.ts +541 -0
- package/tools/cli/lib/types/config.types.ts +43 -0
- package/tools/cli/lib/types/xml-handler.types.ts +50 -0
- package/tools/cli/lib/ui.js +1660 -0
- package/tools/cli/lib/xml-handler.js +177 -0
- package/tools/cli/lib/xml-handler.ts +188 -0
- package/tools/cli/lib/xml-to-markdown.js +82 -0
- package/tools/cli/lib/yaml-format.js +245 -0
- package/tools/cli/lib/yaml-xml-builder.js +587 -0
- package/tools/docs/BUNDLE_DISTRIBUTION_SETUP.md +95 -0
- package/tools/docs/fix-refs.md +91 -0
- package/tools/docs/index.md +2 -0
- package/tools/fix-doc-links.js +288 -0
- package/tools/flattener/aggregate.js +76 -0
- package/tools/flattener/aggregate.ts +78 -0
- package/tools/flattener/binary.js +80 -0
- package/tools/flattener/discovery.js +71 -0
- package/tools/flattener/files.js +35 -0
- package/tools/flattener/files.ts +31 -0
- package/tools/flattener/ignoreRules.js +172 -0
- package/tools/flattener/main.js +483 -0
- package/tools/flattener/main.ts +262 -0
- package/tools/flattener/projectRoot.js +201 -0
- package/tools/flattener/prompts.js +44 -0
- package/tools/flattener/stats.helpers.js +368 -0
- package/tools/flattener/stats.js +75 -0
- package/tools/flattener/test-matrix.js +409 -0
- package/tools/flattener/types.ts +53 -0
- package/tools/flattener/xml.js +82 -0
- package/tools/format-workflow-md.js +263 -0
- package/tools/lib/xml-utils.js +13 -0
- package/tools/maintainer/review-pr-README.md +55 -0
- package/tools/maintainer/review-pr.md +242 -0
- package/tools/migrate-custom-module-paths.js +124 -0
- package/tools/platform-codes.yaml +157 -0
- package/tools/schema/agent.js +491 -0
- package/tools/schema/agent.ts +489 -0
- package/tools/schema/agent.types.ts +31 -0
- package/tools/update-bmad.sh +24 -0
- package/tools/validate-agent-schema.js +110 -0
- package/tools/validate-doc-links.js +371 -0
- package/tools/validate-svg-changes.sh +356 -0
- package/vite-plugin-monaco-editor.ts +108 -0
|
@@ -0,0 +1,1000 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TestStepWizard Component
|
|
3
|
+
*
|
|
4
|
+
* Multi-step wizard for creating tests without code.
|
|
5
|
+
* Inspired by the interactive wizard pattern from tools/cli/lib/prompts.js,
|
|
6
|
+
* translated into a visual React component for non-programmers.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Step-by-step test creation flow
|
|
10
|
+
* - Visual progress indicator
|
|
11
|
+
* - Validation before proceeding to next step
|
|
12
|
+
* - Conditional logic based on selections
|
|
13
|
+
* - Dark/light theme support
|
|
14
|
+
* - Keyboard navigation (Next: Enter, Back: Escape)
|
|
15
|
+
*
|
|
16
|
+
* Steps:
|
|
17
|
+
* 1. Select test type (function, class, component, workflow)
|
|
18
|
+
* 2. Choose test framework (Jest, Mocha, Vitest)
|
|
19
|
+
* 3. Define test scenarios (happy path, edge cases, errors)
|
|
20
|
+
* 4. Configure assertions
|
|
21
|
+
* 5. Review and generate test
|
|
22
|
+
*
|
|
23
|
+
* @module renderer/components/test-center/TestStepWizard
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import React, { useState, useCallback, useEffect } from 'react';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Wizard step configuration
|
|
30
|
+
*/
|
|
31
|
+
export interface WizardStep {
|
|
32
|
+
/**
|
|
33
|
+
* Step ID
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Step title
|
|
39
|
+
*/
|
|
40
|
+
title: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Step description
|
|
44
|
+
*/
|
|
45
|
+
description: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Whether this step is completed
|
|
49
|
+
*/
|
|
50
|
+
completed: boolean;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Whether this step can be skipped
|
|
54
|
+
*/
|
|
55
|
+
optional?: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Test type option
|
|
60
|
+
*/
|
|
61
|
+
export type TestType = 'function' | 'class' | 'component' | 'workflow';
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Test framework option
|
|
65
|
+
*/
|
|
66
|
+
export type TestFramework = 'jest' | 'mocha' | 'vitest';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Test scenario configuration
|
|
70
|
+
*/
|
|
71
|
+
export interface TestScenario {
|
|
72
|
+
/**
|
|
73
|
+
* Scenario ID
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Scenario type
|
|
79
|
+
*/
|
|
80
|
+
type: 'happy-path' | 'edge-case' | 'error-handling';
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Scenario description
|
|
84
|
+
*/
|
|
85
|
+
description: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Input values for the scenario
|
|
89
|
+
*/
|
|
90
|
+
inputs: Record<string, string>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Expected output
|
|
94
|
+
*/
|
|
95
|
+
expectedOutput: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Whether this scenario is enabled
|
|
99
|
+
*/
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Assertion configuration
|
|
105
|
+
*/
|
|
106
|
+
export interface Assertion {
|
|
107
|
+
/**
|
|
108
|
+
* Assertion ID
|
|
109
|
+
*/
|
|
110
|
+
id: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Assertion type (equals, contains, throws, etc.)
|
|
114
|
+
*/
|
|
115
|
+
type: 'equals' | 'contains' | 'throws' | 'truthy' | 'falsy' | 'greater-than' | 'less-than';
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Value to compare against
|
|
119
|
+
*/
|
|
120
|
+
value: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Assertion description
|
|
124
|
+
*/
|
|
125
|
+
description: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Test configuration data
|
|
130
|
+
*/
|
|
131
|
+
export interface TestConfiguration {
|
|
132
|
+
/**
|
|
133
|
+
* Test type
|
|
134
|
+
*/
|
|
135
|
+
testType: TestType | null;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Test framework
|
|
139
|
+
*/
|
|
140
|
+
framework: TestFramework | null;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Target code element name
|
|
144
|
+
*/
|
|
145
|
+
targetName: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Target file path
|
|
149
|
+
*/
|
|
150
|
+
targetPath: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Test scenarios
|
|
154
|
+
*/
|
|
155
|
+
scenarios: TestScenario[];
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Assertions
|
|
159
|
+
*/
|
|
160
|
+
assertions: Assertion[];
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Generated test file path
|
|
164
|
+
*/
|
|
165
|
+
outputPath: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Props for TestStepWizard component
|
|
170
|
+
*/
|
|
171
|
+
export interface TestStepWizardProps {
|
|
172
|
+
/**
|
|
173
|
+
* Callback when wizard is completed
|
|
174
|
+
*/
|
|
175
|
+
onComplete?: (config: TestConfiguration) => void;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Callback when wizard is cancelled
|
|
179
|
+
*/
|
|
180
|
+
onCancel?: () => void;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Initial configuration (for editing existing test)
|
|
184
|
+
*/
|
|
185
|
+
initialConfig?: Partial<TestConfiguration>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Custom CSS class name
|
|
189
|
+
*/
|
|
190
|
+
className?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* TestStepWizard Component
|
|
195
|
+
*
|
|
196
|
+
* Multi-step wizard for visually creating tests without writing code.
|
|
197
|
+
* Guides non-programmers through test creation with clear explanations.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```tsx
|
|
201
|
+
* <TestStepWizard
|
|
202
|
+
* onComplete={(config) => console.log('Test created:', config)}
|
|
203
|
+
* onCancel={() => console.log('Cancelled')}
|
|
204
|
+
* />
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
export const TestStepWizard: React.FC<TestStepWizardProps> = ({
|
|
208
|
+
onComplete,
|
|
209
|
+
onCancel,
|
|
210
|
+
initialConfig,
|
|
211
|
+
className = '',
|
|
212
|
+
}) => {
|
|
213
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
214
|
+
const [config, setConfig] = useState<TestConfiguration>({
|
|
215
|
+
testType: initialConfig?.testType || null,
|
|
216
|
+
framework: initialConfig?.framework || null,
|
|
217
|
+
targetName: initialConfig?.targetName || '',
|
|
218
|
+
targetPath: initialConfig?.targetPath || '',
|
|
219
|
+
scenarios: initialConfig?.scenarios || [],
|
|
220
|
+
assertions: initialConfig?.assertions || [],
|
|
221
|
+
outputPath: initialConfig?.outputPath || '',
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Wizard steps
|
|
226
|
+
*/
|
|
227
|
+
const steps: WizardStep[] = [
|
|
228
|
+
{
|
|
229
|
+
id: 'test-type',
|
|
230
|
+
title: 'What do you want to test?',
|
|
231
|
+
description: 'Choose the type of code you want to test',
|
|
232
|
+
completed: config.testType !== null,
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: 'framework',
|
|
236
|
+
title: 'Choose test framework',
|
|
237
|
+
description: 'Select the testing framework you prefer',
|
|
238
|
+
completed: config.framework !== null,
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: 'target',
|
|
242
|
+
title: 'Identify your code',
|
|
243
|
+
description: 'Tell us what code to test',
|
|
244
|
+
completed: config.targetName.length > 0 && config.targetPath.length > 0,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'scenarios',
|
|
248
|
+
title: 'Define test scenarios',
|
|
249
|
+
description: 'Describe what situations to test',
|
|
250
|
+
completed: config.scenarios.length > 0,
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: 'assertions',
|
|
254
|
+
title: 'Set expectations',
|
|
255
|
+
description: 'Define what should happen in each test',
|
|
256
|
+
completed: config.assertions.length > 0,
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: 'review',
|
|
260
|
+
title: 'Review & Generate',
|
|
261
|
+
description: 'Review your test configuration and generate the test file',
|
|
262
|
+
completed: false,
|
|
263
|
+
},
|
|
264
|
+
];
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Check if current step is valid
|
|
268
|
+
*/
|
|
269
|
+
const isCurrentStepValid = useCallback(() => {
|
|
270
|
+
return steps[currentStep]?.completed || false;
|
|
271
|
+
}, [currentStep, steps]);
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Go to next step
|
|
275
|
+
*/
|
|
276
|
+
const handleNext = useCallback(() => {
|
|
277
|
+
if (currentStep < steps.length - 1 && isCurrentStepValid()) {
|
|
278
|
+
setCurrentStep(currentStep + 1);
|
|
279
|
+
}
|
|
280
|
+
}, [currentStep, steps.length, isCurrentStepValid]);
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Go to previous step
|
|
284
|
+
*/
|
|
285
|
+
const handleBack = useCallback(() => {
|
|
286
|
+
if (currentStep > 0) {
|
|
287
|
+
setCurrentStep(currentStep - 1);
|
|
288
|
+
}
|
|
289
|
+
}, [currentStep]);
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Complete wizard
|
|
293
|
+
*/
|
|
294
|
+
const handleComplete = useCallback(() => {
|
|
295
|
+
onComplete?.(config);
|
|
296
|
+
}, [config, onComplete]);
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Cancel wizard
|
|
300
|
+
*/
|
|
301
|
+
const handleCancel = useCallback(() => {
|
|
302
|
+
onCancel?.();
|
|
303
|
+
}, [onCancel]);
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Keyboard shortcuts
|
|
307
|
+
*/
|
|
308
|
+
useEffect(() => {
|
|
309
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
310
|
+
if (e.key === 'Enter' && isCurrentStepValid()) {
|
|
311
|
+
e.preventDefault();
|
|
312
|
+
if (currentStep === steps.length - 1) {
|
|
313
|
+
handleComplete();
|
|
314
|
+
} else {
|
|
315
|
+
handleNext();
|
|
316
|
+
}
|
|
317
|
+
} else if (e.key === 'Escape') {
|
|
318
|
+
e.preventDefault();
|
|
319
|
+
if (currentStep === 0) {
|
|
320
|
+
handleCancel();
|
|
321
|
+
} else {
|
|
322
|
+
handleBack();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
328
|
+
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
329
|
+
}, [currentStep, steps.length, isCurrentStepValid, handleNext, handleBack, handleCancel, handleComplete]);
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Render step content based on current step
|
|
333
|
+
*/
|
|
334
|
+
const renderStepContent = () => {
|
|
335
|
+
switch (steps[currentStep].id) {
|
|
336
|
+
case 'test-type':
|
|
337
|
+
return <StepTestType config={config} setConfig={setConfig} />;
|
|
338
|
+
case 'framework':
|
|
339
|
+
return <StepFramework config={config} setConfig={setConfig} />;
|
|
340
|
+
case 'target':
|
|
341
|
+
return <StepTarget config={config} setConfig={setConfig} />;
|
|
342
|
+
case 'scenarios':
|
|
343
|
+
return <StepScenarios config={config} setConfig={setConfig} />;
|
|
344
|
+
case 'assertions':
|
|
345
|
+
return <StepAssertions config={config} setConfig={setConfig} />;
|
|
346
|
+
case 'review':
|
|
347
|
+
return <StepReview config={config} />;
|
|
348
|
+
default:
|
|
349
|
+
return null;
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
return (
|
|
354
|
+
<div className={`flex flex-col h-full bg-white dark:bg-gray-900 ${className}`}>
|
|
355
|
+
{/* Header with progress */}
|
|
356
|
+
<div className="flex-none border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 px-6 py-4">
|
|
357
|
+
<div className="max-w-3xl mx-auto">
|
|
358
|
+
<h2 className="text-xl font-bold text-gray-900 dark:text-white mb-4">
|
|
359
|
+
Visual Test Builder
|
|
360
|
+
</h2>
|
|
361
|
+
|
|
362
|
+
{/* Progress bar */}
|
|
363
|
+
<div className="flex items-center gap-2 mb-2">
|
|
364
|
+
{steps.map((step, index) => (
|
|
365
|
+
<React.Fragment key={step.id}>
|
|
366
|
+
<div
|
|
367
|
+
className={`flex items-center justify-center w-8 h-8 rounded-full text-sm font-semibold transition-colors ${
|
|
368
|
+
index === currentStep
|
|
369
|
+
? 'bg-blue-600 text-white'
|
|
370
|
+
: step.completed
|
|
371
|
+
? 'bg-green-600 text-white'
|
|
372
|
+
: 'bg-gray-300 dark:bg-gray-600 text-gray-600 dark:text-gray-400'
|
|
373
|
+
}`}
|
|
374
|
+
title={step.title}
|
|
375
|
+
>
|
|
376
|
+
{step.completed ? '✓' : index + 1}
|
|
377
|
+
</div>
|
|
378
|
+
{index < steps.length - 1 && (
|
|
379
|
+
<div
|
|
380
|
+
className={`flex-1 h-1 rounded transition-colors ${
|
|
381
|
+
step.completed
|
|
382
|
+
? 'bg-green-600'
|
|
383
|
+
: 'bg-gray-300 dark:bg-gray-600'
|
|
384
|
+
}`}
|
|
385
|
+
/>
|
|
386
|
+
)}
|
|
387
|
+
</React.Fragment>
|
|
388
|
+
))}
|
|
389
|
+
</div>
|
|
390
|
+
|
|
391
|
+
{/* Current step info */}
|
|
392
|
+
<div className="text-sm text-gray-600 dark:text-gray-400">
|
|
393
|
+
Step {currentStep + 1} of {steps.length}
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
|
|
398
|
+
{/* Step content */}
|
|
399
|
+
<div className="flex-1 overflow-y-auto px-6 py-6">
|
|
400
|
+
<div className="max-w-3xl mx-auto">
|
|
401
|
+
<div className="mb-6">
|
|
402
|
+
<h3 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">
|
|
403
|
+
{steps[currentStep].title}
|
|
404
|
+
</h3>
|
|
405
|
+
<p className="text-sm text-gray-600 dark:text-gray-400">
|
|
406
|
+
{steps[currentStep].description}
|
|
407
|
+
</p>
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
{renderStepContent()}
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
{/* Footer with navigation */}
|
|
415
|
+
<div className="flex-none border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 px-6 py-4">
|
|
416
|
+
<div className="max-w-3xl mx-auto flex items-center justify-between">
|
|
417
|
+
<button
|
|
418
|
+
onClick={currentStep === 0 ? handleCancel : handleBack}
|
|
419
|
+
className="px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors"
|
|
420
|
+
aria-label={currentStep === 0 ? 'Cancel' : 'Previous step'}
|
|
421
|
+
>
|
|
422
|
+
{currentStep === 0 ? '✗ Cancel' : '← Back'}
|
|
423
|
+
</button>
|
|
424
|
+
|
|
425
|
+
<div className="text-xs text-gray-500 dark:text-gray-400">
|
|
426
|
+
Press <kbd className="px-2 py-1 bg-gray-200 dark:bg-gray-700 rounded">Enter</kbd> to continue
|
|
427
|
+
{currentStep > 0 && (
|
|
428
|
+
<>, <kbd className="px-2 py-1 bg-gray-200 dark:bg-gray-700 rounded">Esc</kbd> to go back</>
|
|
429
|
+
)}
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
<button
|
|
433
|
+
onClick={currentStep === steps.length - 1 ? handleComplete : handleNext}
|
|
434
|
+
disabled={!isCurrentStepValid()}
|
|
435
|
+
className="px-6 py-2 text-sm bg-blue-600 hover:bg-blue-700 text-white rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed font-medium"
|
|
436
|
+
aria-label={currentStep === steps.length - 1 ? 'Generate test' : 'Next step'}
|
|
437
|
+
>
|
|
438
|
+
{currentStep === steps.length - 1 ? '✓ Generate Test' : 'Next →'}
|
|
439
|
+
</button>
|
|
440
|
+
</div>
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
);
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Step 1: Test Type Selection
|
|
448
|
+
*/
|
|
449
|
+
interface StepProps {
|
|
450
|
+
config: TestConfiguration;
|
|
451
|
+
setConfig: React.Dispatch<React.SetStateAction<TestConfiguration>>;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
const StepTestType: React.FC<StepProps> = ({ config, setConfig }) => {
|
|
455
|
+
const testTypes: { value: TestType; label: string; description: string; icon: string }[] = [
|
|
456
|
+
{
|
|
457
|
+
value: 'function',
|
|
458
|
+
label: 'Function',
|
|
459
|
+
description: 'Test a standalone function (like add, calculate, format)',
|
|
460
|
+
icon: 'ƒ',
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
value: 'class',
|
|
464
|
+
label: 'Class',
|
|
465
|
+
description: 'Test a class with methods and properties',
|
|
466
|
+
icon: '⊡',
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
value: 'component',
|
|
470
|
+
label: 'Component',
|
|
471
|
+
description: 'Test a React/UI component',
|
|
472
|
+
icon: '⚛',
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
value: 'workflow',
|
|
476
|
+
label: 'Workflow Step',
|
|
477
|
+
description: 'Test a BMAD workflow step',
|
|
478
|
+
icon: '⚙',
|
|
479
|
+
},
|
|
480
|
+
];
|
|
481
|
+
|
|
482
|
+
return (
|
|
483
|
+
<div className="space-y-4">
|
|
484
|
+
{testTypes.map((type) => (
|
|
485
|
+
<button
|
|
486
|
+
key={type.value}
|
|
487
|
+
onClick={() => setConfig({ ...config, testType: type.value })}
|
|
488
|
+
className={`w-full text-left p-6 rounded-lg border-2 transition-all ${
|
|
489
|
+
config.testType === type.value
|
|
490
|
+
? 'border-blue-600 bg-blue-50 dark:bg-blue-900/20'
|
|
491
|
+
: 'border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500'
|
|
492
|
+
}`}
|
|
493
|
+
>
|
|
494
|
+
<div className="flex items-start gap-4">
|
|
495
|
+
<div className="text-4xl">{type.icon}</div>
|
|
496
|
+
<div className="flex-1">
|
|
497
|
+
<h4 className="text-lg font-semibold text-gray-900 dark:text-white mb-1">
|
|
498
|
+
{type.label}
|
|
499
|
+
</h4>
|
|
500
|
+
<p className="text-sm text-gray-600 dark:text-gray-400">
|
|
501
|
+
{type.description}
|
|
502
|
+
</p>
|
|
503
|
+
</div>
|
|
504
|
+
{config.testType === type.value && (
|
|
505
|
+
<div className="text-blue-600 dark:text-blue-400">✓</div>
|
|
506
|
+
)}
|
|
507
|
+
</div>
|
|
508
|
+
</button>
|
|
509
|
+
))}
|
|
510
|
+
</div>
|
|
511
|
+
);
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Step 2: Framework Selection
|
|
516
|
+
*/
|
|
517
|
+
const StepFramework: React.FC<StepProps> = ({ config, setConfig }) => {
|
|
518
|
+
const frameworks: { value: TestFramework; label: string; description: string }[] = [
|
|
519
|
+
{
|
|
520
|
+
value: 'jest',
|
|
521
|
+
label: 'Jest',
|
|
522
|
+
description: 'Most popular, great for React. Recommended for beginners.',
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
value: 'mocha',
|
|
526
|
+
label: 'Mocha',
|
|
527
|
+
description: 'Flexible and widely used in Node.js projects.',
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
value: 'vitest',
|
|
531
|
+
label: 'Vitest',
|
|
532
|
+
description: 'Modern and fast, great for Vite projects.',
|
|
533
|
+
},
|
|
534
|
+
];
|
|
535
|
+
|
|
536
|
+
return (
|
|
537
|
+
<div className="space-y-4">
|
|
538
|
+
{frameworks.map((framework) => (
|
|
539
|
+
<button
|
|
540
|
+
key={framework.value}
|
|
541
|
+
onClick={() => setConfig({ ...config, framework: framework.value })}
|
|
542
|
+
className={`w-full text-left p-5 rounded-lg border-2 transition-all ${
|
|
543
|
+
config.framework === framework.value
|
|
544
|
+
? 'border-blue-600 bg-blue-50 dark:bg-blue-900/20'
|
|
545
|
+
: 'border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500'
|
|
546
|
+
}`}
|
|
547
|
+
>
|
|
548
|
+
<div className="flex items-start gap-3">
|
|
549
|
+
<div className="flex-1">
|
|
550
|
+
<h4 className="text-lg font-semibold text-gray-900 dark:text-white mb-1">
|
|
551
|
+
{framework.label}
|
|
552
|
+
{framework.value === 'jest' && (
|
|
553
|
+
<span className="ml-2 text-xs bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300 px-2 py-1 rounded">
|
|
554
|
+
Recommended
|
|
555
|
+
</span>
|
|
556
|
+
)}
|
|
557
|
+
</h4>
|
|
558
|
+
<p className="text-sm text-gray-600 dark:text-gray-400">
|
|
559
|
+
{framework.description}
|
|
560
|
+
</p>
|
|
561
|
+
</div>
|
|
562
|
+
{config.framework === framework.value && (
|
|
563
|
+
<div className="text-blue-600 dark:text-blue-400">✓</div>
|
|
564
|
+
)}
|
|
565
|
+
</div>
|
|
566
|
+
</button>
|
|
567
|
+
))}
|
|
568
|
+
</div>
|
|
569
|
+
);
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Step 3: Target Selection
|
|
574
|
+
*/
|
|
575
|
+
const StepTarget: React.FC<StepProps> = ({ config, setConfig }) => {
|
|
576
|
+
return (
|
|
577
|
+
<div className="space-y-6">
|
|
578
|
+
<div>
|
|
579
|
+
<label className="block text-sm font-medium text-gray-900 dark:text-white mb-2">
|
|
580
|
+
What is the name of your {config.testType}?
|
|
581
|
+
</label>
|
|
582
|
+
<input
|
|
583
|
+
type="text"
|
|
584
|
+
value={config.targetName}
|
|
585
|
+
onChange={(e) => setConfig({ ...config, targetName: e.target.value })}
|
|
586
|
+
placeholder={`e.g., ${config.testType === 'function' ? 'calculateTotal' : config.testType === 'class' ? 'UserManager' : config.testType === 'component' ? 'LoginForm' : 'ValidateInput'}`}
|
|
587
|
+
className="w-full px-4 py-3 text-base bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
588
|
+
/>
|
|
589
|
+
</div>
|
|
590
|
+
|
|
591
|
+
<div>
|
|
592
|
+
<label className="block text-sm font-medium text-gray-900 dark:text-white mb-2">
|
|
593
|
+
Where is this code located?
|
|
594
|
+
</label>
|
|
595
|
+
<input
|
|
596
|
+
type="text"
|
|
597
|
+
value={config.targetPath}
|
|
598
|
+
onChange={(e) => setConfig({ ...config, targetPath: e.target.value })}
|
|
599
|
+
placeholder="e.g., src/utils/math.ts"
|
|
600
|
+
className="w-full px-4 py-3 text-base bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
601
|
+
/>
|
|
602
|
+
<p className="mt-2 text-xs text-gray-500 dark:text-gray-400">
|
|
603
|
+
Enter the file path relative to your project root
|
|
604
|
+
</p>
|
|
605
|
+
</div>
|
|
606
|
+
|
|
607
|
+
<div>
|
|
608
|
+
<label className="block text-sm font-medium text-gray-900 dark:text-white mb-2">
|
|
609
|
+
Where should the test file be saved?
|
|
610
|
+
</label>
|
|
611
|
+
<input
|
|
612
|
+
type="text"
|
|
613
|
+
value={config.outputPath}
|
|
614
|
+
onChange={(e) => setConfig({ ...config, outputPath: e.target.value })}
|
|
615
|
+
placeholder={`e.g., test/${config.targetPath.replace(/\.(ts|js|tsx|jsx)$/, '.test.$1')}`}
|
|
616
|
+
className="w-full px-4 py-3 text-base bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
617
|
+
/>
|
|
618
|
+
</div>
|
|
619
|
+
</div>
|
|
620
|
+
);
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Step 4: Scenarios
|
|
625
|
+
*/
|
|
626
|
+
const StepScenarios: React.FC<StepProps> = ({ config, setConfig }) => {
|
|
627
|
+
const addScenario = (type: TestScenario['type']) => {
|
|
628
|
+
const newScenario: TestScenario = {
|
|
629
|
+
id: `scenario-${Date.now()}`,
|
|
630
|
+
type,
|
|
631
|
+
description: '',
|
|
632
|
+
inputs: {},
|
|
633
|
+
expectedOutput: '',
|
|
634
|
+
enabled: true,
|
|
635
|
+
};
|
|
636
|
+
setConfig({ ...config, scenarios: [...config.scenarios, newScenario] });
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
const updateScenario = (id: string, updates: Partial<TestScenario>) => {
|
|
640
|
+
setConfig({
|
|
641
|
+
...config,
|
|
642
|
+
scenarios: config.scenarios.map((s) =>
|
|
643
|
+
s.id === id ? { ...s, ...updates } : s
|
|
644
|
+
),
|
|
645
|
+
});
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
const removeScenario = (id: string) => {
|
|
649
|
+
setConfig({
|
|
650
|
+
...config,
|
|
651
|
+
scenarios: config.scenarios.filter((s) => s.id !== id),
|
|
652
|
+
});
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
const scenarioTypes = [
|
|
656
|
+
{ type: 'happy-path' as const, label: 'Happy Path', icon: '😊', color: 'green' },
|
|
657
|
+
{ type: 'edge-case' as const, label: 'Edge Case', icon: '⚠️', color: 'yellow' },
|
|
658
|
+
{ type: 'error-handling' as const, label: 'Error', icon: '❌', color: 'red' },
|
|
659
|
+
];
|
|
660
|
+
|
|
661
|
+
return (
|
|
662
|
+
<div className="space-y-6">
|
|
663
|
+
<div className="bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4">
|
|
664
|
+
<h4 className="text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2">
|
|
665
|
+
💡 What are test scenarios?
|
|
666
|
+
</h4>
|
|
667
|
+
<ul className="text-xs text-blue-800 dark:text-blue-200 space-y-1">
|
|
668
|
+
<li><strong>Happy Path:</strong> Test when everything works perfectly</li>
|
|
669
|
+
<li><strong>Edge Case:</strong> Test unusual but valid situations</li>
|
|
670
|
+
<li><strong>Error:</strong> Test how code handles problems</li>
|
|
671
|
+
</ul>
|
|
672
|
+
</div>
|
|
673
|
+
|
|
674
|
+
{/* Add scenario buttons */}
|
|
675
|
+
<div className="flex flex-wrap gap-2">
|
|
676
|
+
{scenarioTypes.map((st) => (
|
|
677
|
+
<button
|
|
678
|
+
key={st.type}
|
|
679
|
+
onClick={() => addScenario(st.type)}
|
|
680
|
+
className={`px-4 py-2 text-sm rounded-lg border-2 hover:border-${st.color}-500 transition-colors ${
|
|
681
|
+
st.color === 'green'
|
|
682
|
+
? 'border-green-300 dark:border-green-700 text-green-700 dark:text-green-300'
|
|
683
|
+
: st.color === 'yellow'
|
|
684
|
+
? 'border-yellow-300 dark:border-yellow-700 text-yellow-700 dark:text-yellow-300'
|
|
685
|
+
: 'border-red-300 dark:border-red-700 text-red-700 dark:text-red-300'
|
|
686
|
+
}`}
|
|
687
|
+
>
|
|
688
|
+
{st.icon} Add {st.label}
|
|
689
|
+
</button>
|
|
690
|
+
))}
|
|
691
|
+
</div>
|
|
692
|
+
|
|
693
|
+
{/* Scenario list */}
|
|
694
|
+
{config.scenarios.length === 0 ? (
|
|
695
|
+
<div className="text-center py-8 text-gray-500 dark:text-gray-400">
|
|
696
|
+
Click a button above to add your first test scenario
|
|
697
|
+
</div>
|
|
698
|
+
) : (
|
|
699
|
+
<div className="space-y-4">
|
|
700
|
+
{config.scenarios.map((scenario) => {
|
|
701
|
+
const st = scenarioTypes.find((t) => t.type === scenario.type)!;
|
|
702
|
+
return (
|
|
703
|
+
<div
|
|
704
|
+
key={scenario.id}
|
|
705
|
+
className="p-4 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800"
|
|
706
|
+
>
|
|
707
|
+
<div className="flex items-center justify-between mb-3">
|
|
708
|
+
<div className="flex items-center gap-2">
|
|
709
|
+
<span className="text-2xl">{st.icon}</span>
|
|
710
|
+
<span className="text-sm font-semibold text-gray-900 dark:text-white">
|
|
711
|
+
{st.label}
|
|
712
|
+
</span>
|
|
713
|
+
</div>
|
|
714
|
+
<button
|
|
715
|
+
onClick={() => removeScenario(scenario.id)}
|
|
716
|
+
className="text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300"
|
|
717
|
+
aria-label="Remove scenario"
|
|
718
|
+
>
|
|
719
|
+
✗
|
|
720
|
+
</button>
|
|
721
|
+
</div>
|
|
722
|
+
|
|
723
|
+
<div className="space-y-3">
|
|
724
|
+
<div>
|
|
725
|
+
<label className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
726
|
+
Description
|
|
727
|
+
</label>
|
|
728
|
+
<input
|
|
729
|
+
type="text"
|
|
730
|
+
value={scenario.description}
|
|
731
|
+
onChange={(e) =>
|
|
732
|
+
updateScenario(scenario.id, { description: e.target.value })
|
|
733
|
+
}
|
|
734
|
+
placeholder="Describe what this test checks"
|
|
735
|
+
className="w-full px-3 py-2 text-sm bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
736
|
+
/>
|
|
737
|
+
</div>
|
|
738
|
+
|
|
739
|
+
<div>
|
|
740
|
+
<label className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
741
|
+
Expected Result
|
|
742
|
+
</label>
|
|
743
|
+
<input
|
|
744
|
+
type="text"
|
|
745
|
+
value={scenario.expectedOutput}
|
|
746
|
+
onChange={(e) =>
|
|
747
|
+
updateScenario(scenario.id, { expectedOutput: e.target.value })
|
|
748
|
+
}
|
|
749
|
+
placeholder="What should happen?"
|
|
750
|
+
className="w-full px-3 py-2 text-sm bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
751
|
+
/>
|
|
752
|
+
</div>
|
|
753
|
+
</div>
|
|
754
|
+
</div>
|
|
755
|
+
);
|
|
756
|
+
})}
|
|
757
|
+
</div>
|
|
758
|
+
)}
|
|
759
|
+
</div>
|
|
760
|
+
);
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Step 5: Assertions
|
|
765
|
+
*/
|
|
766
|
+
const StepAssertions: React.FC<StepProps> = ({ config, setConfig }) => {
|
|
767
|
+
const assertionTypes: { value: Assertion['type']; label: string; description: string }[] = [
|
|
768
|
+
{ value: 'equals', label: 'Equals', description: 'Result matches exactly' },
|
|
769
|
+
{ value: 'contains', label: 'Contains', description: 'Result includes something' },
|
|
770
|
+
{ value: 'throws', label: 'Throws Error', description: 'Code throws an error' },
|
|
771
|
+
{ value: 'truthy', label: 'Is Truthy', description: 'Result is true-like' },
|
|
772
|
+
{ value: 'falsy', label: 'Is Falsy', description: 'Result is false-like' },
|
|
773
|
+
{ value: 'greater-than', label: 'Greater Than', description: 'Result is larger' },
|
|
774
|
+
{ value: 'less-than', label: 'Less Than', description: 'Result is smaller' },
|
|
775
|
+
];
|
|
776
|
+
|
|
777
|
+
const addAssertion = () => {
|
|
778
|
+
const newAssertion: Assertion = {
|
|
779
|
+
id: `assertion-${Date.now()}`,
|
|
780
|
+
type: 'equals',
|
|
781
|
+
value: '',
|
|
782
|
+
description: '',
|
|
783
|
+
};
|
|
784
|
+
setConfig({ ...config, assertions: [...config.assertions, newAssertion] });
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
const updateAssertion = (id: string, updates: Partial<Assertion>) => {
|
|
788
|
+
setConfig({
|
|
789
|
+
...config,
|
|
790
|
+
assertions: config.assertions.map((a) =>
|
|
791
|
+
a.id === id ? { ...a, ...updates } : a
|
|
792
|
+
),
|
|
793
|
+
});
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
const removeAssertion = (id: string) => {
|
|
797
|
+
setConfig({
|
|
798
|
+
...config,
|
|
799
|
+
assertions: config.assertions.filter((a) => a.id !== id),
|
|
800
|
+
});
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
return (
|
|
804
|
+
<div className="space-y-6">
|
|
805
|
+
<div className="bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4">
|
|
806
|
+
<h4 className="text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2">
|
|
807
|
+
💡 What are assertions?
|
|
808
|
+
</h4>
|
|
809
|
+
<p className="text-xs text-blue-800 dark:text-blue-200">
|
|
810
|
+
Assertions are checks that verify your code behaves correctly. They compare the actual result with what you expect.
|
|
811
|
+
</p>
|
|
812
|
+
</div>
|
|
813
|
+
|
|
814
|
+
<button
|
|
815
|
+
onClick={addAssertion}
|
|
816
|
+
className="w-full px-4 py-3 text-sm border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg hover:border-blue-500 dark:hover:border-blue-400 text-gray-700 dark:text-gray-300 transition-colors"
|
|
817
|
+
>
|
|
818
|
+
+ Add Assertion
|
|
819
|
+
</button>
|
|
820
|
+
|
|
821
|
+
{config.assertions.length === 0 ? (
|
|
822
|
+
<div className="text-center py-8 text-gray-500 dark:text-gray-400">
|
|
823
|
+
Click above to add your first assertion
|
|
824
|
+
</div>
|
|
825
|
+
) : (
|
|
826
|
+
<div className="space-y-4">
|
|
827
|
+
{config.assertions.map((assertion) => (
|
|
828
|
+
<div
|
|
829
|
+
key={assertion.id}
|
|
830
|
+
className="p-4 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800"
|
|
831
|
+
>
|
|
832
|
+
<div className="flex items-center justify-between mb-3">
|
|
833
|
+
<span className="text-sm font-semibold text-gray-900 dark:text-white">
|
|
834
|
+
Assertion
|
|
835
|
+
</span>
|
|
836
|
+
<button
|
|
837
|
+
onClick={() => removeAssertion(assertion.id)}
|
|
838
|
+
className="text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300"
|
|
839
|
+
aria-label="Remove assertion"
|
|
840
|
+
>
|
|
841
|
+
✗
|
|
842
|
+
</button>
|
|
843
|
+
</div>
|
|
844
|
+
|
|
845
|
+
<div className="space-y-3">
|
|
846
|
+
<div>
|
|
847
|
+
<label className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
848
|
+
Assertion Type
|
|
849
|
+
</label>
|
|
850
|
+
<select
|
|
851
|
+
value={assertion.type}
|
|
852
|
+
onChange={(e) =>
|
|
853
|
+
updateAssertion(assertion.id, { type: e.target.value as Assertion['type'] })
|
|
854
|
+
}
|
|
855
|
+
className="w-full px-3 py-2 text-sm bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
856
|
+
>
|
|
857
|
+
{assertionTypes.map((at) => (
|
|
858
|
+
<option key={at.value} value={at.value}>
|
|
859
|
+
{at.label} - {at.description}
|
|
860
|
+
</option>
|
|
861
|
+
))}
|
|
862
|
+
</select>
|
|
863
|
+
</div>
|
|
864
|
+
|
|
865
|
+
{assertion.type !== 'truthy' && assertion.type !== 'falsy' && (
|
|
866
|
+
<div>
|
|
867
|
+
<label className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
868
|
+
Expected Value
|
|
869
|
+
</label>
|
|
870
|
+
<input
|
|
871
|
+
type="text"
|
|
872
|
+
value={assertion.value}
|
|
873
|
+
onChange={(e) =>
|
|
874
|
+
updateAssertion(assertion.id, { value: e.target.value })
|
|
875
|
+
}
|
|
876
|
+
placeholder="Enter expected value"
|
|
877
|
+
className="w-full px-3 py-2 text-sm bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
878
|
+
/>
|
|
879
|
+
</div>
|
|
880
|
+
)}
|
|
881
|
+
|
|
882
|
+
<div>
|
|
883
|
+
<label className="block text-xs font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
884
|
+
Description (optional)
|
|
885
|
+
</label>
|
|
886
|
+
<input
|
|
887
|
+
type="text"
|
|
888
|
+
value={assertion.description}
|
|
889
|
+
onChange={(e) =>
|
|
890
|
+
updateAssertion(assertion.id, { description: e.target.value })
|
|
891
|
+
}
|
|
892
|
+
placeholder="Explain this check"
|
|
893
|
+
className="w-full px-3 py-2 text-sm bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
894
|
+
/>
|
|
895
|
+
</div>
|
|
896
|
+
</div>
|
|
897
|
+
</div>
|
|
898
|
+
))}
|
|
899
|
+
</div>
|
|
900
|
+
)}
|
|
901
|
+
</div>
|
|
902
|
+
);
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Step 6: Review
|
|
907
|
+
*/
|
|
908
|
+
const StepReview: React.FC<{ config: TestConfiguration }> = ({ config }) => {
|
|
909
|
+
return (
|
|
910
|
+
<div className="space-y-6">
|
|
911
|
+
<div className="bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-4">
|
|
912
|
+
<h4 className="text-sm font-semibold text-green-900 dark:text-green-100 mb-2">
|
|
913
|
+
✓ Ready to Generate Test
|
|
914
|
+
</h4>
|
|
915
|
+
<p className="text-xs text-green-800 dark:text-green-200">
|
|
916
|
+
Review your configuration below. Click "Generate Test" to create your test file.
|
|
917
|
+
</p>
|
|
918
|
+
</div>
|
|
919
|
+
|
|
920
|
+
{/* Configuration summary */}
|
|
921
|
+
<div className="space-y-4">
|
|
922
|
+
<div>
|
|
923
|
+
<h4 className="text-sm font-semibold text-gray-900 dark:text-white mb-2">
|
|
924
|
+
Test Configuration
|
|
925
|
+
</h4>
|
|
926
|
+
<div className="bg-gray-50 dark:bg-gray-800 rounded-lg p-4 space-y-2 text-sm">
|
|
927
|
+
<div className="flex justify-between">
|
|
928
|
+
<span className="text-gray-600 dark:text-gray-400">Type:</span>
|
|
929
|
+
<span className="font-medium text-gray-900 dark:text-white">{config.testType}</span>
|
|
930
|
+
</div>
|
|
931
|
+
<div className="flex justify-between">
|
|
932
|
+
<span className="text-gray-600 dark:text-gray-400">Framework:</span>
|
|
933
|
+
<span className="font-medium text-gray-900 dark:text-white">{config.framework}</span>
|
|
934
|
+
</div>
|
|
935
|
+
<div className="flex justify-between">
|
|
936
|
+
<span className="text-gray-600 dark:text-gray-400">Target:</span>
|
|
937
|
+
<span className="font-medium text-gray-900 dark:text-white">{config.targetName}</span>
|
|
938
|
+
</div>
|
|
939
|
+
<div className="flex justify-between">
|
|
940
|
+
<span className="text-gray-600 dark:text-gray-400">Source File:</span>
|
|
941
|
+
<span className="font-mono text-xs text-gray-900 dark:text-white">{config.targetPath}</span>
|
|
942
|
+
</div>
|
|
943
|
+
<div className="flex justify-between">
|
|
944
|
+
<span className="text-gray-600 dark:text-gray-400">Output File:</span>
|
|
945
|
+
<span className="font-mono text-xs text-gray-900 dark:text-white">{config.outputPath}</span>
|
|
946
|
+
</div>
|
|
947
|
+
</div>
|
|
948
|
+
</div>
|
|
949
|
+
|
|
950
|
+
<div>
|
|
951
|
+
<h4 className="text-sm font-semibold text-gray-900 dark:text-white mb-2">
|
|
952
|
+
Test Scenarios ({config.scenarios.length})
|
|
953
|
+
</h4>
|
|
954
|
+
<div className="space-y-2">
|
|
955
|
+
{config.scenarios.map((scenario, index) => (
|
|
956
|
+
<div
|
|
957
|
+
key={scenario.id}
|
|
958
|
+
className="bg-gray-50 dark:bg-gray-800 rounded-lg p-3 text-sm"
|
|
959
|
+
>
|
|
960
|
+
<div className="font-medium text-gray-900 dark:text-white mb-1">
|
|
961
|
+
{index + 1}. {scenario.type.replace('-', ' ')}
|
|
962
|
+
</div>
|
|
963
|
+
<div className="text-xs text-gray-600 dark:text-gray-400">
|
|
964
|
+
{scenario.description || 'No description'}
|
|
965
|
+
</div>
|
|
966
|
+
</div>
|
|
967
|
+
))}
|
|
968
|
+
</div>
|
|
969
|
+
</div>
|
|
970
|
+
|
|
971
|
+
<div>
|
|
972
|
+
<h4 className="text-sm font-semibold text-gray-900 dark:text-white mb-2">
|
|
973
|
+
Assertions ({config.assertions.length})
|
|
974
|
+
</h4>
|
|
975
|
+
<div className="space-y-2">
|
|
976
|
+
{config.assertions.map((assertion, index) => (
|
|
977
|
+
<div
|
|
978
|
+
key={assertion.id}
|
|
979
|
+
className="bg-gray-50 dark:bg-gray-800 rounded-lg p-3 text-sm"
|
|
980
|
+
>
|
|
981
|
+
<div className="font-medium text-gray-900 dark:text-white mb-1">
|
|
982
|
+
{index + 1}. {assertion.type}
|
|
983
|
+
</div>
|
|
984
|
+
{assertion.value && (
|
|
985
|
+
<div className="text-xs text-gray-600 dark:text-gray-400">
|
|
986
|
+
Expected: {assertion.value}
|
|
987
|
+
</div>
|
|
988
|
+
)}
|
|
989
|
+
</div>
|
|
990
|
+
))}
|
|
991
|
+
</div>
|
|
992
|
+
</div>
|
|
993
|
+
</div>
|
|
994
|
+
</div>
|
|
995
|
+
);
|
|
996
|
+
};
|
|
997
|
+
|
|
998
|
+
TestStepWizard.displayName = 'TestStepWizard';
|
|
999
|
+
|
|
1000
|
+
export default TestStepWizard;
|