agentvibes 3.0.0 → 3.2.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/.bmad/_cfg/agent-manifest.csv +9 -9
- package/.bmad/_cfg/agent-voice-map.csv +11 -11
- package/.bmad/_cfg/agents/bmm-quick-flow-solo-dev.customize.yaml +42 -0
- package/.bmad/_cfg/files-manifest.csv +286 -242
- package/.bmad/_cfg/ides/claude-code.yaml +1 -1
- package/.bmad/_cfg/manifest.yaml +5 -3
- package/.bmad/_cfg/task-manifest.csv +1 -0
- package/.bmad/_cfg/workflow-manifest.csv +37 -38
- package/.bmad/bmm/agents/analyst.md +40 -41
- package/.bmad/bmm/agents/{frame-expert.md → analyst.md.bak} +23 -16
- package/.bmad/bmm/agents/architect.md +34 -42
- package/.bmad/bmm/agents/dev.md +38 -34
- package/.bmad/bmm/agents/pm.md +34 -46
- package/.bmad/bmm/agents/quick-flow-solo-dev.md +64 -0
- package/.bmad/bmm/agents/sm.md +47 -53
- package/.bmad/bmm/agents/tea.md +41 -42
- package/.bmad/bmm/agents/tech-writer.md +37 -39
- package/.bmad/bmm/agents/ux-designer.md +42 -41
- package/.bmad/bmm/config.yaml +7 -5
- package/.bmad/bmm/data/README.md +29 -0
- package/.bmad/bmm/data/project-context-template.md +40 -0
- package/.bmad/bmm/docs/README.md +48 -10
- package/.bmad/bmm/docs/agents-guide.md +80 -53
- package/.bmad/bmm/docs/bmad-quick-flow.md +528 -0
- package/.bmad/bmm/docs/brownfield-guide.md +25 -39
- package/.bmad/bmm/docs/enterprise-agentic-development.md +3 -3
- package/.bmad/bmm/docs/faq.md +6 -39
- package/.bmad/bmm/docs/glossary.md +12 -25
- package/.bmad/bmm/docs/images/README.md +37 -0
- package/.bmad/bmm/docs/images/workflow-method-greenfield.excalidraw +5034 -0
- package/.bmad/bmm/docs/images/workflow-method-greenfield.svg +4 -0
- package/.bmad/bmm/docs/quick-flow-solo-dev.md +337 -0
- package/.bmad/bmm/docs/quick-spec-flow.md +5 -5
- package/.bmad/bmm/docs/quick-start.md +15 -25
- package/.bmad/bmm/docs/scale-adaptive-system.md +11 -5
- package/.bmad/bmm/docs/test-architecture.md +90 -24
- package/.bmad/bmm/docs/troubleshooting.md +680 -0
- package/.bmad/bmm/docs/workflow-document-project-reference.md +1 -1
- package/.bmad/bmm/docs/workflows-analysis.md +36 -140
- package/.bmad/bmm/docs/workflows-implementation.md +182 -157
- package/.bmad/bmm/docs/workflows-planning.md +51 -212
- package/.bmad/bmm/docs/workflows-solutioning.md +26 -71
- package/.bmad/bmm/tasks/daily-standup.xml +85 -0
- package/.bmad/bmm/teams/default-party.csv +15 -14
- package/.bmad/bmm/teams/team-fullstack.yaml +0 -1
- package/.bmad/bmm/testarch/knowledge/api-request.md +303 -0
- package/.bmad/bmm/testarch/knowledge/auth-session.md +356 -0
- package/.bmad/bmm/testarch/knowledge/burn-in.md +273 -0
- package/.bmad/bmm/testarch/knowledge/ci-burn-in.md +1 -1
- package/.bmad/bmm/testarch/knowledge/file-utils.md +260 -0
- package/.bmad/bmm/testarch/knowledge/fixtures-composition.md +382 -0
- package/.bmad/bmm/testarch/knowledge/intercept-network-call.md +280 -0
- package/.bmad/bmm/testarch/knowledge/log.md +294 -0
- package/.bmad/bmm/testarch/knowledge/network-error-monitor.md +272 -0
- package/.bmad/bmm/testarch/knowledge/network-recorder.md +265 -0
- package/.bmad/bmm/testarch/knowledge/overview.md +284 -0
- package/.bmad/bmm/testarch/knowledge/recurse.md +296 -0
- package/.bmad/bmm/testarch/tea-index.csv +11 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/product-brief.template.md +8 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/steps/step-01-init.md +192 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/steps/step-01b-continue.md +167 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/steps/step-02-vision.md +203 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/steps/step-03-users.md +206 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/steps/step-04-metrics.md +209 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/steps/step-05-scope.md +223 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/steps/step-06-complete.md +199 -0
- package/.bmad/bmm/workflows/1-analysis/product-brief/workflow.md +58 -0
- package/.bmad/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +136 -0
- package/.bmad/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +228 -0
- package/.bmad/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +237 -0
- package/.bmad/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +205 -0
- package/.bmad/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +233 -0
- package/.bmad/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +442 -0
- package/.bmad/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +181 -0
- package/.bmad/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +236 -0
- package/.bmad/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +199 -0
- package/.bmad/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +248 -0
- package/.bmad/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +258 -0
- package/.bmad/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +176 -0
- package/.bmad/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +474 -0
- package/.bmad/bmm/workflows/1-analysis/research/research.template.md +15 -0
- package/.bmad/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +136 -0
- package/.bmad/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +238 -0
- package/.bmad/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +247 -0
- package/.bmad/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +201 -0
- package/.bmad/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +238 -0
- package/.bmad/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +485 -0
- package/.bmad/bmm/workflows/1-analysis/research/workflow.md +204 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +159 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01b-continue.md +126 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +209 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +215 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +218 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +233 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +251 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +253 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +223 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +223 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +240 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +247 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +236 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +263 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +226 -0
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +6 -138
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +59 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/prd-template.md +12 -200
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +243 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +165 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +420 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +289 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +290 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +270 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +261 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +257 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +298 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +269 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +293 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +223 -0
- package/.bmad/bmm/workflows/2-plan-workflows/prd/workflow.md +61 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/architecture-decision-template.md +13 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/data/domain-complexity.csv +11 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/data/project-types.csv +7 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-01-init.md +194 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-01b-continue.md +163 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-02-context.md +223 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-03-starter.md +330 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-04-decisions.md +317 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-05-patterns.md +358 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-06-structure.md +378 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-07-validation.md +358 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/steps/step-08-complete.md +351 -0
- package/.bmad/bmm/workflows/3-solutioning/architecture/workflow.md +49 -0
- package/.bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +258 -0
- package/.bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +232 -0
- package/.bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +271 -0
- package/.bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +144 -0
- package/.bmad/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +57 -0
- package/.bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +58 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/steps/step-01-document-discovery.md +189 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/steps/step-02-prd-analysis.md +177 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/steps/step-03-epic-coverage-validation.md +178 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/steps/step-04-ux-alignment.md +138 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/steps/step-05-epic-quality-review.md +251 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/steps/step-06-final-assessment.md +132 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/templates/readiness-report-template.md +4 -0
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/workflow.md +54 -0
- package/.bmad/bmm/workflows/4-implementation/code-review/checklist.md +2 -1
- package/.bmad/bmm/workflows/4-implementation/code-review/instructions.xml +224 -0
- package/.bmad/bmm/workflows/4-implementation/code-review/workflow.yaml +4 -11
- package/.bmad/bmm/workflows/4-implementation/create-story/checklist.md +332 -214
- package/.bmad/bmm/workflows/4-implementation/create-story/instructions.xml +354 -0
- package/.bmad/bmm/workflows/4-implementation/create-story/workflow.yaml +21 -34
- package/.bmad/bmm/workflows/4-implementation/dev-story/checklist.md +65 -23
- package/.bmad/bmm/workflows/4-implementation/dev-story/instructions.xml +406 -0
- package/.bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml +6 -37
- package/.bmad/bmm/workflows/4-implementation/retrospective/instructions.md +3 -3
- package/.bmad/bmm/workflows/4-implementation/sprint-planning/instructions.md +19 -21
- package/.bmad/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +11 -10
- package/.bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +2 -0
- package/.bmad/bmm/workflows/4-implementation/sprint-status/instructions.md +174 -0
- package/.bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml +34 -0
- package/.bmad/bmm/workflows/bmad-quick-flow/create-tech-spec/instructions.md +115 -0
- package/.bmad/bmm/workflows/bmad-quick-flow/create-tech-spec/workflow.yaml +25 -0
- package/.bmad/bmm/workflows/bmad-quick-flow/quick-dev/checklist.md +25 -0
- package/.bmad/bmm/workflows/bmad-quick-flow/quick-dev/instructions.md +202 -0
- package/.bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +32 -0
- package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-dataflow/instructions.md +7 -8
- package/.bmad/bmm/workflows/diagrams/create-dataflow/workflow.yaml +26 -0
- package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-diagram/instructions.md +9 -10
- package/.bmad/bmm/workflows/diagrams/create-diagram/workflow.yaml +26 -0
- package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-flowchart/instructions.md +4 -5
- package/.bmad/bmm/workflows/diagrams/create-flowchart/workflow.yaml +26 -0
- package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-wireframe/instructions.md +3 -3
- package/.bmad/bmm/workflows/diagrams/create-wireframe/workflow.yaml +26 -0
- package/.bmad/bmm/workflows/document-project/instructions.md +1 -1
- package/.bmad/bmm/workflows/document-project/workflows/deep-dive-instructions.md +2 -2
- package/.bmad/bmm/workflows/generate-project-context/project-context-template.md +20 -0
- package/.bmad/bmm/workflows/generate-project-context/steps/step-01-discover.md +193 -0
- package/.bmad/bmm/workflows/generate-project-context/steps/step-02-generate.md +317 -0
- package/.bmad/bmm/workflows/generate-project-context/steps/step-03-complete.md +277 -0
- package/.bmad/bmm/workflows/generate-project-context/workflow.md +48 -0
- package/.bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +1 -1
- package/.bmad/bmm/workflows/testarch/atdd/instructions.md +23 -3
- package/.bmad/bmm/workflows/testarch/automate/instructions.md +23 -2
- package/.bmad/bmm/workflows/testarch/ci/checklist.md +1 -1
- package/.bmad/bmm/workflows/testarch/ci/github-actions-template.yaml +36 -3
- package/.bmad/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +25 -4
- package/.bmad/bmm/workflows/testarch/ci/instructions.md +20 -3
- package/.bmad/bmm/workflows/testarch/framework/instructions.md +27 -1
- package/.bmad/bmm/workflows/testarch/test-design/instructions.md +8 -2
- package/.bmad/bmm/workflows/testarch/test-review/instructions.md +29 -9
- package/.bmad/bmm/workflows/workflow-status/init/instructions.md +66 -54
- package/.bmad/bmm/workflows/workflow-status/instructions.md +11 -4
- package/.bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +22 -38
- package/.bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +6 -22
- package/.bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml +6 -22
- package/.bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml +6 -23
- package/.bmad/core/agents/bmad-master.md +12 -17
- package/.bmad/core/agents/bmad-web-orchestrator.agent.xml +1 -1
- package/.bmad/core/config.yaml +11 -0
- package/.bmad/core/resources/excalidraw/README.md +160 -0
- package/.bmad/core/resources/excalidraw/library-loader.md +50 -0
- package/.bmad/core/tasks/advanced-elicitation-methods.csv +51 -21
- package/.bmad/core/tasks/advanced-elicitation.xml +18 -8
- package/.bmad/core/tasks/workflow.xml +36 -71
- package/.bmad/core/workflows/brainstorming/brain-methods.csv +62 -36
- package/.bmad/core/workflows/brainstorming/steps/step-01-session-setup.md +196 -0
- package/.bmad/core/workflows/brainstorming/steps/step-01b-continue.md +121 -0
- package/.bmad/core/workflows/brainstorming/steps/step-02a-user-selected.md +224 -0
- package/.bmad/core/workflows/brainstorming/steps/step-02b-ai-recommended.md +236 -0
- package/.bmad/core/workflows/brainstorming/steps/step-02c-random-selection.md +208 -0
- package/.bmad/core/workflows/brainstorming/steps/step-02d-progressive-flow.md +263 -0
- package/.bmad/core/workflows/brainstorming/steps/step-03-technique-execution.md +339 -0
- package/.bmad/core/workflows/brainstorming/steps/step-04-idea-organization.md +302 -0
- package/.bmad/core/workflows/brainstorming/template.md +13 -104
- package/.bmad/core/workflows/brainstorming/workflow.md +51 -0
- package/.bmad/core/workflows/party-mode/instructions.md.bak +205 -0
- package/.bmad/core/workflows/party-mode/steps/step-01-agent-loading.md +140 -0
- package/.bmad/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +205 -0
- package/.bmad/core/workflows/party-mode/steps/step-03-graceful-exit.md +158 -0
- package/.bmad/core/workflows/party-mode/workflow.md +225 -0
- package/.claude/commands/bmad/bmm/agents/{frame-expert.md → quick-flow-solo-dev.md} +3 -3
- package/.claude/commands/bmad/bmm/workflows/check-implementation-readiness.md +5 -0
- package/.claude/commands/bmad/bmm/workflows/code-review.md +1 -1
- package/.claude/commands/bmad/bmm/workflows/create-architecture.md +5 -0
- package/.claude/commands/bmad/bmm/workflows/create-epics-stories.md +5 -0
- package/.claude/commands/bmad/bmm/workflows/{create-dataflow.md → create-excalidraw-dataflow.md} +2 -2
- package/.claude/commands/bmad/bmm/workflows/{create-diagram.md → create-excalidraw-diagram.md} +2 -2
- package/.claude/commands/bmad/bmm/workflows/{create-flowchart.md → create-excalidraw-flowchart.md} +2 -2
- package/.claude/commands/bmad/bmm/workflows/{create-wireframe.md → create-excalidraw-wireframe.md} +2 -2
- package/.claude/commands/bmad/bmm/workflows/create-prd.md +5 -0
- package/.claude/commands/bmad/bmm/workflows/create-product-brief.md +5 -0
- package/.claude/commands/bmad/bmm/workflows/create-story.md +1 -1
- package/.claude/commands/bmad/bmm/workflows/create-tech-spec.md +13 -0
- package/.claude/commands/bmad/bmm/workflows/create-ux-design.md +2 -10
- package/.claude/commands/bmad/bmm/workflows/generate-project-context.md +5 -0
- package/.claude/commands/bmad/bmm/workflows/{domain-research.md → quick-dev.md} +3 -3
- package/.claude/commands/bmad/bmm/workflows/research.md +2 -10
- package/.claude/commands/bmad/bmm/workflows/{story-context.md → sprint-status.md} +3 -3
- package/.claude/commands/bmad/bmm/workflows/testarch-atdd.md +13 -0
- package/.claude/commands/bmad/bmm/workflows/testarch-automate.md +13 -0
- package/.claude/commands/bmad/bmm/workflows/testarch-ci.md +13 -0
- package/.claude/commands/bmad/bmm/workflows/testarch-framework.md +13 -0
- package/.claude/commands/bmad/bmm/workflows/testarch-nfr.md +13 -0
- package/.claude/commands/bmad/bmm/workflows/{prd.md → testarch-test-design.md} +3 -3
- package/.claude/commands/bmad/bmm/workflows/testarch-test-review.md +13 -0
- package/.claude/commands/bmad/bmm/workflows/testarch-trace.md +13 -0
- package/.claude/commands/bmad/core/workflows/brainstorming-session.md +5 -0
- package/.claude/config/tts-speech-rate.txt +1 -0
- package/.claude/github-star-reminder.txt +1 -1
- package/.claude/hooks/audio-processor.sh +12 -3
- package/.claude/hooks/piper-installer.sh +17 -0
- package/.claude/hooks/play-tts-piper.sh +4 -0
- package/.claude/hooks/termux-installer.sh +224 -0
- package/.clawdbot/README.md +105 -0
- package/.clawdbot/skill/SKILL.md +432 -0
- package/README.md +167 -11
- package/RELEASE_NOTES.md +255 -249
- package/package.json +4 -2
- package/src/installer.js +75 -21
- package/.bmad/bmm/workflows/1-analysis/brainstorm-project/instructions.md +0 -112
- package/.bmad/bmm/workflows/1-analysis/brainstorm-project/project-context.md +0 -25
- package/.bmad/bmm/workflows/1-analysis/brainstorm-project/workflow.yaml +0 -26
- package/.bmad/bmm/workflows/1-analysis/domain-research/instructions.md +0 -425
- package/.bmad/bmm/workflows/1-analysis/domain-research/template.md +0 -180
- package/.bmad/bmm/workflows/1-analysis/domain-research/workflow.yaml +0 -28
- package/.bmad/bmm/workflows/1-analysis/product-brief/checklist.md +0 -115
- package/.bmad/bmm/workflows/1-analysis/product-brief/instructions.md +0 -524
- package/.bmad/bmm/workflows/1-analysis/product-brief/template.md +0 -181
- package/.bmad/bmm/workflows/1-analysis/product-brief/workflow.yaml +0 -45
- package/.bmad/bmm/workflows/1-analysis/research/checklist-deep-prompt.md +0 -144
- package/.bmad/bmm/workflows/1-analysis/research/checklist-technical.md +0 -249
- package/.bmad/bmm/workflows/1-analysis/research/checklist.md +0 -299
- package/.bmad/bmm/workflows/1-analysis/research/claude-code/injections.yaml +0 -114
- package/.bmad/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +0 -438
- package/.bmad/bmm/workflows/1-analysis/research/instructions-market.md +0 -675
- package/.bmad/bmm/workflows/1-analysis/research/instructions-router.md +0 -134
- package/.bmad/bmm/workflows/1-analysis/research/instructions-technical.md +0 -534
- package/.bmad/bmm/workflows/1-analysis/research/template-deep-prompt.md +0 -94
- package/.bmad/bmm/workflows/1-analysis/research/template-market.md +0 -347
- package/.bmad/bmm/workflows/1-analysis/research/template-technical.md +0 -245
- package/.bmad/bmm/workflows/1-analysis/research/workflow.yaml +0 -44
- package/.bmad/bmm/workflows/2-plan-workflows/create-epics-and-stories/epics-template.md +0 -80
- package/.bmad/bmm/workflows/2-plan-workflows/create-epics-and-stories/instructions.md +0 -616
- package/.bmad/bmm/workflows/2-plan-workflows/create-epics-and-stories/workflow.yaml +0 -53
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/checklist.md +0 -310
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +0 -1308
- package/.bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +0 -61
- package/.bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +0 -346
- package/.bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +0 -703
- package/.bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +0 -52
- package/.bmad/bmm/workflows/2-plan-workflows/tech-spec/checklist.md +0 -217
- package/.bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +0 -74
- package/.bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-generate-stories.md +0 -436
- package/.bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +0 -980
- package/.bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md +0 -181
- package/.bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +0 -90
- package/.bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +0 -58
- package/.bmad/bmm/workflows/3-solutioning/architecture/architecture-patterns.yaml +0 -321
- package/.bmad/bmm/workflows/3-solutioning/architecture/architecture-template.md +0 -103
- package/.bmad/bmm/workflows/3-solutioning/architecture/checklist.md +0 -240
- package/.bmad/bmm/workflows/3-solutioning/architecture/decision-catalog.yaml +0 -222
- package/.bmad/bmm/workflows/3-solutioning/architecture/instructions.md +0 -768
- package/.bmad/bmm/workflows/3-solutioning/architecture/pattern-categories.csv +0 -13
- package/.bmad/bmm/workflows/3-solutioning/architecture/workflow.yaml +0 -55
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/checklist.md +0 -169
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/instructions.md +0 -332
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/template.md +0 -146
- package/.bmad/bmm/workflows/3-solutioning/implementation-readiness/workflow.yaml +0 -62
- package/.bmad/bmm/workflows/4-implementation/code-review/backlog_template.md +0 -12
- package/.bmad/bmm/workflows/4-implementation/code-review/instructions.md +0 -398
- package/.bmad/bmm/workflows/4-implementation/create-story/instructions.md +0 -256
- package/.bmad/bmm/workflows/4-implementation/dev-story/instructions.md +0 -267
- package/.bmad/bmm/workflows/4-implementation/epic-tech-context/checklist.md +0 -17
- package/.bmad/bmm/workflows/4-implementation/epic-tech-context/instructions.md +0 -164
- package/.bmad/bmm/workflows/4-implementation/epic-tech-context/template.md +0 -76
- package/.bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +0 -57
- package/.bmad/bmm/workflows/4-implementation/story-context/checklist.md +0 -16
- package/.bmad/bmm/workflows/4-implementation/story-context/context-template.xml +0 -34
- package/.bmad/bmm/workflows/4-implementation/story-context/instructions.md +0 -209
- package/.bmad/bmm/workflows/4-implementation/story-context/workflow.yaml +0 -61
- package/.bmad/bmm/workflows/4-implementation/story-done/instructions.md +0 -111
- package/.bmad/bmm/workflows/4-implementation/story-done/workflow.yaml +0 -26
- package/.bmad/bmm/workflows/4-implementation/story-ready/instructions.md +0 -117
- package/.bmad/bmm/workflows/4-implementation/story-ready/workflow.yaml +0 -23
- package/.bmad/bmm/workflows/frame-expert/create-dataflow/workflow.yaml +0 -23
- package/.bmad/bmm/workflows/frame-expert/create-diagram/workflow.yaml +0 -24
- package/.bmad/bmm/workflows/frame-expert/create-flowchart/workflow.yaml +0 -27
- package/.bmad/bmm/workflows/frame-expert/create-wireframe/workflow.yaml +0 -23
- package/.bmad/bmm/workflows/workflow-status/paths/game-design.yaml +0 -52
- package/.bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml +0 -58
- package/.bmad/bmm/workflows/workflow-status/paths/quick-flow-greenfield.yaml +0 -47
- package/.claude/commands/bmad/bmm/workflows/architecture.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/brainstorm-project.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/create-epics-and-stories.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/epic-tech-context.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/implementation-readiness.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/product-brief.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/story-done.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/story-ready.md +0 -13
- package/.claude/commands/bmad/bmm/workflows/tech-spec.md +0 -13
- /package/.bmad/bmm/{workflows/techdoc → data}/documentation-standards.md +0 -0
- /package/.bmad/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-library.json +0 -0
- /package/.bmad/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-templates.yaml +0 -0
- /package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-dataflow/checklist.md +0 -0
- /package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-diagram/checklist.md +0 -0
- /package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-flowchart/checklist.md +0 -0
- /package/.bmad/bmm/workflows/{frame-expert → diagrams}/create-wireframe/checklist.md +0 -0
- /package/.bmad/{bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/excalidraw-helpers.md +0 -0
- /package/.bmad/{bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/validate-json-instructions.md +0 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# File Utilities
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
4
|
+
|
|
5
|
+
Read and validate files (CSV, XLSX, PDF, ZIP) with automatic parsing, type-safe results, and download handling. Simplify file operations in Playwright tests with built-in format support and validation helpers.
|
|
6
|
+
|
|
7
|
+
## Rationale
|
|
8
|
+
|
|
9
|
+
Testing file operations in Playwright requires boilerplate:
|
|
10
|
+
|
|
11
|
+
- Manual download handling
|
|
12
|
+
- External parsing libraries for each format
|
|
13
|
+
- No validation helpers
|
|
14
|
+
- Type-unsafe results
|
|
15
|
+
- Repetitive path handling
|
|
16
|
+
|
|
17
|
+
The `file-utils` module provides:
|
|
18
|
+
|
|
19
|
+
- **Auto-parsing**: CSV, XLSX, PDF, ZIP automatically parsed
|
|
20
|
+
- **Download handling**: Single function for UI or API-triggered downloads
|
|
21
|
+
- **Type-safe**: TypeScript interfaces for parsed results
|
|
22
|
+
- **Validation helpers**: Row count, header checks, content validation
|
|
23
|
+
- **Format support**: Multiple sheet support (XLSX), text extraction (PDF), archive extraction (ZIP)
|
|
24
|
+
|
|
25
|
+
## Pattern Examples
|
|
26
|
+
|
|
27
|
+
### Example 1: UI-Triggered CSV Download
|
|
28
|
+
|
|
29
|
+
**Context**: User clicks button, CSV downloads, validate contents.
|
|
30
|
+
|
|
31
|
+
**Implementation**:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { handleDownload, readCSV } from '@seontechnologies/playwright-utils/file-utils';
|
|
35
|
+
import path from 'node:path';
|
|
36
|
+
|
|
37
|
+
const DOWNLOAD_DIR = path.join(__dirname, '../downloads');
|
|
38
|
+
|
|
39
|
+
test('should download and validate CSV', async ({ page }) => {
|
|
40
|
+
const downloadPath = await handleDownload({
|
|
41
|
+
page,
|
|
42
|
+
downloadDir: DOWNLOAD_DIR,
|
|
43
|
+
trigger: () => page.click('[data-testid="export-csv"]'),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const { content } = await readCSV({ filePath: downloadPath });
|
|
47
|
+
|
|
48
|
+
// Validate headers
|
|
49
|
+
expect(content.headers).toEqual(['ID', 'Name', 'Email', 'Role']);
|
|
50
|
+
|
|
51
|
+
// Validate data
|
|
52
|
+
expect(content.data).toHaveLength(10);
|
|
53
|
+
expect(content.data[0]).toMatchObject({
|
|
54
|
+
ID: expect.any(String),
|
|
55
|
+
Name: expect.any(String),
|
|
56
|
+
Email: expect.stringMatching(/@/),
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Key Points**:
|
|
62
|
+
|
|
63
|
+
- `handleDownload` waits for download, returns file path
|
|
64
|
+
- `readCSV` auto-parses to `{ headers, data }`
|
|
65
|
+
- Type-safe access to parsed content
|
|
66
|
+
- Clean up downloads in `afterEach`
|
|
67
|
+
|
|
68
|
+
### Example 2: XLSX with Multiple Sheets
|
|
69
|
+
|
|
70
|
+
**Context**: Excel file with multiple sheets (e.g., Summary, Details, Errors).
|
|
71
|
+
|
|
72
|
+
**Implementation**:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { readXLSX } from '@seontechnologies/playwright-utils/file-utils';
|
|
76
|
+
|
|
77
|
+
test('should read multi-sheet XLSX', async () => {
|
|
78
|
+
const downloadPath = await handleDownload({
|
|
79
|
+
page,
|
|
80
|
+
downloadDir: DOWNLOAD_DIR,
|
|
81
|
+
trigger: () => page.click('[data-testid="export-xlsx"]'),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const { content } = await readXLSX({ filePath: downloadPath });
|
|
85
|
+
|
|
86
|
+
// Access specific sheets
|
|
87
|
+
const summarySheet = content.sheets.find((s) => s.name === 'Summary');
|
|
88
|
+
const detailsSheet = content.sheets.find((s) => s.name === 'Details');
|
|
89
|
+
|
|
90
|
+
// Validate summary
|
|
91
|
+
expect(summarySheet.data).toHaveLength(1);
|
|
92
|
+
expect(summarySheet.data[0].TotalRecords).toBe('150');
|
|
93
|
+
|
|
94
|
+
// Validate details
|
|
95
|
+
expect(detailsSheet.data).toHaveLength(150);
|
|
96
|
+
expect(detailsSheet.headers).toContain('TransactionID');
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Key Points**:
|
|
101
|
+
|
|
102
|
+
- `sheets` array with `name` and `data` properties
|
|
103
|
+
- Access sheets by name
|
|
104
|
+
- Each sheet has its own headers and data
|
|
105
|
+
- Type-safe sheet iteration
|
|
106
|
+
|
|
107
|
+
### Example 3: PDF Text Extraction
|
|
108
|
+
|
|
109
|
+
**Context**: Validate PDF report contains expected content.
|
|
110
|
+
|
|
111
|
+
**Implementation**:
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
import { readPDF } from '@seontechnologies/playwright-utils/file-utils';
|
|
115
|
+
|
|
116
|
+
test('should validate PDF report', async () => {
|
|
117
|
+
const downloadPath = await handleDownload({
|
|
118
|
+
page,
|
|
119
|
+
downloadDir: DOWNLOAD_DIR,
|
|
120
|
+
trigger: () => page.click('[data-testid="download-report"]'),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
const { content } = await readPDF({ filePath: downloadPath });
|
|
124
|
+
|
|
125
|
+
// content.text is extracted text from all pages
|
|
126
|
+
expect(content.text).toContain('Financial Report Q4 2024');
|
|
127
|
+
expect(content.text).toContain('Total Revenue:');
|
|
128
|
+
|
|
129
|
+
// Validate page count
|
|
130
|
+
expect(content.numpages).toBeGreaterThan(10);
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Key Points**:
|
|
135
|
+
|
|
136
|
+
- `content.text` contains all extracted text
|
|
137
|
+
- `content.numpages` for page count
|
|
138
|
+
- PDF parsing handles multi-page documents
|
|
139
|
+
- Search for specific phrases
|
|
140
|
+
|
|
141
|
+
### Example 4: ZIP Archive Validation
|
|
142
|
+
|
|
143
|
+
**Context**: Validate ZIP contains expected files and extract specific file.
|
|
144
|
+
|
|
145
|
+
**Implementation**:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
import { readZIP } from '@seontechnologies/playwright-utils/file-utils';
|
|
149
|
+
|
|
150
|
+
test('should validate ZIP archive', async () => {
|
|
151
|
+
const downloadPath = await handleDownload({
|
|
152
|
+
page,
|
|
153
|
+
downloadDir: DOWNLOAD_DIR,
|
|
154
|
+
trigger: () => page.click('[data-testid="download-backup"]'),
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
const { content } = await readZIP({ filePath: downloadPath });
|
|
158
|
+
|
|
159
|
+
// Check file list
|
|
160
|
+
expect(content.files).toContain('data.csv');
|
|
161
|
+
expect(content.files).toContain('config.json');
|
|
162
|
+
expect(content.files).toContain('readme.txt');
|
|
163
|
+
|
|
164
|
+
// Read specific file from archive
|
|
165
|
+
const configContent = content.zip.readAsText('config.json');
|
|
166
|
+
const config = JSON.parse(configContent);
|
|
167
|
+
|
|
168
|
+
expect(config.version).toBe('2.0');
|
|
169
|
+
});
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Key Points**:
|
|
173
|
+
|
|
174
|
+
- `content.files` lists all files in archive
|
|
175
|
+
- `content.zip.readAsText()` extracts specific files
|
|
176
|
+
- Validate archive structure
|
|
177
|
+
- Read and parse individual files from ZIP
|
|
178
|
+
|
|
179
|
+
### Example 5: API-Triggered Download
|
|
180
|
+
|
|
181
|
+
**Context**: API endpoint returns file download (not UI click).
|
|
182
|
+
|
|
183
|
+
**Implementation**:
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
test('should download via API', async ({ page, request }) => {
|
|
187
|
+
const downloadPath = await handleDownload({
|
|
188
|
+
page,
|
|
189
|
+
downloadDir: DOWNLOAD_DIR,
|
|
190
|
+
trigger: async () => {
|
|
191
|
+
const response = await request.get('/api/export/csv', {
|
|
192
|
+
headers: { Authorization: 'Bearer token' },
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
if (!response.ok()) {
|
|
196
|
+
throw new Error(`Export failed: ${response.status()}`);
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
const { content } = await readCSV({ filePath: downloadPath });
|
|
202
|
+
|
|
203
|
+
expect(content.data).toHaveLength(100);
|
|
204
|
+
});
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Key Points**:
|
|
208
|
+
|
|
209
|
+
- `trigger` can be async API call
|
|
210
|
+
- API must return `Content-Disposition` header
|
|
211
|
+
- Still need `page` for download events
|
|
212
|
+
- Works with authenticated endpoints
|
|
213
|
+
|
|
214
|
+
## Validation Helpers
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// CSV validation
|
|
218
|
+
const { isValid, errors } = await validateCSV({
|
|
219
|
+
filePath: downloadPath,
|
|
220
|
+
expectedRowCount: 10,
|
|
221
|
+
requiredHeaders: ['ID', 'Name', 'Email'],
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
expect(isValid).toBe(true);
|
|
225
|
+
expect(errors).toHaveLength(0);
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Download Cleanup Pattern
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
test.afterEach(async () => {
|
|
232
|
+
// Clean up downloaded files
|
|
233
|
+
await fs.remove(DOWNLOAD_DIR);
|
|
234
|
+
});
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Related Fragments
|
|
238
|
+
|
|
239
|
+
- `overview.md` - Installation and imports
|
|
240
|
+
- `api-request.md` - API-triggered downloads
|
|
241
|
+
- `recurse.md` - Poll for file generation completion
|
|
242
|
+
|
|
243
|
+
## Anti-Patterns
|
|
244
|
+
|
|
245
|
+
**❌ Not cleaning up downloads:**
|
|
246
|
+
|
|
247
|
+
```typescript
|
|
248
|
+
test('creates file', async () => {
|
|
249
|
+
await handleDownload({ ... })
|
|
250
|
+
// File left in downloads folder
|
|
251
|
+
})
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**✅ Clean up after tests:**
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
test.afterEach(async () => {
|
|
258
|
+
await fs.remove(DOWNLOAD_DIR);
|
|
259
|
+
});
|
|
260
|
+
```
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
# Fixtures Composition with mergeTests
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
4
|
+
|
|
5
|
+
Combine multiple Playwright fixtures using `mergeTests` to create a unified test object with all capabilities. Build composable test infrastructure by merging playwright-utils fixtures with custom project fixtures.
|
|
6
|
+
|
|
7
|
+
## Rationale
|
|
8
|
+
|
|
9
|
+
Using fixtures from multiple sources requires combining them:
|
|
10
|
+
|
|
11
|
+
- Importing from multiple fixture files is verbose
|
|
12
|
+
- Name conflicts between fixtures
|
|
13
|
+
- Duplicate fixture definitions
|
|
14
|
+
- No clear single test object
|
|
15
|
+
|
|
16
|
+
Playwright's `mergeTests` provides:
|
|
17
|
+
|
|
18
|
+
- **Single test object**: All fixtures in one import
|
|
19
|
+
- **Conflict resolution**: Handles name collisions automatically
|
|
20
|
+
- **Composition pattern**: Mix utilities, custom fixtures, third-party fixtures
|
|
21
|
+
- **Type safety**: Full TypeScript support for merged fixtures
|
|
22
|
+
- **Maintainability**: One place to manage all fixtures
|
|
23
|
+
|
|
24
|
+
## Pattern Examples
|
|
25
|
+
|
|
26
|
+
### Example 1: Basic Fixture Merging
|
|
27
|
+
|
|
28
|
+
**Context**: Combine multiple playwright-utils fixtures into single test object.
|
|
29
|
+
|
|
30
|
+
**Implementation**:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
// playwright/support/merged-fixtures.ts
|
|
34
|
+
import { mergeTests } from '@playwright/test';
|
|
35
|
+
import { test as apiRequestFixture } from '@seontechnologies/playwright-utils/api-request/fixtures';
|
|
36
|
+
import { test as authFixture } from '@seontechnologies/playwright-utils/auth-session/fixtures';
|
|
37
|
+
import { test as recurseFixture } from '@seontechnologies/playwright-utils/recurse/fixtures';
|
|
38
|
+
|
|
39
|
+
// Merge all fixtures
|
|
40
|
+
export const test = mergeTests(apiRequestFixture, authFixture, recurseFixture);
|
|
41
|
+
|
|
42
|
+
export { expect } from '@playwright/test';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
// In your tests - import from merged fixtures
|
|
47
|
+
import { test, expect } from '../support/merged-fixtures';
|
|
48
|
+
|
|
49
|
+
test('all utilities available', async ({
|
|
50
|
+
apiRequest, // From api-request fixture
|
|
51
|
+
authToken, // From auth fixture
|
|
52
|
+
recurse, // From recurse fixture
|
|
53
|
+
}) => {
|
|
54
|
+
// All fixtures available in single test signature
|
|
55
|
+
const { body } = await apiRequest({
|
|
56
|
+
method: 'GET',
|
|
57
|
+
path: '/api/protected',
|
|
58
|
+
headers: { Authorization: `Bearer ${authToken}` },
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
await recurse(
|
|
62
|
+
() => apiRequest({ method: 'GET', path: `/status/${body.id}` }),
|
|
63
|
+
(res) => res.body.ready === true,
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Key Points**:
|
|
69
|
+
|
|
70
|
+
- Create one `merged-fixtures.ts` per project
|
|
71
|
+
- Import test object from merged fixtures in all test files
|
|
72
|
+
- All utilities available without multiple imports
|
|
73
|
+
- Type-safe access to all fixtures
|
|
74
|
+
|
|
75
|
+
### Example 2: Combining with Custom Fixtures
|
|
76
|
+
|
|
77
|
+
**Context**: Add project-specific fixtures alongside playwright-utils.
|
|
78
|
+
|
|
79
|
+
**Implementation**:
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// playwright/support/custom-fixtures.ts - Your project fixtures
|
|
83
|
+
import { test as base } from '@playwright/test';
|
|
84
|
+
import { createUser } from './factories/user-factory';
|
|
85
|
+
import { seedDatabase } from './helpers/db-seeder';
|
|
86
|
+
|
|
87
|
+
export const test = base.extend({
|
|
88
|
+
// Custom fixture 1: Auto-seeded user
|
|
89
|
+
testUser: async ({ request }, use) => {
|
|
90
|
+
const user = await createUser({ role: 'admin' });
|
|
91
|
+
await seedDatabase('users', [user]);
|
|
92
|
+
await use(user);
|
|
93
|
+
// Cleanup happens automatically
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
// Custom fixture 2: Database helpers
|
|
97
|
+
db: async ({}, use) => {
|
|
98
|
+
await use({
|
|
99
|
+
seed: seedDatabase,
|
|
100
|
+
clear: () => seedDatabase.truncate(),
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// playwright/support/merged-fixtures.ts - Combine everything
|
|
106
|
+
import { mergeTests } from '@playwright/test';
|
|
107
|
+
import { test as apiRequestFixture } from '@seontechnologies/playwright-utils/api-request/fixtures';
|
|
108
|
+
import { test as authFixture } from '@seontechnologies/playwright-utils/auth-session/fixtures';
|
|
109
|
+
import { test as customFixtures } from './custom-fixtures';
|
|
110
|
+
|
|
111
|
+
export const test = mergeTests(
|
|
112
|
+
apiRequestFixture,
|
|
113
|
+
authFixture,
|
|
114
|
+
customFixtures, // Your project fixtures
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
export { expect } from '@playwright/test';
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
// In tests - all fixtures available
|
|
122
|
+
import { test, expect } from '../support/merged-fixtures';
|
|
123
|
+
|
|
124
|
+
test('using mixed fixtures', async ({
|
|
125
|
+
apiRequest, // playwright-utils
|
|
126
|
+
authToken, // playwright-utils
|
|
127
|
+
testUser, // custom
|
|
128
|
+
db, // custom
|
|
129
|
+
}) => {
|
|
130
|
+
// Use playwright-utils
|
|
131
|
+
const { body } = await apiRequest({
|
|
132
|
+
method: 'GET',
|
|
133
|
+
path: `/api/users/${testUser.id}`,
|
|
134
|
+
headers: { Authorization: `Bearer ${authToken}` },
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// Use custom fixture
|
|
138
|
+
await db.clear();
|
|
139
|
+
});
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Key Points**:
|
|
143
|
+
|
|
144
|
+
- Custom fixtures extend `base` test
|
|
145
|
+
- Merge custom with playwright-utils fixtures
|
|
146
|
+
- All available in one test signature
|
|
147
|
+
- Maintainable separation of concerns
|
|
148
|
+
|
|
149
|
+
### Example 3: Full Utility Suite Integration
|
|
150
|
+
|
|
151
|
+
**Context**: Production setup with all core playwright-utils and custom fixtures.
|
|
152
|
+
|
|
153
|
+
**Implementation**:
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
// playwright/support/merged-fixtures.ts
|
|
157
|
+
import { mergeTests } from '@playwright/test';
|
|
158
|
+
|
|
159
|
+
// Playwright utils fixtures
|
|
160
|
+
import { test as apiRequestFixture } from '@seontechnologies/playwright-utils/api-request/fixtures';
|
|
161
|
+
import { test as authFixture } from '@seontechnologies/playwright-utils/auth-session/fixtures';
|
|
162
|
+
import { test as interceptFixture } from '@seontechnologies/playwright-utils/intercept-network-call/fixtures';
|
|
163
|
+
import { test as recurseFixture } from '@seontechnologies/playwright-utils/recurse/fixtures';
|
|
164
|
+
import { test as networkRecorderFixture } from '@seontechnologies/playwright-utils/network-recorder/fixtures';
|
|
165
|
+
|
|
166
|
+
// Custom project fixtures
|
|
167
|
+
import { test as customFixtures } from './custom-fixtures';
|
|
168
|
+
|
|
169
|
+
// Merge everything
|
|
170
|
+
export const test = mergeTests(apiRequestFixture, authFixture, interceptFixture, recurseFixture, networkRecorderFixture, customFixtures);
|
|
171
|
+
|
|
172
|
+
export { expect } from '@playwright/test';
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
// In tests
|
|
177
|
+
import { test, expect } from '../support/merged-fixtures';
|
|
178
|
+
|
|
179
|
+
test('full integration', async ({
|
|
180
|
+
page,
|
|
181
|
+
context,
|
|
182
|
+
apiRequest,
|
|
183
|
+
authToken,
|
|
184
|
+
interceptNetworkCall,
|
|
185
|
+
recurse,
|
|
186
|
+
networkRecorder,
|
|
187
|
+
testUser, // custom
|
|
188
|
+
}) => {
|
|
189
|
+
// All utilities + custom fixtures available
|
|
190
|
+
await networkRecorder.setup(context);
|
|
191
|
+
|
|
192
|
+
const usersCall = interceptNetworkCall({ url: '**/api/users' });
|
|
193
|
+
|
|
194
|
+
await page.goto('/users');
|
|
195
|
+
const { responseJson } = await usersCall;
|
|
196
|
+
|
|
197
|
+
expect(responseJson).toContainEqual(expect.objectContaining({ id: testUser.id }));
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Key Points**:
|
|
202
|
+
|
|
203
|
+
- One merged-fixtures.ts for entire project
|
|
204
|
+
- Combine all playwright-utils you use
|
|
205
|
+
- Add custom project fixtures
|
|
206
|
+
- Single import in all test files
|
|
207
|
+
|
|
208
|
+
### Example 4: Fixture Override Pattern
|
|
209
|
+
|
|
210
|
+
**Context**: Override default options for specific test files or describes.
|
|
211
|
+
|
|
212
|
+
**Implementation**:
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
import { test, expect } from '../support/merged-fixtures';
|
|
216
|
+
|
|
217
|
+
// Override auth options for entire file
|
|
218
|
+
test.use({
|
|
219
|
+
authOptions: {
|
|
220
|
+
userIdentifier: 'admin',
|
|
221
|
+
environment: 'staging',
|
|
222
|
+
},
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
test('uses admin on staging', async ({ authToken }) => {
|
|
226
|
+
// Token is for admin user on staging environment
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// Override for specific describe block
|
|
230
|
+
test.describe('manager tests', () => {
|
|
231
|
+
test.use({
|
|
232
|
+
authOptions: {
|
|
233
|
+
userIdentifier: 'manager',
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
test('manager can access reports', async ({ page }) => {
|
|
238
|
+
// Uses manager token
|
|
239
|
+
await page.goto('/reports');
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Key Points**:
|
|
245
|
+
|
|
246
|
+
- `test.use()` overrides fixture options
|
|
247
|
+
- Can override at file or describe level
|
|
248
|
+
- Options merge with defaults
|
|
249
|
+
- Type-safe overrides
|
|
250
|
+
|
|
251
|
+
### Example 5: Avoiding Fixture Conflicts
|
|
252
|
+
|
|
253
|
+
**Context**: Handle name collisions when merging fixtures with same names.
|
|
254
|
+
|
|
255
|
+
**Implementation**:
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
// If two fixtures have same name, last one wins
|
|
259
|
+
import { test as fixture1 } from './fixture1'; // has 'user' fixture
|
|
260
|
+
import { test as fixture2 } from './fixture2'; // also has 'user' fixture
|
|
261
|
+
|
|
262
|
+
const test = mergeTests(fixture1, fixture2);
|
|
263
|
+
// fixture2's 'user' overrides fixture1's 'user'
|
|
264
|
+
|
|
265
|
+
// Better: Rename fixtures before merging
|
|
266
|
+
import { test as base } from '@playwright/test';
|
|
267
|
+
import { test as fixture1 } from './fixture1';
|
|
268
|
+
|
|
269
|
+
const fixture1Renamed = base.extend({
|
|
270
|
+
user1: fixture1._extend.user, // Rename to avoid conflict
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
const test = mergeTests(fixture1Renamed, fixture2);
|
|
274
|
+
// Now both 'user1' and 'user' available
|
|
275
|
+
|
|
276
|
+
// Best: Design fixtures without conflicts
|
|
277
|
+
// - Prefix custom fixtures: 'myAppUser', 'myAppDb'
|
|
278
|
+
// - Playwright-utils uses descriptive names: 'apiRequest', 'authToken'
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Key Points**:
|
|
282
|
+
|
|
283
|
+
- Last fixture wins in conflicts
|
|
284
|
+
- Rename fixtures to avoid collisions
|
|
285
|
+
- Design fixtures with unique names
|
|
286
|
+
- Playwright-utils uses descriptive names (no conflicts)
|
|
287
|
+
|
|
288
|
+
## Recommended Project Structure
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
playwright/
|
|
292
|
+
├── support/
|
|
293
|
+
│ ├── merged-fixtures.ts # ⭐ Single test object for project
|
|
294
|
+
│ ├── custom-fixtures.ts # Your project-specific fixtures
|
|
295
|
+
│ ├── auth/
|
|
296
|
+
│ │ ├── auth-fixture.ts # Auth wrapper (if needed)
|
|
297
|
+
│ │ └── custom-auth-provider.ts
|
|
298
|
+
│ ├── fixtures/
|
|
299
|
+
│ │ ├── user-fixture.ts
|
|
300
|
+
│ │ ├── db-fixture.ts
|
|
301
|
+
│ │ └── api-fixture.ts
|
|
302
|
+
│ └── utils/
|
|
303
|
+
│ └── factories/
|
|
304
|
+
└── tests/
|
|
305
|
+
├── api/
|
|
306
|
+
│ └── users.spec.ts # import { test } from '../../support/merged-fixtures'
|
|
307
|
+
├── e2e/
|
|
308
|
+
│ └── login.spec.ts # import { test } from '../../support/merged-fixtures'
|
|
309
|
+
└── component/
|
|
310
|
+
└── button.spec.ts # import { test } from '../../support/merged-fixtures'
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Benefits of Fixture Composition
|
|
314
|
+
|
|
315
|
+
**Compared to direct imports:**
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
// ❌ Without mergeTests (verbose)
|
|
319
|
+
import { test as base } from '@playwright/test';
|
|
320
|
+
import { apiRequest } from '@seontechnologies/playwright-utils/api-request';
|
|
321
|
+
import { getAuthToken } from './auth';
|
|
322
|
+
import { createUser } from './factories';
|
|
323
|
+
|
|
324
|
+
test('verbose', async ({ request }) => {
|
|
325
|
+
const token = await getAuthToken();
|
|
326
|
+
const user = await createUser();
|
|
327
|
+
const response = await apiRequest({ request, method: 'GET', path: '/api/users' });
|
|
328
|
+
// Manual wiring everywhere
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
// ✅ With mergeTests (clean)
|
|
332
|
+
import { test } from '../support/merged-fixtures';
|
|
333
|
+
|
|
334
|
+
test('clean', async ({ apiRequest, authToken, testUser }) => {
|
|
335
|
+
const { body } = await apiRequest({ method: 'GET', path: '/api/users' });
|
|
336
|
+
// All fixtures auto-wired
|
|
337
|
+
});
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**Reduction:** ~10 lines per test → ~2 lines
|
|
341
|
+
|
|
342
|
+
## Related Fragments
|
|
343
|
+
|
|
344
|
+
- `overview.md` - Installation and design principles
|
|
345
|
+
- `api-request.md`, `auth-session.md`, `recurse.md` - Utilities to merge
|
|
346
|
+
- `network-recorder.md`, `intercept-network-call.md`, `log.md` - Additional utilities
|
|
347
|
+
|
|
348
|
+
## Anti-Patterns
|
|
349
|
+
|
|
350
|
+
**❌ Importing test from multiple fixture files:**
|
|
351
|
+
|
|
352
|
+
```typescript
|
|
353
|
+
import { test } from '@seontechnologies/playwright-utils/api-request/fixtures';
|
|
354
|
+
// Also need auth...
|
|
355
|
+
import { test as authTest } from '@seontechnologies/playwright-utils/auth-session/fixtures';
|
|
356
|
+
// Name conflict! Which test to use?
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**✅ Use merged fixtures:**
|
|
360
|
+
|
|
361
|
+
```typescript
|
|
362
|
+
import { test } from '../support/merged-fixtures';
|
|
363
|
+
// All utilities available, no conflicts
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**❌ Merging too many fixtures (kitchen sink):**
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
// Merging 20+ fixtures makes test signature huge
|
|
370
|
+
const test = mergeTests(...20 different fixtures)
|
|
371
|
+
|
|
372
|
+
test('my test', async ({ fixture1, fixture2, ..., fixture20 }) => {
|
|
373
|
+
// Cognitive overload
|
|
374
|
+
})
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**✅ Merge only what you actually use:**
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
// Merge the 4-6 fixtures your project actually needs
|
|
381
|
+
const test = mergeTests(apiRequestFixture, authFixture, recurseFixture, customFixtures);
|
|
382
|
+
```
|