@jhl8041/dooray-mcp 0.1.4 → 0.1.6
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/.claude/commands/bmad_agent_bmad-master.md +14 -0
- package/.claude/commands/bmad_bmm_agent_analyst.md +14 -0
- package/.claude/commands/bmad_bmm_agent_architect.md +14 -0
- package/.claude/commands/bmad_bmm_agent_dev.md +14 -0
- package/.claude/commands/bmad_bmm_agent_pm.md +14 -0
- package/.claude/commands/bmad_bmm_agent_quick-flow-solo-dev.md +14 -0
- package/.claude/commands/bmad_bmm_agent_sm.md +14 -0
- package/.claude/commands/bmad_bmm_agent_tea.md +14 -0
- package/.claude/commands/bmad_bmm_agent_tech-writer_tech-writer.md +14 -0
- package/.claude/commands/bmad_bmm_agent_ux-designer.md +14 -0
- package/.claude/commands/bmad_bmm_check-implementation-readiness.md +5 -0
- package/.claude/commands/bmad_bmm_code-review.md +13 -0
- package/.claude/commands/bmad_bmm_correct-course.md +13 -0
- package/.claude/commands/bmad_bmm_create-architecture.md +5 -0
- package/.claude/commands/bmad_bmm_create-epics-and-stories.md +5 -0
- package/.claude/commands/bmad_bmm_create-excalidraw-dataflow.md +13 -0
- package/.claude/commands/bmad_bmm_create-excalidraw-diagram.md +13 -0
- package/.claude/commands/bmad_bmm_create-excalidraw-flowchart.md +13 -0
- package/.claude/commands/bmad_bmm_create-excalidraw-wireframe.md +13 -0
- package/.claude/commands/bmad_bmm_create-prd.md +5 -0
- package/.claude/commands/bmad_bmm_create-product-brief.md +5 -0
- package/.claude/commands/bmad_bmm_create-story.md +13 -0
- package/.claude/commands/bmad_bmm_create-ux-design.md +5 -0
- package/.claude/commands/bmad_bmm_dev-story.md +13 -0
- package/.claude/commands/bmad_bmm_document-project.md +13 -0
- package/.claude/commands/bmad_bmm_quick-dev.md +5 -0
- package/.claude/commands/bmad_bmm_quick-spec.md +5 -0
- package/.claude/commands/bmad_bmm_research.md +5 -0
- package/.claude/commands/bmad_bmm_retrospective.md +13 -0
- package/.claude/commands/bmad_bmm_sprint-planning.md +13 -0
- package/.claude/commands/bmad_bmm_sprint-status.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-atdd.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-automate.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-ci.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-framework.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-nfr.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-test-design.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-test-review.md +13 -0
- package/.claude/commands/bmad_bmm_testarch-trace.md +13 -0
- package/.claude/commands/bmad_brainstorming.md +5 -0
- package/.claude/commands/bmad_editorial-review-prose.md +9 -0
- package/.claude/commands/bmad_editorial-review-structure.md +10 -0
- package/.claude/commands/bmad_help.md +9 -0
- package/.claude/commands/bmad_index-docs.md +9 -0
- package/.claude/commands/bmad_party-mode.md +5 -0
- package/.claude/commands/bmad_review-adversarial-general.md +9 -0
- package/.claude/commands/bmad_shard-doc.md +9 -0
- package/_bmad/_config/agent-manifest.csv +11 -0
- package/_bmad/_config/agents/bmm-analyst.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-architect.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-dev.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-pm.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-quick-flow-solo-dev.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-sm.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-tea.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-tech-writer.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-ux-designer.customize.yaml +41 -0
- package/_bmad/_config/agents/core-bmad-master.customize.yaml +41 -0
- package/_bmad/_config/bmad-help.csv +40 -0
- package/_bmad/_config/files-manifest.csv +281 -0
- package/_bmad/_config/manifest.yaml +21 -0
- package/_bmad/_config/task-manifest.csv +9 -0
- package/_bmad/_config/tool-manifest.csv +1 -0
- package/_bmad/_config/workflow-manifest.csv +32 -0
- package/_bmad/bmm/agents/analyst.md +76 -0
- package/_bmad/bmm/agents/architect.md +58 -0
- package/_bmad/bmm/agents/dev.md +69 -0
- package/_bmad/bmm/agents/pm.md +72 -0
- package/_bmad/bmm/agents/quick-flow-solo-dev.md +69 -0
- package/_bmad/bmm/agents/sm.md +70 -0
- package/_bmad/bmm/agents/tea.md +70 -0
- package/_bmad/bmm/agents/tech-writer/tech-writer.md +70 -0
- package/_bmad/bmm/agents/ux-designer.md +57 -0
- package/_bmad/bmm/config.yaml +16 -0
- package/_bmad/bmm/data/project-context-template.md +26 -0
- package/_bmad/bmm/module-help.csv +32 -0
- package/_bmad/bmm/teams/default-party.csv +21 -0
- package/_bmad/bmm/teams/team-fullstack.yaml +12 -0
- package/_bmad/bmm/testarch/knowledge/adr-quality-readiness-checklist.md +350 -0
- package/_bmad/bmm/testarch/knowledge/api-request.md +442 -0
- package/_bmad/bmm/testarch/knowledge/api-testing-patterns.md +843 -0
- package/_bmad/bmm/testarch/knowledge/auth-session.md +552 -0
- package/_bmad/bmm/testarch/knowledge/burn-in.md +273 -0
- package/_bmad/bmm/testarch/knowledge/ci-burn-in.md +675 -0
- package/_bmad/bmm/testarch/knowledge/component-tdd.md +486 -0
- package/_bmad/bmm/testarch/knowledge/contract-testing.md +957 -0
- package/_bmad/bmm/testarch/knowledge/data-factories.md +500 -0
- package/_bmad/bmm/testarch/knowledge/email-auth.md +721 -0
- package/_bmad/bmm/testarch/knowledge/error-handling.md +725 -0
- package/_bmad/bmm/testarch/knowledge/feature-flags.md +750 -0
- package/_bmad/bmm/testarch/knowledge/file-utils.md +463 -0
- package/_bmad/bmm/testarch/knowledge/fixture-architecture.md +401 -0
- package/_bmad/bmm/testarch/knowledge/fixtures-composition.md +382 -0
- package/_bmad/bmm/testarch/knowledge/intercept-network-call.md +430 -0
- package/_bmad/bmm/testarch/knowledge/log.md +429 -0
- package/_bmad/bmm/testarch/knowledge/network-error-monitor.md +405 -0
- package/_bmad/bmm/testarch/knowledge/network-first.md +486 -0
- package/_bmad/bmm/testarch/knowledge/network-recorder.md +527 -0
- package/_bmad/bmm/testarch/knowledge/nfr-criteria.md +670 -0
- package/_bmad/bmm/testarch/knowledge/overview.md +286 -0
- package/_bmad/bmm/testarch/knowledge/playwright-config.md +730 -0
- package/_bmad/bmm/testarch/knowledge/probability-impact.md +601 -0
- package/_bmad/bmm/testarch/knowledge/recurse.md +421 -0
- package/_bmad/bmm/testarch/knowledge/risk-governance.md +615 -0
- package/_bmad/bmm/testarch/knowledge/selective-testing.md +732 -0
- package/_bmad/bmm/testarch/knowledge/selector-resilience.md +527 -0
- package/_bmad/bmm/testarch/knowledge/test-healing-patterns.md +644 -0
- package/_bmad/bmm/testarch/knowledge/test-levels-framework.md +473 -0
- package/_bmad/bmm/testarch/knowledge/test-priorities-matrix.md +373 -0
- package/_bmad/bmm/testarch/knowledge/test-quality.md +664 -0
- package/_bmad/bmm/testarch/knowledge/timing-debugging.md +372 -0
- package/_bmad/bmm/testarch/knowledge/visual-debugging.md +524 -0
- package/_bmad/bmm/testarch/tea-index.csv +35 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/product-brief.template.md +10 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-01-init.md +177 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-01b-continue.md +161 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +199 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +202 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +205 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +219 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +162 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md +58 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +137 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +229 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +238 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +206 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +234 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +443 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +182 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +237 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +200 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +249 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +259 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +177 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +475 -0
- package/_bmad/bmm/workflows/1-analysis/research/research.template.md +29 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +137 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +239 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +248 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +202 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +239 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +486 -0
- package/_bmad/bmm/workflows/1-analysis/research/workflow.md +173 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/domain-complexity.csv +13 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +197 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/project-types.csv +11 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-01-init.md +191 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-01b-continue.md +153 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +224 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +226 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +213 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +207 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +226 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +237 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +228 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +231 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +242 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +217 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +124 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +247 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01b-legacy-conversion.md +208 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +249 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-03-edit.md +253 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-04-complete.md +168 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +218 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +191 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +209 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +174 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md +214 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md +228 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md +217 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md +205 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md +243 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md +263 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +209 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +264 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md +242 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +231 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/templates/prd-template.md +10 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/validation-report-prd-workflow.md +433 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md +150 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +135 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01b-continue.md +127 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +190 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +216 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +219 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +234 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +252 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +254 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +224 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +224 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +241 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +248 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +237 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +264 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +171 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +13 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +43 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-01-document-discovery.md +190 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-02-prd-analysis.md +178 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-03-epic-coverage-validation.md +179 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-04-ux-alignment.md +139 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-05-epic-quality-review.md +252 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +135 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/templates/readiness-report-template.md +4 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md +55 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/architecture-decision-template.md +12 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/data/domain-complexity.csv +11 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/data/project-types.csv +7 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-01-init.md +153 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-01b-continue.md +164 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +224 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +331 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +318 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +359 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +379 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +359 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +76 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md +50 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +259 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +233 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +272 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +149 -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 +59 -0
- package/_bmad/bmm/workflows/4-implementation/code-review/checklist.md +23 -0
- package/_bmad/bmm/workflows/4-implementation/code-review/instructions.xml +227 -0
- package/_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml +50 -0
- package/_bmad/bmm/workflows/4-implementation/correct-course/checklist.md +288 -0
- package/_bmad/bmm/workflows/4-implementation/correct-course/instructions.md +206 -0
- package/_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml +58 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/checklist.md +358 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/instructions.xml +345 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/template.md +49 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml +59 -0
- package/_bmad/bmm/workflows/4-implementation/dev-story/checklist.md +80 -0
- package/_bmad/bmm/workflows/4-implementation/dev-story/instructions.xml +410 -0
- package/_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml +25 -0
- package/_bmad/bmm/workflows/4-implementation/retrospective/instructions.md +1443 -0
- package/_bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml +57 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/checklist.md +33 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/instructions.md +225 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +55 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +52 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-status/instructions.md +229 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml +35 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md +176 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md +120 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md +113 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-04-self-check.md +113 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +106 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md +149 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +50 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md +192 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md +145 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md +128 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +201 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/tech-spec-template.md +74 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +79 -0
- package/_bmad/bmm/workflows/document-project/checklist.md +245 -0
- package/_bmad/bmm/workflows/document-project/documentation-requirements.csv +12 -0
- package/_bmad/bmm/workflows/document-project/instructions.md +221 -0
- package/_bmad/bmm/workflows/document-project/templates/deep-dive-template.md +345 -0
- package/_bmad/bmm/workflows/document-project/templates/index-template.md +169 -0
- package/_bmad/bmm/workflows/document-project/templates/project-overview-template.md +103 -0
- package/_bmad/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -0
- package/_bmad/bmm/workflows/document-project/templates/source-tree-template.md +135 -0
- package/_bmad/bmm/workflows/document-project/workflow.yaml +28 -0
- package/_bmad/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
- package/_bmad/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -0
- package/_bmad/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
- package/_bmad/bmm/workflows/document-project/workflows/full-scan.yaml +31 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-library.json +90 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-templates.yaml +127 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-dataflow/checklist.md +39 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-dataflow/instructions.md +130 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml +26 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-diagram/checklist.md +43 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-diagram/instructions.md +141 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml +26 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-flowchart/checklist.md +49 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-flowchart/instructions.md +241 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml +26 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-wireframe/checklist.md +38 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-wireframe/instructions.md +133 -0
- package/_bmad/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml +26 -0
- package/_bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
- package/_bmad/bmm/workflows/testarch/atdd/checklist.md +374 -0
- package/_bmad/bmm/workflows/testarch/atdd/instructions.md +806 -0
- package/_bmad/bmm/workflows/testarch/atdd/workflow.yaml +45 -0
- package/_bmad/bmm/workflows/testarch/automate/checklist.md +582 -0
- package/_bmad/bmm/workflows/testarch/automate/instructions.md +1324 -0
- package/_bmad/bmm/workflows/testarch/automate/workflow.yaml +52 -0
- package/_bmad/bmm/workflows/testarch/ci/checklist.md +247 -0
- package/_bmad/bmm/workflows/testarch/ci/github-actions-template.yaml +198 -0
- package/_bmad/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +149 -0
- package/_bmad/bmm/workflows/testarch/ci/instructions.md +536 -0
- package/_bmad/bmm/workflows/testarch/ci/workflow.yaml +45 -0
- package/_bmad/bmm/workflows/testarch/framework/checklist.md +320 -0
- package/_bmad/bmm/workflows/testarch/framework/instructions.md +481 -0
- package/_bmad/bmm/workflows/testarch/framework/workflow.yaml +47 -0
- package/_bmad/bmm/workflows/testarch/nfr-assess/checklist.md +407 -0
- package/_bmad/bmm/workflows/testarch/nfr-assess/instructions.md +726 -0
- package/_bmad/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +461 -0
- package/_bmad/bmm/workflows/testarch/nfr-assess/workflow.yaml +47 -0
- package/_bmad/bmm/workflows/testarch/test-design/checklist.md +407 -0
- package/_bmad/bmm/workflows/testarch/test-design/instructions.md +1158 -0
- package/_bmad/bmm/workflows/testarch/test-design/test-design-architecture-template.md +213 -0
- package/_bmad/bmm/workflows/testarch/test-design/test-design-qa-template.md +286 -0
- package/_bmad/bmm/workflows/testarch/test-design/test-design-template.md +294 -0
- package/_bmad/bmm/workflows/testarch/test-design/workflow.yaml +69 -0
- package/_bmad/bmm/workflows/testarch/test-review/checklist.md +472 -0
- package/_bmad/bmm/workflows/testarch/test-review/instructions.md +628 -0
- package/_bmad/bmm/workflows/testarch/test-review/test-review-template.md +390 -0
- package/_bmad/bmm/workflows/testarch/test-review/workflow.yaml +46 -0
- package/_bmad/bmm/workflows/testarch/trace/checklist.md +642 -0
- package/_bmad/bmm/workflows/testarch/trace/instructions.md +1030 -0
- package/_bmad/bmm/workflows/testarch/trace/trace-template.md +675 -0
- package/_bmad/bmm/workflows/testarch/trace/workflow.yaml +55 -0
- package/_bmad/core/agents/bmad-master.md +56 -0
- package/_bmad/core/config.yaml +9 -0
- package/_bmad/core/module-help.csv +9 -0
- package/_bmad/core/resources/excalidraw/README.md +160 -0
- package/_bmad/core/resources/excalidraw/excalidraw-helpers.md +127 -0
- package/_bmad/core/resources/excalidraw/library-loader.md +50 -0
- package/_bmad/core/resources/excalidraw/validate-json-instructions.md +79 -0
- package/_bmad/core/tasks/editorial-review-prose.xml +100 -0
- package/_bmad/core/tasks/editorial-review-structure.xml +209 -0
- package/_bmad/core/tasks/help.md +62 -0
- package/_bmad/core/tasks/index-docs.xml +65 -0
- package/_bmad/core/tasks/review-adversarial-general.xml +48 -0
- package/_bmad/core/tasks/shard-doc.xml +109 -0
- package/_bmad/core/tasks/workflow.xml +235 -0
- package/_bmad/core/workflows/advanced-elicitation/methods.csv +51 -0
- package/_bmad/core/workflows/advanced-elicitation/workflow.xml +117 -0
- package/_bmad/core/workflows/brainstorming/brain-methods.csv +62 -0
- package/_bmad/core/workflows/brainstorming/steps/step-01-session-setup.md +197 -0
- package/_bmad/core/workflows/brainstorming/steps/step-01b-continue.md +122 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02a-user-selected.md +225 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02b-ai-recommended.md +237 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02c-random-selection.md +209 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02d-progressive-flow.md +264 -0
- package/_bmad/core/workflows/brainstorming/steps/step-03-technique-execution.md +399 -0
- package/_bmad/core/workflows/brainstorming/steps/step-04-idea-organization.md +303 -0
- package/_bmad/core/workflows/brainstorming/template.md +15 -0
- package/_bmad/core/workflows/brainstorming/workflow.md +58 -0
- package/_bmad/core/workflows/party-mode/steps/step-01-agent-loading.md +138 -0
- package/_bmad/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +187 -0
- package/_bmad/core/workflows/party-mode/steps/step-03-graceful-exit.md +157 -0
- package/_bmad/core/workflows/party-mode/workflow.md +194 -0
- package/dist/api/client.d.ts +16 -1
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +91 -5
- package/dist/api/client.js.map +1 -1
- package/dist/api/projects.d.ts +23 -2
- package/dist/api/projects.d.ts.map +1 -1
- package/dist/api/projects.js +32 -0
- package/dist/api/projects.js.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/projects/delete-attachment-from-task.d.ts.map +1 -0
- package/dist/tools/projects/delete-attachment-from-task.js.map +1 -0
- package/dist/tools/projects/delete-attachment.d.ts +55 -0
- package/dist/tools/projects/delete-attachment.d.ts.map +1 -0
- package/dist/tools/projects/delete-attachment.js +115 -0
- package/dist/tools/projects/delete-attachment.js.map +1 -0
- package/dist/tools/projects/download-attachment.d.ts +55 -0
- package/dist/tools/projects/download-attachment.d.ts.map +1 -0
- package/dist/tools/projects/download-attachment.js +153 -0
- package/dist/tools/projects/download-attachment.js.map +1 -0
- package/dist/tools/projects/get-attachment-list.d.ts +48 -0
- package/dist/tools/projects/get-attachment-list.d.ts.map +1 -0
- package/dist/tools/projects/get-attachment-list.js +118 -0
- package/dist/tools/projects/get-attachment-list.js.map +1 -0
- package/dist/tools/projects/get-attachment-metadata.d.ts +55 -0
- package/dist/tools/projects/get-attachment-metadata.d.ts.map +1 -0
- package/dist/tools/projects/get-attachment-metadata.js +120 -0
- package/dist/tools/projects/get-attachment-metadata.js.map +1 -0
- package/dist/tools/projects/register-attachment-to-task.d.ts.map +1 -0
- package/dist/tools/projects/register-attachment-to-task.js.map +1 -0
- package/dist/tools/projects/update-task.d.ts +4 -4
- package/dist/tools/projects/update-task.js +12 -12
- package/dist/tools/projects/update-task.js.map +1 -1
- package/dist/tools/projects/upload-attachment.d.ts +69 -0
- package/dist/tools/projects/upload-attachment.d.ts.map +1 -0
- package/dist/tools/projects/upload-attachment.js +109 -0
- package/dist/tools/projects/upload-attachment.js.map +1 -0
- package/dist/types/dooray-api.d.ts +15 -0
- package/dist/types/dooray-api.d.ts.map +1 -1
- package/docs/architecture.md +227 -0
- package/docs/development-guide.md +336 -0
- package/docs/index.md +115 -0
- package/docs/project-overview.md +105 -0
- package/docs/project-scan-report.json +120 -0
- package/docs/source-tree-analysis.md +240 -0
- package/package.json +1 -1
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
# Intercept Network Call Utility
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
4
|
+
|
|
5
|
+
Intercept network requests with a single declarative call that returns a Promise. Automatically parse JSON responses, support both spy (observe) and stub (mock) patterns, and use powerful glob pattern matching for URL filtering.
|
|
6
|
+
|
|
7
|
+
## Rationale
|
|
8
|
+
|
|
9
|
+
Vanilla Playwright's network interception requires multiple steps:
|
|
10
|
+
|
|
11
|
+
- `page.route()` to setup, `page.waitForResponse()` to capture
|
|
12
|
+
- Manual JSON parsing
|
|
13
|
+
- Verbose syntax for conditional handling
|
|
14
|
+
- Complex filter predicates
|
|
15
|
+
|
|
16
|
+
The `interceptNetworkCall` utility provides:
|
|
17
|
+
|
|
18
|
+
- **Single declarative call**: Setup and wait in one statement
|
|
19
|
+
- **Automatic JSON parsing**: Response pre-parsed, strongly typed
|
|
20
|
+
- **Flexible URL patterns**: Glob matching with picomatch
|
|
21
|
+
- **Spy or stub modes**: Observe real traffic or mock responses
|
|
22
|
+
- **Concise API**: Reduces boilerplate by 60-70%
|
|
23
|
+
|
|
24
|
+
## Pattern Examples
|
|
25
|
+
|
|
26
|
+
### Example 1: Spy on Network (Observe Real Traffic)
|
|
27
|
+
|
|
28
|
+
**Context**: Capture and inspect real API responses for validation.
|
|
29
|
+
|
|
30
|
+
**Implementation**:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { test } from '@seontechnologies/playwright-utils/intercept-network-call/fixtures';
|
|
34
|
+
|
|
35
|
+
test('should spy on users API', async ({ page, interceptNetworkCall }) => {
|
|
36
|
+
// Setup interception BEFORE navigation
|
|
37
|
+
const usersCall = interceptNetworkCall({
|
|
38
|
+
url: '**/api/users', // Glob pattern
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
await page.goto('/dashboard');
|
|
42
|
+
|
|
43
|
+
// Wait for response and access parsed data
|
|
44
|
+
const { responseJson, status } = await usersCall;
|
|
45
|
+
|
|
46
|
+
expect(status).toBe(200);
|
|
47
|
+
expect(responseJson).toHaveLength(10);
|
|
48
|
+
expect(responseJson[0]).toHaveProperty('name');
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Key Points**:
|
|
53
|
+
|
|
54
|
+
- Intercept before navigation (critical for race-free tests)
|
|
55
|
+
- Returns Promise with `{ responseJson, status, requestBody }`
|
|
56
|
+
- Glob patterns (`**` matches any path segment)
|
|
57
|
+
- JSON automatically parsed
|
|
58
|
+
|
|
59
|
+
### Example 2: Stub Network (Mock Response)
|
|
60
|
+
|
|
61
|
+
**Context**: Mock API responses for testing UI behavior without backend.
|
|
62
|
+
|
|
63
|
+
**Implementation**:
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
test('should stub users API', async ({ page, interceptNetworkCall }) => {
|
|
67
|
+
const mockUsers = [
|
|
68
|
+
{ id: 1, name: 'Test User 1' },
|
|
69
|
+
{ id: 2, name: 'Test User 2' },
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
const usersCall = interceptNetworkCall({
|
|
73
|
+
url: '**/api/users',
|
|
74
|
+
fulfillResponse: {
|
|
75
|
+
status: 200,
|
|
76
|
+
body: mockUsers,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
await page.goto('/dashboard');
|
|
81
|
+
await usersCall;
|
|
82
|
+
|
|
83
|
+
// UI shows mocked data
|
|
84
|
+
await expect(page.getByText('Test User 1')).toBeVisible();
|
|
85
|
+
await expect(page.getByText('Test User 2')).toBeVisible();
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Key Points**:
|
|
90
|
+
|
|
91
|
+
- `fulfillResponse` mocks the API
|
|
92
|
+
- No backend needed
|
|
93
|
+
- Test UI logic in isolation
|
|
94
|
+
- Status code and body fully controllable
|
|
95
|
+
|
|
96
|
+
### Example 3: Conditional Response Handling
|
|
97
|
+
|
|
98
|
+
**Context**: Different responses based on request method or parameters.
|
|
99
|
+
|
|
100
|
+
**Implementation**:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
test('conditional mocking', async ({ page, interceptNetworkCall }) => {
|
|
104
|
+
await interceptNetworkCall({
|
|
105
|
+
url: '**/api/data',
|
|
106
|
+
handler: async (route, request) => {
|
|
107
|
+
if (request.method() === 'POST') {
|
|
108
|
+
// Mock POST success
|
|
109
|
+
await route.fulfill({
|
|
110
|
+
status: 201,
|
|
111
|
+
body: JSON.stringify({ id: 'new-id', success: true }),
|
|
112
|
+
});
|
|
113
|
+
} else if (request.method() === 'GET') {
|
|
114
|
+
// Mock GET with data
|
|
115
|
+
await route.fulfill({
|
|
116
|
+
status: 200,
|
|
117
|
+
body: JSON.stringify([{ id: 1, name: 'Item' }]),
|
|
118
|
+
});
|
|
119
|
+
} else {
|
|
120
|
+
// Let other methods through
|
|
121
|
+
await route.continue();
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
await page.goto('/data-page');
|
|
127
|
+
});
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Key Points**:
|
|
131
|
+
|
|
132
|
+
- `handler` function for complex logic
|
|
133
|
+
- Access full `route` and `request` objects
|
|
134
|
+
- Can mock, continue, or abort
|
|
135
|
+
- Flexible for advanced scenarios
|
|
136
|
+
|
|
137
|
+
### Example 4: Error Simulation
|
|
138
|
+
|
|
139
|
+
**Context**: Testing error handling in UI when API fails.
|
|
140
|
+
|
|
141
|
+
**Implementation**:
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
test('should handle API errors gracefully', async ({ page, interceptNetworkCall }) => {
|
|
145
|
+
// Simulate 500 error
|
|
146
|
+
const errorCall = interceptNetworkCall({
|
|
147
|
+
url: '**/api/users',
|
|
148
|
+
fulfillResponse: {
|
|
149
|
+
status: 500,
|
|
150
|
+
body: { error: 'Internal Server Error' },
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
await page.goto('/dashboard');
|
|
155
|
+
await errorCall;
|
|
156
|
+
|
|
157
|
+
// Verify UI shows error state
|
|
158
|
+
await expect(page.getByText('Failed to load users')).toBeVisible();
|
|
159
|
+
await expect(page.getByTestId('retry-button')).toBeVisible();
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// Simulate network timeout
|
|
163
|
+
test('should handle timeout', async ({ page, interceptNetworkCall }) => {
|
|
164
|
+
await interceptNetworkCall({
|
|
165
|
+
url: '**/api/slow',
|
|
166
|
+
handler: async (route) => {
|
|
167
|
+
// Never respond - simulates timeout
|
|
168
|
+
await new Promise(() => {});
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
await page.goto('/slow-page');
|
|
173
|
+
|
|
174
|
+
// UI should show timeout error
|
|
175
|
+
await expect(page.getByText('Request timed out')).toBeVisible({ timeout: 10000 });
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Key Points**:
|
|
180
|
+
|
|
181
|
+
- Mock error statuses (4xx, 5xx)
|
|
182
|
+
- Test timeout scenarios
|
|
183
|
+
- Validate error UI states
|
|
184
|
+
- No real failures needed
|
|
185
|
+
|
|
186
|
+
### Example 5: Order Matters - Intercept Before Navigate
|
|
187
|
+
|
|
188
|
+
**Context**: The interceptor must be set up before the network request occurs.
|
|
189
|
+
|
|
190
|
+
**Implementation**:
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
// INCORRECT - interceptor set up too late
|
|
194
|
+
await page.goto('https://example.com'); // Request already happened
|
|
195
|
+
const networkCall = interceptNetworkCall({ url: '**/api/data' });
|
|
196
|
+
await networkCall; // Will hang indefinitely!
|
|
197
|
+
|
|
198
|
+
// CORRECT - Set up interception first
|
|
199
|
+
const networkCall = interceptNetworkCall({ url: '**/api/data' });
|
|
200
|
+
await page.goto('https://example.com');
|
|
201
|
+
const result = await networkCall;
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
This pattern follows the classic test spy/stub pattern:
|
|
205
|
+
|
|
206
|
+
1. Define the spy/stub (set up interception)
|
|
207
|
+
2. Perform the action (trigger the network request)
|
|
208
|
+
3. Assert on the spy/stub (await and verify the response)
|
|
209
|
+
|
|
210
|
+
### Example 6: Multiple Intercepts
|
|
211
|
+
|
|
212
|
+
**Context**: Intercepting different endpoints in same test - setup order is critical.
|
|
213
|
+
|
|
214
|
+
**Implementation**:
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
test('multiple intercepts', async ({ page, interceptNetworkCall }) => {
|
|
218
|
+
// Setup all intercepts BEFORE navigation
|
|
219
|
+
const usersCall = interceptNetworkCall({ url: '**/api/users' });
|
|
220
|
+
const productsCall = interceptNetworkCall({ url: '**/api/products' });
|
|
221
|
+
const ordersCall = interceptNetworkCall({ url: '**/api/orders' });
|
|
222
|
+
|
|
223
|
+
// THEN navigate
|
|
224
|
+
await page.goto('/dashboard');
|
|
225
|
+
|
|
226
|
+
// Wait for all (or specific ones)
|
|
227
|
+
const [users, products] = await Promise.all([usersCall, productsCall]);
|
|
228
|
+
|
|
229
|
+
expect(users.responseJson).toHaveLength(10);
|
|
230
|
+
expect(products.responseJson).toHaveLength(50);
|
|
231
|
+
});
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Key Points**:
|
|
235
|
+
|
|
236
|
+
- Setup all intercepts before triggering actions
|
|
237
|
+
- Use `Promise.all()` to wait for multiple calls
|
|
238
|
+
- Order: intercept -> navigate -> await
|
|
239
|
+
- Prevents race conditions
|
|
240
|
+
|
|
241
|
+
### Example 7: Capturing Multiple Requests to the Same Endpoint
|
|
242
|
+
|
|
243
|
+
**Context**: Each `interceptNetworkCall` captures only the first matching request.
|
|
244
|
+
|
|
245
|
+
**Implementation**:
|
|
246
|
+
|
|
247
|
+
```typescript
|
|
248
|
+
// Capturing a known number of requests
|
|
249
|
+
const firstRequest = interceptNetworkCall({ url: '/api/data' });
|
|
250
|
+
const secondRequest = interceptNetworkCall({ url: '/api/data' });
|
|
251
|
+
|
|
252
|
+
await page.click('#load-data-button');
|
|
253
|
+
|
|
254
|
+
const firstResponse = await firstRequest;
|
|
255
|
+
const secondResponse = await secondRequest;
|
|
256
|
+
|
|
257
|
+
expect(firstResponse.status).toBe(200);
|
|
258
|
+
expect(secondResponse.status).toBe(200);
|
|
259
|
+
|
|
260
|
+
// Handling an unknown number of requests
|
|
261
|
+
const getDataRequestInterceptor = () =>
|
|
262
|
+
interceptNetworkCall({
|
|
263
|
+
url: '/api/data',
|
|
264
|
+
timeout: 1000, // Short timeout to detect when no more requests are coming
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
let currentInterceptor = getDataRequestInterceptor();
|
|
268
|
+
const allResponses = [];
|
|
269
|
+
|
|
270
|
+
await page.click('#load-multiple-data-button');
|
|
271
|
+
|
|
272
|
+
while (true) {
|
|
273
|
+
try {
|
|
274
|
+
const response = await currentInterceptor;
|
|
275
|
+
allResponses.push(response);
|
|
276
|
+
currentInterceptor = getDataRequestInterceptor();
|
|
277
|
+
} catch (error) {
|
|
278
|
+
// No more requests (timeout)
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
console.log(`Captured ${allResponses.length} requests to /api/data`);
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Example 8: Using Timeout
|
|
287
|
+
|
|
288
|
+
**Context**: Set a timeout for waiting on a network request.
|
|
289
|
+
|
|
290
|
+
**Implementation**:
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
const dataCall = interceptNetworkCall({
|
|
294
|
+
method: 'GET',
|
|
295
|
+
url: '/api/data-that-might-be-slow',
|
|
296
|
+
timeout: 5000, // 5 seconds timeout
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
await page.goto('/data-page');
|
|
300
|
+
|
|
301
|
+
try {
|
|
302
|
+
const { responseJson } = await dataCall;
|
|
303
|
+
console.log('Data loaded successfully:', responseJson);
|
|
304
|
+
} catch (error) {
|
|
305
|
+
if (error.message.includes('timeout')) {
|
|
306
|
+
console.log('Request timed out as expected');
|
|
307
|
+
} else {
|
|
308
|
+
throw error;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## URL Pattern Matching
|
|
314
|
+
|
|
315
|
+
The utility uses [picomatch](https://github.com/micromatch/picomatch) for powerful glob pattern matching, dramatically simplifying URL targeting:
|
|
316
|
+
|
|
317
|
+
**Supported glob patterns:**
|
|
318
|
+
|
|
319
|
+
```typescript
|
|
320
|
+
'**/api/users'; // Any path ending with /api/users
|
|
321
|
+
'/api/users'; // Exact match
|
|
322
|
+
'**/users/*'; // Any users sub-path
|
|
323
|
+
'**/api/{users,products}'; // Either users or products
|
|
324
|
+
'**/api/users?id=*'; // With query params
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Comparison with vanilla Playwright:**
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
// Vanilla Playwright - complex predicate
|
|
331
|
+
const predicate = (response) => {
|
|
332
|
+
const url = response.url();
|
|
333
|
+
return (
|
|
334
|
+
url.endsWith('/api/users') ||
|
|
335
|
+
url.match(/\/api\/users\/\d+/) ||
|
|
336
|
+
(url.includes('/api/users/') && url.includes('/profile'))
|
|
337
|
+
);
|
|
338
|
+
};
|
|
339
|
+
page.waitForResponse(predicate);
|
|
340
|
+
|
|
341
|
+
// With interceptNetworkCall - simple glob patterns
|
|
342
|
+
interceptNetworkCall({ url: '/api/users' }); // Exact endpoint
|
|
343
|
+
interceptNetworkCall({ url: '/api/users/*' }); // User by ID pattern
|
|
344
|
+
interceptNetworkCall({ url: '/api/users/*/profile' }); // Specific sub-paths
|
|
345
|
+
interceptNetworkCall({ url: '/api/users/**' }); // Match all
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## API Reference
|
|
349
|
+
|
|
350
|
+
### `interceptNetworkCall(options)`
|
|
351
|
+
|
|
352
|
+
| Parameter | Type | Description |
|
|
353
|
+
| ----------------- | ---------- | --------------------------------------------------------------------- |
|
|
354
|
+
| `page` | `Page` | Required when using direct import (not needed with fixture) |
|
|
355
|
+
| `method` | `string` | Optional: HTTP method to match (e.g., 'GET', 'POST') |
|
|
356
|
+
| `url` | `string` | Optional: URL pattern to match (supports glob patterns via picomatch) |
|
|
357
|
+
| `fulfillResponse` | `object` | Optional: Response to use when mocking |
|
|
358
|
+
| `handler` | `function` | Optional: Custom handler function for the route |
|
|
359
|
+
| `timeout` | `number` | Optional: Timeout in milliseconds for the network request |
|
|
360
|
+
|
|
361
|
+
### `fulfillResponse` Object
|
|
362
|
+
|
|
363
|
+
| Property | Type | Description |
|
|
364
|
+
| --------- | ------------------------ | ----------------------------------------------------- |
|
|
365
|
+
| `status` | `number` | HTTP status code (default: 200) |
|
|
366
|
+
| `headers` | `Record<string, string>` | Response headers |
|
|
367
|
+
| `body` | `any` | Response body (will be JSON.stringified if an object) |
|
|
368
|
+
|
|
369
|
+
### Return Value
|
|
370
|
+
|
|
371
|
+
Returns a `Promise<NetworkCallResult>` with:
|
|
372
|
+
|
|
373
|
+
| Property | Type | Description |
|
|
374
|
+
| -------------- | ---------- | --------------------------------------- |
|
|
375
|
+
| `request` | `Request` | The intercepted request |
|
|
376
|
+
| `response` | `Response` | The response (null if mocked) |
|
|
377
|
+
| `responseJson` | `any` | Parsed JSON response (if available) |
|
|
378
|
+
| `status` | `number` | HTTP status code |
|
|
379
|
+
| `requestJson` | `any` | Parsed JSON request body (if available) |
|
|
380
|
+
|
|
381
|
+
## Comparison with Vanilla Playwright
|
|
382
|
+
|
|
383
|
+
| Vanilla Playwright | intercept-network-call |
|
|
384
|
+
| ----------------------------------------------------------- | ------------------------------------------------------------ |
|
|
385
|
+
| `await page.route('/api/users', route => route.continue())` | `const call = interceptNetworkCall({ url: '**/api/users' })` |
|
|
386
|
+
| `const resp = await page.waitForResponse('/api/users')` | (Combined in single statement) |
|
|
387
|
+
| `const json = await resp.json()` | `const { responseJson } = await call` |
|
|
388
|
+
| `const status = resp.status()` | `const { status } = await call` |
|
|
389
|
+
| Complex filter predicates | Simple glob patterns |
|
|
390
|
+
|
|
391
|
+
**Reduction:** ~5-7 lines -> ~2-3 lines per interception
|
|
392
|
+
|
|
393
|
+
## Related Fragments
|
|
394
|
+
|
|
395
|
+
- `network-first.md` - Core pattern: intercept before navigate
|
|
396
|
+
- `network-recorder.md` - HAR-based offline testing
|
|
397
|
+
- `overview.md` - Fixture composition basics
|
|
398
|
+
|
|
399
|
+
## Anti-Patterns
|
|
400
|
+
|
|
401
|
+
**DON'T intercept after navigation:**
|
|
402
|
+
|
|
403
|
+
```typescript
|
|
404
|
+
await page.goto('/dashboard'); // Navigation starts
|
|
405
|
+
const usersCall = interceptNetworkCall({ url: '**/api/users' }); // Too late!
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**DO intercept before navigate:**
|
|
409
|
+
|
|
410
|
+
```typescript
|
|
411
|
+
const usersCall = interceptNetworkCall({ url: '**/api/users' }); // First
|
|
412
|
+
await page.goto('/dashboard'); // Then navigate
|
|
413
|
+
const { responseJson } = await usersCall; // Then await
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
**DON'T ignore the returned Promise:**
|
|
417
|
+
|
|
418
|
+
```typescript
|
|
419
|
+
interceptNetworkCall({ url: '**/api/users' }); // Not awaited!
|
|
420
|
+
await page.goto('/dashboard');
|
|
421
|
+
// No deterministic wait - race condition
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
**DO always await the intercept:**
|
|
425
|
+
|
|
426
|
+
```typescript
|
|
427
|
+
const usersCall = interceptNetworkCall({ url: '**/api/users' });
|
|
428
|
+
await page.goto('/dashboard');
|
|
429
|
+
await usersCall; // Deterministic wait
|
|
430
|
+
```
|