@pennyfarthing/core 7.4.0 → 7.5.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/dist/cli/utils/files.d.ts +0 -1
- package/dist/cli/utils/files.js +73 -56
- package/dist/cli/utils/manifest.d.ts +0 -1
- package/dist/cli/utils/manifest.js +48 -45
- package/dist/cli/utils/version.d.ts +0 -1
- package/dist/cli/utils/version.js +38 -32
- package/dist/index.d.ts +0 -1
- package/dist/index.js +39 -11
- package/dist/permissions/index.d.ts +0 -1
- package/dist/permissions/index.js +7 -4
- package/dist/permissions/permission-schema.d.ts +0 -1
- package/dist/permissions/permission-schema.js +13 -9
- package/dist/scripts/job-fair-aggregator.d.ts +0 -1
- package/dist/scripts/job-fair-aggregator.js +484 -341
- package/dist/workflow/index.d.ts +0 -1
- package/dist/workflow/index.js +12 -5
- package/dist/workflow/workflow-loader.d.ts +0 -1
- package/dist/workflow/workflow-loader.js +40 -34
- package/dist/workflow/workflow-permissions.d.ts +0 -1
- package/dist/workflow/workflow-permissions.js +14 -8
- package/dist/workflow/workflow-router.d.ts +0 -1
- package/dist/workflow/workflow-router.js +70 -51
- package/dist/workflow/workflow-schema.d.ts +0 -1
- package/dist/workflow/workflow-schema.js +62 -59
- package/package.json +1 -1
- package/dist/bmad/context-reader.d.ts +0 -71
- package/dist/bmad/context-reader.d.ts.map +0 -1
- package/dist/bmad/context-reader.js +0 -369
- package/dist/bmad/context-reader.js.map +0 -1
- package/dist/bmad/context-reader.test.d.ts +0 -71
- package/dist/bmad/context-reader.test.d.ts.map +0 -1
- package/dist/bmad/context-reader.test.js +0 -878
- package/dist/bmad/context-reader.test.js.map +0 -1
- package/dist/bmad/epics-parser.d.ts +0 -61
- package/dist/bmad/epics-parser.d.ts.map +0 -1
- package/dist/bmad/epics-parser.js +0 -331
- package/dist/bmad/epics-parser.js.map +0 -1
- package/dist/bmad/epics-parser.test.d.ts +0 -7
- package/dist/bmad/epics-parser.test.d.ts.map +0 -1
- package/dist/bmad/epics-parser.test.js +0 -449
- package/dist/bmad/epics-parser.test.js.map +0 -1
- package/dist/bmad/index.d.ts +0 -11
- package/dist/bmad/index.d.ts.map +0 -1
- package/dist/bmad/index.js +0 -24
- package/dist/bmad/index.js.map +0 -1
- package/dist/bmad/status-sync.d.ts +0 -173
- package/dist/bmad/status-sync.d.ts.map +0 -1
- package/dist/bmad/status-sync.js +0 -463
- package/dist/bmad/status-sync.js.map +0 -1
- package/dist/bmad/status-sync.test.d.ts +0 -7
- package/dist/bmad/status-sync.test.d.ts.map +0 -1
- package/dist/bmad/status-sync.test.js +0 -702
- package/dist/bmad/status-sync.test.js.map +0 -1
- package/dist/bmad/story-exporter.d.ts +0 -55
- package/dist/bmad/story-exporter.d.ts.map +0 -1
- package/dist/bmad/story-exporter.js +0 -170
- package/dist/bmad/story-exporter.js.map +0 -1
- package/dist/bmad/story-exporter.test.d.ts +0 -51
- package/dist/bmad/story-exporter.test.d.ts.map +0 -1
- package/dist/bmad/story-exporter.test.js +0 -603
- package/dist/bmad/story-exporter.test.js.map +0 -1
- package/dist/bmad/story-parser.d.ts +0 -44
- package/dist/bmad/story-parser.d.ts.map +0 -1
- package/dist/bmad/story-parser.js +0 -307
- package/dist/bmad/story-parser.js.map +0 -1
- package/dist/bmad/story-parser.test.d.ts +0 -44
- package/dist/bmad/story-parser.test.d.ts.map +0 -1
- package/dist/bmad/story-parser.test.js +0 -693
- package/dist/bmad/story-parser.test.js.map +0 -1
- package/dist/cli/commands/command.d.ts +0 -28
- package/dist/cli/commands/command.d.ts.map +0 -1
- package/dist/cli/commands/command.js +0 -399
- package/dist/cli/commands/command.js.map +0 -1
- package/dist/cli/commands/cyclist.d.ts +0 -46
- package/dist/cli/commands/cyclist.d.ts.map +0 -1
- package/dist/cli/commands/cyclist.js +0 -196
- package/dist/cli/commands/cyclist.js.map +0 -1
- package/dist/cli/commands/cyclist.test.d.ts +0 -13
- package/dist/cli/commands/cyclist.test.d.ts.map +0 -1
- package/dist/cli/commands/cyclist.test.js +0 -245
- package/dist/cli/commands/cyclist.test.js.map +0 -1
- package/dist/cli/commands/doctor.d.ts +0 -9
- package/dist/cli/commands/doctor.d.ts.map +0 -1
- package/dist/cli/commands/doctor.js +0 -652
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -8
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/init.js +0 -524
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/skill.d.ts +0 -28
- package/dist/cli/commands/skill.d.ts.map +0 -1
- package/dist/cli/commands/skill.js +0 -416
- package/dist/cli/commands/skill.js.map +0 -1
- package/dist/cli/commands/theme.d.ts +0 -21
- package/dist/cli/commands/theme.d.ts.map +0 -1
- package/dist/cli/commands/theme.js +0 -201
- package/dist/cli/commands/theme.js.map +0 -1
- package/dist/cli/commands/uninstall.d.ts +0 -8
- package/dist/cli/commands/uninstall.d.ts.map +0 -1
- package/dist/cli/commands/uninstall.js +0 -237
- package/dist/cli/commands/uninstall.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -9
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js +0 -418
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/commands/version.d.ts +0 -2
- package/dist/cli/commands/version.d.ts.map +0 -1
- package/dist/cli/commands/version.js +0 -28
- package/dist/cli/commands/version.js.map +0 -1
- package/dist/cli/customization.test.d.ts +0 -12
- package/dist/cli/customization.test.d.ts.map +0 -1
- package/dist/cli/customization.test.js +0 -84
- package/dist/cli/customization.test.js.map +0 -1
- package/dist/cli/cyclist-migration.test.d.ts +0 -16
- package/dist/cli/cyclist-migration.test.d.ts.map +0 -1
- package/dist/cli/cyclist-migration.test.js +0 -225
- package/dist/cli/cyclist-migration.test.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -174
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/ocean-profiles.test.d.ts +0 -13
- package/dist/cli/ocean-profiles.test.d.ts.map +0 -1
- package/dist/cli/ocean-profiles.test.js +0 -134
- package/dist/cli/ocean-profiles.test.js.map +0 -1
- package/dist/cli/theme-maker.test.d.ts +0 -11
- package/dist/cli/theme-maker.test.d.ts.map +0 -1
- package/dist/cli/theme-maker.test.js +0 -356
- package/dist/cli/theme-maker.test.js.map +0 -1
- package/dist/cli/utils/constants.d.ts +0 -66
- package/dist/cli/utils/constants.d.ts.map +0 -1
- package/dist/cli/utils/constants.js +0 -54
- package/dist/cli/utils/constants.js.map +0 -1
- package/dist/cli/utils/files.d.ts.map +0 -1
- package/dist/cli/utils/files.js.map +0 -1
- package/dist/cli/utils/logger.d.ts +0 -26
- package/dist/cli/utils/logger.d.ts.map +0 -1
- package/dist/cli/utils/logger.js +0 -88
- package/dist/cli/utils/logger.js.map +0 -1
- package/dist/cli/utils/manifest.d.ts.map +0 -1
- package/dist/cli/utils/manifest.js.map +0 -1
- package/dist/cli/utils/node-modules.d.ts +0 -6
- package/dist/cli/utils/node-modules.d.ts.map +0 -1
- package/dist/cli/utils/node-modules.js +0 -31
- package/dist/cli/utils/node-modules.js.map +0 -1
- package/dist/cli/utils/prompts.d.ts +0 -34
- package/dist/cli/utils/prompts.d.ts.map +0 -1
- package/dist/cli/utils/prompts.js +0 -93
- package/dist/cli/utils/prompts.js.map +0 -1
- package/dist/cli/utils/symlinks.d.ts +0 -29
- package/dist/cli/utils/symlinks.d.ts.map +0 -1
- package/dist/cli/utils/symlinks.js +0 -181
- package/dist/cli/utils/symlinks.js.map +0 -1
- package/dist/cli/utils/themes.d.ts +0 -101
- package/dist/cli/utils/themes.d.ts.map +0 -1
- package/dist/cli/utils/themes.js +0 -373
- package/dist/cli/utils/themes.js.map +0 -1
- package/dist/cli/utils/themes.test.d.ts +0 -12
- package/dist/cli/utils/themes.test.d.ts.map +0 -1
- package/dist/cli/utils/themes.test.js +0 -147
- package/dist/cli/utils/themes.test.js.map +0 -1
- package/dist/cli/utils/version.d.ts.map +0 -1
- package/dist/cli/utils/version.js.map +0 -1
- package/dist/cli/workspace.test.d.ts +0 -8
- package/dist/cli/workspace.test.d.ts.map +0 -1
- package/dist/cli/workspace.test.js +0 -151
- package/dist/cli/workspace.test.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/jira/jira-epic-creation.d.ts +0 -109
- package/dist/jira/jira-epic-creation.d.ts.map +0 -1
- package/dist/jira/jira-epic-creation.js +0 -253
- package/dist/jira/jira-epic-creation.js.map +0 -1
- package/dist/jira/jira-epic-creation.test.d.ts +0 -16
- package/dist/jira/jira-epic-creation.test.d.ts.map +0 -1
- package/dist/jira/jira-epic-creation.test.js +0 -387
- package/dist/jira/jira-epic-creation.test.js.map +0 -1
- package/dist/jira/jira-sprint-sync.d.ts +0 -247
- package/dist/jira/jira-sprint-sync.d.ts.map +0 -1
- package/dist/jira/jira-sprint-sync.js +0 -670
- package/dist/jira/jira-sprint-sync.js.map +0 -1
- package/dist/jira/jira-sprint-sync.test.d.ts +0 -16
- package/dist/jira/jira-sprint-sync.test.d.ts.map +0 -1
- package/dist/jira/jira-sprint-sync.test.js +0 -845
- package/dist/jira/jira-sprint-sync.test.js.map +0 -1
- package/dist/permissions/index.d.ts.map +0 -1
- package/dist/permissions/index.js.map +0 -1
- package/dist/permissions/permission-schema.d.ts.map +0 -1
- package/dist/permissions/permission-schema.js.map +0 -1
- package/dist/permissions/permission-schema.test.d.ts +0 -40
- package/dist/permissions/permission-schema.test.d.ts.map +0 -1
- package/dist/permissions/permission-schema.test.js +0 -367
- package/dist/permissions/permission-schema.test.js.map +0 -1
- package/dist/scripts/add-ocean-profiles.d.ts +0 -9
- package/dist/scripts/add-ocean-profiles.d.ts.map +0 -1
- package/dist/scripts/add-ocean-profiles.js +0 -695
- package/dist/scripts/add-ocean-profiles.js.map +0 -1
- package/dist/scripts/benchmark-integration.d.ts +0 -182
- package/dist/scripts/benchmark-integration.d.ts.map +0 -1
- package/dist/scripts/benchmark-integration.js +0 -691
- package/dist/scripts/benchmark-integration.js.map +0 -1
- package/dist/scripts/benchmark-integration.test.d.ts +0 -13
- package/dist/scripts/benchmark-integration.test.d.ts.map +0 -1
- package/dist/scripts/benchmark-integration.test.js +0 -680
- package/dist/scripts/benchmark-integration.test.js.map +0 -1
- package/dist/scripts/debugging-scenarios.test.d.ts +0 -18
- package/dist/scripts/debugging-scenarios.test.d.ts.map +0 -1
- package/dist/scripts/debugging-scenarios.test.js +0 -317
- package/dist/scripts/debugging-scenarios.test.js.map +0 -1
- package/dist/scripts/generate-all-spiders.d.ts +0 -10
- package/dist/scripts/generate-all-spiders.d.ts.map +0 -1
- package/dist/scripts/generate-all-spiders.js +0 -306
- package/dist/scripts/generate-all-spiders.js.map +0 -1
- package/dist/scripts/generate-report.d.ts +0 -65
- package/dist/scripts/generate-report.d.ts.map +0 -1
- package/dist/scripts/generate-report.js +0 -378
- package/dist/scripts/generate-report.js.map +0 -1
- package/dist/scripts/generate-report.test.d.ts +0 -13
- package/dist/scripts/generate-report.test.d.ts.map +0 -1
- package/dist/scripts/generate-report.test.js +0 -363
- package/dist/scripts/generate-report.test.js.map +0 -1
- package/dist/scripts/generate-spider-report.d.ts +0 -65
- package/dist/scripts/generate-spider-report.d.ts.map +0 -1
- package/dist/scripts/generate-spider-report.js +0 -366
- package/dist/scripts/generate-spider-report.js.map +0 -1
- package/dist/scripts/generate-spider-report.test.d.ts +0 -13
- package/dist/scripts/generate-spider-report.test.d.ts.map +0 -1
- package/dist/scripts/generate-spider-report.test.js +0 -367
- package/dist/scripts/generate-spider-report.test.js.map +0 -1
- package/dist/scripts/generate-spider.d.ts +0 -47
- package/dist/scripts/generate-spider.d.ts.map +0 -1
- package/dist/scripts/generate-spider.js +0 -338
- package/dist/scripts/generate-spider.js.map +0 -1
- package/dist/scripts/generate-spider.test.d.ts +0 -14
- package/dist/scripts/generate-spider.test.d.ts.map +0 -1
- package/dist/scripts/generate-spider.test.js +0 -271
- package/dist/scripts/generate-spider.test.js.map +0 -1
- package/dist/scripts/job-fair-aggregator.d.ts.map +0 -1
- package/dist/scripts/job-fair-aggregator.js.map +0 -1
- package/dist/scripts/job-fair-aggregator.test.d.ts +0 -14
- package/dist/scripts/job-fair-aggregator.test.d.ts.map +0 -1
- package/dist/scripts/job-fair-aggregator.test.js +0 -616
- package/dist/scripts/job-fair-aggregator.test.js.map +0 -1
- package/dist/scripts/run-ci.test.d.ts +0 -20
- package/dist/scripts/run-ci.test.d.ts.map +0 -1
- package/dist/scripts/run-ci.test.js +0 -127
- package/dist/scripts/run-ci.test.js.map +0 -1
- package/dist/scripts/theme-detail.test.d.ts +0 -10
- package/dist/scripts/theme-detail.test.d.ts.map +0 -1
- package/dist/scripts/theme-detail.test.js +0 -199
- package/dist/scripts/theme-detail.test.js.map +0 -1
- package/dist/scripts/validate-ocean-profiles.d.ts +0 -9
- package/dist/scripts/validate-ocean-profiles.d.ts.map +0 -1
- package/dist/scripts/validate-ocean-profiles.js +0 -130
- package/dist/scripts/validate-ocean-profiles.js.map +0 -1
- package/dist/workflow/gate-handler.d.ts +0 -94
- package/dist/workflow/gate-handler.d.ts.map +0 -1
- package/dist/workflow/gate-handler.js +0 -189
- package/dist/workflow/gate-handler.js.map +0 -1
- package/dist/workflow/gate-handler.test.d.ts +0 -14
- package/dist/workflow/gate-handler.test.d.ts.map +0 -1
- package/dist/workflow/gate-handler.test.js +0 -543
- package/dist/workflow/gate-handler.test.js.map +0 -1
- package/dist/workflow/generic-handoff.d.ts +0 -281
- package/dist/workflow/generic-handoff.d.ts.map +0 -1
- package/dist/workflow/generic-handoff.js +0 -411
- package/dist/workflow/generic-handoff.js.map +0 -1
- package/dist/workflow/generic-handoff.test.d.ts +0 -21
- package/dist/workflow/generic-handoff.test.d.ts.map +0 -1
- package/dist/workflow/generic-handoff.test.js +0 -499
- package/dist/workflow/generic-handoff.test.js.map +0 -1
- package/dist/workflow/generic-sm-finish.d.ts +0 -89
- package/dist/workflow/generic-sm-finish.d.ts.map +0 -1
- package/dist/workflow/generic-sm-finish.js +0 -157
- package/dist/workflow/generic-sm-finish.js.map +0 -1
- package/dist/workflow/generic-sm-setup.d.ts +0 -138
- package/dist/workflow/generic-sm-setup.d.ts.map +0 -1
- package/dist/workflow/generic-sm-setup.js +0 -382
- package/dist/workflow/generic-sm-setup.js.map +0 -1
- package/dist/workflow/index.d.ts.map +0 -1
- package/dist/workflow/index.js.map +0 -1
- package/dist/workflow/session-state.d.ts +0 -92
- package/dist/workflow/session-state.d.ts.map +0 -1
- package/dist/workflow/session-state.js +0 -198
- package/dist/workflow/session-state.js.map +0 -1
- package/dist/workflow/session-state.test.d.ts +0 -8
- package/dist/workflow/session-state.test.d.ts.map +0 -1
- package/dist/workflow/session-state.test.js +0 -551
- package/dist/workflow/session-state.test.js.map +0 -1
- package/dist/workflow/sm-subagents.test.d.ts +0 -23
- package/dist/workflow/sm-subagents.test.d.ts.map +0 -1
- package/dist/workflow/sm-subagents.test.js +0 -727
- package/dist/workflow/sm-subagents.test.js.map +0 -1
- package/dist/workflow/step-parser.d.ts +0 -45
- package/dist/workflow/step-parser.d.ts.map +0 -1
- package/dist/workflow/step-parser.js +0 -147
- package/dist/workflow/step-parser.js.map +0 -1
- package/dist/workflow/step-parser.test.d.ts +0 -14
- package/dist/workflow/step-parser.test.d.ts.map +0 -1
- package/dist/workflow/step-parser.test.js +0 -470
- package/dist/workflow/step-parser.test.js.map +0 -1
- package/dist/workflow/story-workflow-routing.test.d.ts +0 -17
- package/dist/workflow/story-workflow-routing.test.d.ts.map +0 -1
- package/dist/workflow/story-workflow-routing.test.js +0 -559
- package/dist/workflow/story-workflow-routing.test.js.map +0 -1
- package/dist/workflow/test-cache.d.ts +0 -131
- package/dist/workflow/test-cache.d.ts.map +0 -1
- package/dist/workflow/test-cache.js +0 -226
- package/dist/workflow/test-cache.js.map +0 -1
- package/dist/workflow/test-cache.test.d.ts +0 -17
- package/dist/workflow/test-cache.test.d.ts.map +0 -1
- package/dist/workflow/test-cache.test.js +0 -438
- package/dist/workflow/test-cache.test.js.map +0 -1
- package/dist/workflow/trimodal.d.ts +0 -86
- package/dist/workflow/trimodal.d.ts.map +0 -1
- package/dist/workflow/trimodal.js +0 -118
- package/dist/workflow/trimodal.js.map +0 -1
- package/dist/workflow/trimodal.test.d.ts +0 -11
- package/dist/workflow/trimodal.test.d.ts.map +0 -1
- package/dist/workflow/trimodal.test.js +0 -395
- package/dist/workflow/trimodal.test.js.map +0 -1
- package/dist/workflow/variable-resolver.d.ts +0 -67
- package/dist/workflow/variable-resolver.d.ts.map +0 -1
- package/dist/workflow/variable-resolver.js +0 -156
- package/dist/workflow/variable-resolver.js.map +0 -1
- package/dist/workflow/variable-resolver.test.d.ts +0 -14
- package/dist/workflow/variable-resolver.test.d.ts.map +0 -1
- package/dist/workflow/variable-resolver.test.js +0 -400
- package/dist/workflow/variable-resolver.test.js.map +0 -1
- package/dist/workflow/workflow-executor.d.ts +0 -163
- package/dist/workflow/workflow-executor.d.ts.map +0 -1
- package/dist/workflow/workflow-executor.js +0 -197
- package/dist/workflow/workflow-executor.js.map +0 -1
- package/dist/workflow/workflow-executor.test.d.ts +0 -8
- package/dist/workflow/workflow-executor.test.d.ts.map +0 -1
- package/dist/workflow/workflow-executor.test.js +0 -444
- package/dist/workflow/workflow-executor.test.js.map +0 -1
- package/dist/workflow/workflow-loader.d.ts.map +0 -1
- package/dist/workflow/workflow-loader.js.map +0 -1
- package/dist/workflow/workflow-loader.test.d.ts +0 -15
- package/dist/workflow/workflow-loader.test.d.ts.map +0 -1
- package/dist/workflow/workflow-loader.test.js +0 -354
- package/dist/workflow/workflow-loader.test.js.map +0 -1
- package/dist/workflow/workflow-migration.test.d.ts +0 -17
- package/dist/workflow/workflow-migration.test.d.ts.map +0 -1
- package/dist/workflow/workflow-migration.test.js +0 -371
- package/dist/workflow/workflow-migration.test.js.map +0 -1
- package/dist/workflow/workflow-permissions.d.ts.map +0 -1
- package/dist/workflow/workflow-permissions.js.map +0 -1
- package/dist/workflow/workflow-permissions.test.d.ts +0 -15
- package/dist/workflow/workflow-permissions.test.d.ts.map +0 -1
- package/dist/workflow/workflow-permissions.test.js +0 -301
- package/dist/workflow/workflow-permissions.test.js.map +0 -1
- package/dist/workflow/workflow-router.d.ts.map +0 -1
- package/dist/workflow/workflow-router.js.map +0 -1
- package/dist/workflow/workflow-router.test.d.ts +0 -20
- package/dist/workflow/workflow-router.test.d.ts.map +0 -1
- package/dist/workflow/workflow-router.test.js +0 -607
- package/dist/workflow/workflow-router.test.js.map +0 -1
- package/dist/workflow/workflow-schema.d.ts.map +0 -1
- package/dist/workflow/workflow-schema.js.map +0 -1
- package/dist/workflow/workflow-schema.test.d.ts +0 -45
- package/dist/workflow/workflow-schema.test.d.ts.map +0 -1
- package/dist/workflow/workflow-schema.test.js +0 -512
- package/dist/workflow/workflow-schema.test.js.map +0 -1
- package/dist/workflow/workflow-stepped-schema.test.d.ts +0 -18
- package/dist/workflow/workflow-stepped-schema.test.d.ts.map +0 -1
- package/dist/workflow/workflow-stepped-schema.test.js +0 -608
- package/dist/workflow/workflow-stepped-schema.test.js.map +0 -1
|
@@ -1,702 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BMAD Status Sync Tests - Story 32-6
|
|
3
|
-
*
|
|
4
|
-
* Tests for bidirectional sync between Pennyfarthing and BMAD sprint status.
|
|
5
|
-
*/
|
|
6
|
-
import { describe, it } from 'node:test';
|
|
7
|
-
import assert from 'node:assert';
|
|
8
|
-
import {
|
|
9
|
-
// Story ID conversion
|
|
10
|
-
bmadIdToPenny, pennyIdToBmad, isValidBmadStoryId, isValidPennyStoryId,
|
|
11
|
-
// Status mapping
|
|
12
|
-
mapBmadToPennyStatus, mapPennyToBmadStatus,
|
|
13
|
-
// AC1: Parse
|
|
14
|
-
parseBmadSprintStatus,
|
|
15
|
-
// AC2: Import
|
|
16
|
-
convertBmadStoryToPenny, importFromBmadStatus,
|
|
17
|
-
// AC3: Export
|
|
18
|
-
convertPennyStoryToBmad, exportToSprintStatus,
|
|
19
|
-
// AC5: Conflicts
|
|
20
|
-
detectConflicts, } from './status-sync.js';
|
|
21
|
-
// =============================================================================
|
|
22
|
-
// Test Fixtures
|
|
23
|
-
// =============================================================================
|
|
24
|
-
const VALID_BMAD_YAML = `
|
|
25
|
-
sprint:
|
|
26
|
-
number: 10
|
|
27
|
-
goal: "Complete user authentication"
|
|
28
|
-
start_date: 2024-01-15
|
|
29
|
-
end_date: 2024-01-26
|
|
30
|
-
|
|
31
|
-
stories:
|
|
32
|
-
- id: "1.1"
|
|
33
|
-
title: "Email/Password Login"
|
|
34
|
-
epic: "User Authentication"
|
|
35
|
-
status: done
|
|
36
|
-
assignee: "Alice Chen"
|
|
37
|
-
points: 5
|
|
38
|
-
priority: P0
|
|
39
|
-
started: 2024-01-15
|
|
40
|
-
completed: 2024-01-17
|
|
41
|
-
|
|
42
|
-
- id: "1.2"
|
|
43
|
-
title: "OAuth Integration"
|
|
44
|
-
status: in-progress
|
|
45
|
-
assignee: "Bob Smith"
|
|
46
|
-
points: 8
|
|
47
|
-
priority: P1
|
|
48
|
-
started: 2024-01-18
|
|
49
|
-
|
|
50
|
-
- id: "2.1"
|
|
51
|
-
title: "Edit Profile"
|
|
52
|
-
status: ready-for-dev
|
|
53
|
-
points: 3
|
|
54
|
-
priority: P1
|
|
55
|
-
|
|
56
|
-
metrics:
|
|
57
|
-
total_points: 16
|
|
58
|
-
completed_points: 5
|
|
59
|
-
in_progress_points: 8
|
|
60
|
-
`;
|
|
61
|
-
const BLOCKED_STORY_YAML = `
|
|
62
|
-
sprint:
|
|
63
|
-
number: 10
|
|
64
|
-
goal: "Test blocked status"
|
|
65
|
-
start_date: 2024-01-15
|
|
66
|
-
end_date: 2024-01-26
|
|
67
|
-
|
|
68
|
-
stories:
|
|
69
|
-
- id: "1.3"
|
|
70
|
-
title: "Password Reset Flow"
|
|
71
|
-
status: blocked
|
|
72
|
-
points: 3
|
|
73
|
-
priority: P1
|
|
74
|
-
blockers:
|
|
75
|
-
- "Waiting for email service"
|
|
76
|
-
- "Need API keys"
|
|
77
|
-
|
|
78
|
-
metrics:
|
|
79
|
-
total_points: 3
|
|
80
|
-
completed_points: 0
|
|
81
|
-
`;
|
|
82
|
-
const MINIMAL_BMAD_YAML = `
|
|
83
|
-
sprint:
|
|
84
|
-
number: 1
|
|
85
|
-
goal: "Minimal sprint"
|
|
86
|
-
start_date: 2024-01-01
|
|
87
|
-
end_date: 2024-01-14
|
|
88
|
-
|
|
89
|
-
stories:
|
|
90
|
-
- id: "1.1"
|
|
91
|
-
title: "Simple story"
|
|
92
|
-
status: ready-for-dev
|
|
93
|
-
points: 1
|
|
94
|
-
priority: P2
|
|
95
|
-
|
|
96
|
-
metrics:
|
|
97
|
-
total_points: 1
|
|
98
|
-
completed_points: 0
|
|
99
|
-
`;
|
|
100
|
-
// =============================================================================
|
|
101
|
-
// Story ID Conversion Tests
|
|
102
|
-
// =============================================================================
|
|
103
|
-
describe('Story ID Conversion', () => {
|
|
104
|
-
describe('bmadIdToPenny', () => {
|
|
105
|
-
it('converts single dot to dash', () => {
|
|
106
|
-
assert.strictEqual(bmadIdToPenny('1.1'), '1-1');
|
|
107
|
-
});
|
|
108
|
-
it('converts multiple dots to dashes', () => {
|
|
109
|
-
assert.strictEqual(bmadIdToPenny('32.6'), '32-6');
|
|
110
|
-
});
|
|
111
|
-
it('handles larger numbers', () => {
|
|
112
|
-
assert.strictEqual(bmadIdToPenny('100.99'), '100-99');
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
describe('pennyIdToBmad', () => {
|
|
116
|
-
it('converts single dash to dot', () => {
|
|
117
|
-
assert.strictEqual(pennyIdToBmad('1-1'), '1.1');
|
|
118
|
-
});
|
|
119
|
-
it('converts multiple dashes to dots', () => {
|
|
120
|
-
assert.strictEqual(pennyIdToBmad('32-6'), '32.6');
|
|
121
|
-
});
|
|
122
|
-
it('handles larger numbers', () => {
|
|
123
|
-
assert.strictEqual(pennyIdToBmad('100-99'), '100.99');
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
describe('isValidBmadStoryId', () => {
|
|
127
|
-
it('returns true for valid dot notation', () => {
|
|
128
|
-
assert.strictEqual(isValidBmadStoryId('1.1'), true);
|
|
129
|
-
assert.strictEqual(isValidBmadStoryId('32.6'), true);
|
|
130
|
-
assert.strictEqual(isValidBmadStoryId('100.99'), true);
|
|
131
|
-
});
|
|
132
|
-
it('returns false for dash notation', () => {
|
|
133
|
-
assert.strictEqual(isValidBmadStoryId('1-1'), false);
|
|
134
|
-
});
|
|
135
|
-
it('returns false for invalid formats', () => {
|
|
136
|
-
assert.strictEqual(isValidBmadStoryId('1'), false);
|
|
137
|
-
assert.strictEqual(isValidBmadStoryId('1.'), false);
|
|
138
|
-
assert.strictEqual(isValidBmadStoryId('.1'), false);
|
|
139
|
-
assert.strictEqual(isValidBmadStoryId('a.b'), false);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
describe('isValidPennyStoryId', () => {
|
|
143
|
-
it('returns true for valid dash notation', () => {
|
|
144
|
-
assert.strictEqual(isValidPennyStoryId('1-1'), true);
|
|
145
|
-
assert.strictEqual(isValidPennyStoryId('32-6'), true);
|
|
146
|
-
assert.strictEqual(isValidPennyStoryId('100-99'), true);
|
|
147
|
-
});
|
|
148
|
-
it('returns false for dot notation', () => {
|
|
149
|
-
assert.strictEqual(isValidPennyStoryId('1.1'), false);
|
|
150
|
-
});
|
|
151
|
-
it('returns false for invalid formats', () => {
|
|
152
|
-
assert.strictEqual(isValidPennyStoryId('1'), false);
|
|
153
|
-
assert.strictEqual(isValidPennyStoryId('1-'), false);
|
|
154
|
-
assert.strictEqual(isValidPennyStoryId('-1'), false);
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
// =============================================================================
|
|
159
|
-
// AC4: Status Mapping Tests
|
|
160
|
-
// =============================================================================
|
|
161
|
-
describe('AC4: Status Mapping', () => {
|
|
162
|
-
describe('mapBmadToPennyStatus', () => {
|
|
163
|
-
it('maps ready-for-dev to backlog', () => {
|
|
164
|
-
assert.strictEqual(mapBmadToPennyStatus('ready-for-dev'), 'backlog');
|
|
165
|
-
});
|
|
166
|
-
it('maps in-progress to in_progress', () => {
|
|
167
|
-
assert.strictEqual(mapBmadToPennyStatus('in-progress'), 'in_progress');
|
|
168
|
-
});
|
|
169
|
-
it('maps review to needs_review', () => {
|
|
170
|
-
assert.strictEqual(mapBmadToPennyStatus('review'), 'needs_review');
|
|
171
|
-
});
|
|
172
|
-
it('maps done to done', () => {
|
|
173
|
-
assert.strictEqual(mapBmadToPennyStatus('done'), 'done');
|
|
174
|
-
});
|
|
175
|
-
it('maps blocked to backlog', () => {
|
|
176
|
-
assert.strictEqual(mapBmadToPennyStatus('blocked'), 'backlog');
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
describe('mapPennyToBmadStatus', () => {
|
|
180
|
-
it('maps backlog to ready-for-dev', () => {
|
|
181
|
-
assert.strictEqual(mapPennyToBmadStatus('backlog'), 'ready-for-dev');
|
|
182
|
-
});
|
|
183
|
-
it('maps in_progress to in-progress', () => {
|
|
184
|
-
assert.strictEqual(mapPennyToBmadStatus('in_progress'), 'in-progress');
|
|
185
|
-
});
|
|
186
|
-
it('maps needs_review to review', () => {
|
|
187
|
-
assert.strictEqual(mapPennyToBmadStatus('needs_review'), 'review');
|
|
188
|
-
});
|
|
189
|
-
it('maps approved to review', () => {
|
|
190
|
-
assert.strictEqual(mapPennyToBmadStatus('approved'), 'review');
|
|
191
|
-
});
|
|
192
|
-
it('maps done to done', () => {
|
|
193
|
-
assert.strictEqual(mapPennyToBmadStatus('done'), 'done');
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
describe('round-trip mapping', () => {
|
|
197
|
-
it('backlog round-trips correctly', () => {
|
|
198
|
-
const penny = 'backlog';
|
|
199
|
-
const bmad = mapPennyToBmadStatus(penny);
|
|
200
|
-
const back = mapBmadToPennyStatus(bmad);
|
|
201
|
-
assert.strictEqual(back, penny);
|
|
202
|
-
});
|
|
203
|
-
it('in_progress round-trips correctly', () => {
|
|
204
|
-
const penny = 'in_progress';
|
|
205
|
-
const bmad = mapPennyToBmadStatus(penny);
|
|
206
|
-
const back = mapBmadToPennyStatus(bmad);
|
|
207
|
-
assert.strictEqual(back, penny);
|
|
208
|
-
});
|
|
209
|
-
it('done round-trips correctly', () => {
|
|
210
|
-
const penny = 'done';
|
|
211
|
-
const bmad = mapPennyToBmadStatus(penny);
|
|
212
|
-
const back = mapBmadToPennyStatus(bmad);
|
|
213
|
-
assert.strictEqual(back, penny);
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
// =============================================================================
|
|
218
|
-
// AC1: Parse BMAD Sprint Status Tests
|
|
219
|
-
// =============================================================================
|
|
220
|
-
describe('AC1: parseBmadSprintStatus', () => {
|
|
221
|
-
it('parses valid BMAD sprint status YAML', () => {
|
|
222
|
-
const result = parseBmadSprintStatus(VALID_BMAD_YAML);
|
|
223
|
-
assert.strictEqual(result.success, true);
|
|
224
|
-
assert.ok(result.data);
|
|
225
|
-
assert.strictEqual(result.data.sprint.number, 10);
|
|
226
|
-
assert.strictEqual(result.data.sprint.goal, 'Complete user authentication');
|
|
227
|
-
assert.strictEqual(result.data.stories.length, 3);
|
|
228
|
-
});
|
|
229
|
-
it('parses story fields correctly', () => {
|
|
230
|
-
const result = parseBmadSprintStatus(VALID_BMAD_YAML);
|
|
231
|
-
assert.ok(result.data);
|
|
232
|
-
const story = result.data.stories[0];
|
|
233
|
-
assert.strictEqual(story.id, '1.1');
|
|
234
|
-
assert.strictEqual(story.title, 'Email/Password Login');
|
|
235
|
-
assert.strictEqual(story.epic, 'User Authentication');
|
|
236
|
-
assert.strictEqual(story.status, 'done');
|
|
237
|
-
assert.strictEqual(story.assignee, 'Alice Chen');
|
|
238
|
-
assert.strictEqual(story.points, 5);
|
|
239
|
-
assert.strictEqual(story.priority, 'P0');
|
|
240
|
-
assert.strictEqual(story.started, '2024-01-15');
|
|
241
|
-
assert.strictEqual(story.completed, '2024-01-17');
|
|
242
|
-
});
|
|
243
|
-
it('parses metrics correctly', () => {
|
|
244
|
-
const result = parseBmadSprintStatus(VALID_BMAD_YAML);
|
|
245
|
-
assert.ok(result.data);
|
|
246
|
-
assert.strictEqual(result.data.metrics.total_points, 16);
|
|
247
|
-
assert.strictEqual(result.data.metrics.completed_points, 5);
|
|
248
|
-
assert.strictEqual(result.data.metrics.in_progress_points, 8);
|
|
249
|
-
});
|
|
250
|
-
it('handles minimal valid YAML', () => {
|
|
251
|
-
const result = parseBmadSprintStatus(MINIMAL_BMAD_YAML);
|
|
252
|
-
assert.strictEqual(result.success, true);
|
|
253
|
-
assert.ok(result.data);
|
|
254
|
-
assert.strictEqual(result.data.stories.length, 1);
|
|
255
|
-
});
|
|
256
|
-
it('handles blocked stories with blockers array', () => {
|
|
257
|
-
const result = parseBmadSprintStatus(BLOCKED_STORY_YAML);
|
|
258
|
-
assert.strictEqual(result.success, true);
|
|
259
|
-
assert.ok(result.data);
|
|
260
|
-
const story = result.data.stories[0];
|
|
261
|
-
assert.strictEqual(story.status, 'blocked');
|
|
262
|
-
assert.ok(story.blockers);
|
|
263
|
-
assert.strictEqual(story.blockers.length, 2);
|
|
264
|
-
assert.strictEqual(story.blockers[0], 'Waiting for email service');
|
|
265
|
-
});
|
|
266
|
-
it('returns errors for invalid YAML', () => {
|
|
267
|
-
const result = parseBmadSprintStatus('not: valid: yaml: {{');
|
|
268
|
-
assert.strictEqual(result.success, false);
|
|
269
|
-
assert.ok(result.errors);
|
|
270
|
-
assert.ok(result.errors.some((e) => e.field === 'yaml'));
|
|
271
|
-
});
|
|
272
|
-
it('returns errors for missing sprint section', () => {
|
|
273
|
-
const yaml = `
|
|
274
|
-
stories:
|
|
275
|
-
- id: "1.1"
|
|
276
|
-
title: "Story"
|
|
277
|
-
status: done
|
|
278
|
-
points: 1
|
|
279
|
-
priority: P1
|
|
280
|
-
metrics:
|
|
281
|
-
total_points: 1
|
|
282
|
-
completed_points: 1
|
|
283
|
-
`;
|
|
284
|
-
const result = parseBmadSprintStatus(yaml);
|
|
285
|
-
assert.strictEqual(result.success, false);
|
|
286
|
-
assert.ok(result.errors);
|
|
287
|
-
assert.ok(result.errors.some((e) => e.field === 'sprint'));
|
|
288
|
-
});
|
|
289
|
-
it('returns errors for invalid story ID format', () => {
|
|
290
|
-
const yaml = `
|
|
291
|
-
sprint:
|
|
292
|
-
number: 1
|
|
293
|
-
goal: "Test"
|
|
294
|
-
start_date: 2024-01-01
|
|
295
|
-
end_date: 2024-01-14
|
|
296
|
-
stories:
|
|
297
|
-
- id: "invalid"
|
|
298
|
-
title: "Story"
|
|
299
|
-
status: done
|
|
300
|
-
points: 1
|
|
301
|
-
priority: P1
|
|
302
|
-
metrics:
|
|
303
|
-
total_points: 1
|
|
304
|
-
completed_points: 1
|
|
305
|
-
`;
|
|
306
|
-
const result = parseBmadSprintStatus(yaml);
|
|
307
|
-
assert.strictEqual(result.success, false);
|
|
308
|
-
assert.ok(result.errors);
|
|
309
|
-
assert.ok(result.errors.some((e) => e.message.includes('Invalid BMAD story ID')));
|
|
310
|
-
});
|
|
311
|
-
it('returns errors for invalid status', () => {
|
|
312
|
-
const yaml = `
|
|
313
|
-
sprint:
|
|
314
|
-
number: 1
|
|
315
|
-
goal: "Test"
|
|
316
|
-
start_date: 2024-01-01
|
|
317
|
-
end_date: 2024-01-14
|
|
318
|
-
stories:
|
|
319
|
-
- id: "1.1"
|
|
320
|
-
title: "Story"
|
|
321
|
-
status: invalid-status
|
|
322
|
-
points: 1
|
|
323
|
-
priority: P1
|
|
324
|
-
metrics:
|
|
325
|
-
total_points: 1
|
|
326
|
-
completed_points: 1
|
|
327
|
-
`;
|
|
328
|
-
const result = parseBmadSprintStatus(yaml);
|
|
329
|
-
assert.strictEqual(result.success, false);
|
|
330
|
-
assert.ok(result.errors);
|
|
331
|
-
assert.ok(result.errors.some((e) => e.message.includes('Invalid status')));
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
// =============================================================================
|
|
335
|
-
// AC2: Import BMAD to Pennyfarthing Tests
|
|
336
|
-
// =============================================================================
|
|
337
|
-
describe('AC2: Import BMAD to Pennyfarthing', () => {
|
|
338
|
-
describe('convertBmadStoryToPenny', () => {
|
|
339
|
-
it('converts story ID from dot to dash notation', () => {
|
|
340
|
-
const bmad = {
|
|
341
|
-
id: '32.6',
|
|
342
|
-
title: 'Test Story',
|
|
343
|
-
status: 'ready-for-dev',
|
|
344
|
-
points: 2,
|
|
345
|
-
priority: 'P1',
|
|
346
|
-
};
|
|
347
|
-
const penny = convertBmadStoryToPenny(bmad);
|
|
348
|
-
assert.strictEqual(penny.id, '32-6');
|
|
349
|
-
});
|
|
350
|
-
it('maps status correctly', () => {
|
|
351
|
-
const bmad = {
|
|
352
|
-
id: '1.1',
|
|
353
|
-
title: 'Test',
|
|
354
|
-
status: 'in-progress',
|
|
355
|
-
points: 3,
|
|
356
|
-
priority: 'P0',
|
|
357
|
-
};
|
|
358
|
-
const penny = convertBmadStoryToPenny(bmad);
|
|
359
|
-
assert.strictEqual(penny.status, 'in_progress');
|
|
360
|
-
});
|
|
361
|
-
it('preserves optional fields', () => {
|
|
362
|
-
const bmad = {
|
|
363
|
-
id: '1.1',
|
|
364
|
-
title: 'Test',
|
|
365
|
-
status: 'done',
|
|
366
|
-
points: 5,
|
|
367
|
-
priority: 'P0',
|
|
368
|
-
assignee: 'Alice',
|
|
369
|
-
started: '2024-01-15',
|
|
370
|
-
completed: '2024-01-17',
|
|
371
|
-
};
|
|
372
|
-
const penny = convertBmadStoryToPenny(bmad);
|
|
373
|
-
assert.strictEqual(penny.assigned_to, 'Alice');
|
|
374
|
-
assert.strictEqual(penny.started, '2024-01-15');
|
|
375
|
-
assert.strictEqual(penny.completed, '2024-01-17');
|
|
376
|
-
});
|
|
377
|
-
it('converts blocked status with blockers to blocked_reason', () => {
|
|
378
|
-
const bmad = {
|
|
379
|
-
id: '1.3',
|
|
380
|
-
title: 'Blocked Story',
|
|
381
|
-
status: 'blocked',
|
|
382
|
-
points: 3,
|
|
383
|
-
priority: 'P1',
|
|
384
|
-
blockers: ['Reason 1', 'Reason 2'],
|
|
385
|
-
};
|
|
386
|
-
const penny = convertBmadStoryToPenny(bmad);
|
|
387
|
-
assert.strictEqual(penny.status, 'backlog');
|
|
388
|
-
assert.strictEqual(penny.blocked_reason, 'Reason 1; Reason 2');
|
|
389
|
-
});
|
|
390
|
-
});
|
|
391
|
-
describe('importFromBmadStatus', () => {
|
|
392
|
-
it('updates existing stories', () => {
|
|
393
|
-
const bmadStatus = {
|
|
394
|
-
sprint: { number: 10, goal: 'Test', start_date: '2024-01-01', end_date: '2024-01-14' },
|
|
395
|
-
stories: [
|
|
396
|
-
{ id: '1.1', title: 'Updated Story', status: 'done', points: 3, priority: 'P1' },
|
|
397
|
-
],
|
|
398
|
-
metrics: { total_points: 3, completed_points: 3 },
|
|
399
|
-
};
|
|
400
|
-
const existing = [
|
|
401
|
-
{ id: '1-1', title: 'Original Story', status: 'in_progress', points: 3, priority: 'P1' },
|
|
402
|
-
];
|
|
403
|
-
const result = importFromBmadStatus(bmadStatus, existing);
|
|
404
|
-
assert.strictEqual(result.success, true);
|
|
405
|
-
assert.ok(result.updatedStories);
|
|
406
|
-
assert.ok(result.updatedStories.some((u) => u.id === '1-1' && u.field === 'status'));
|
|
407
|
-
});
|
|
408
|
-
it('adds new stories from BMAD', () => {
|
|
409
|
-
const bmadStatus = {
|
|
410
|
-
sprint: { number: 10, goal: 'Test', start_date: '2024-01-01', end_date: '2024-01-14' },
|
|
411
|
-
stories: [
|
|
412
|
-
{ id: '2.1', title: 'New Story', status: 'ready-for-dev', points: 2, priority: 'P2' },
|
|
413
|
-
],
|
|
414
|
-
metrics: { total_points: 2, completed_points: 0 },
|
|
415
|
-
};
|
|
416
|
-
const existing = [];
|
|
417
|
-
const result = importFromBmadStatus(bmadStatus, existing);
|
|
418
|
-
assert.strictEqual(result.success, true);
|
|
419
|
-
assert.ok(result.updatedStories);
|
|
420
|
-
assert.ok(result.updatedStories.some((u) => u.id === '2-1' && u.field === '_new'));
|
|
421
|
-
});
|
|
422
|
-
it('tracks all field changes', () => {
|
|
423
|
-
const bmadStatus = {
|
|
424
|
-
sprint: { number: 10, goal: 'Test', start_date: '2024-01-01', end_date: '2024-01-14' },
|
|
425
|
-
stories: [
|
|
426
|
-
{
|
|
427
|
-
id: '1.1',
|
|
428
|
-
title: 'Story',
|
|
429
|
-
status: 'done',
|
|
430
|
-
points: 3,
|
|
431
|
-
priority: 'P1',
|
|
432
|
-
assignee: 'New Person',
|
|
433
|
-
completed: '2024-01-20',
|
|
434
|
-
},
|
|
435
|
-
],
|
|
436
|
-
metrics: { total_points: 3, completed_points: 3 },
|
|
437
|
-
};
|
|
438
|
-
const existing = [
|
|
439
|
-
{
|
|
440
|
-
id: '1-1',
|
|
441
|
-
title: 'Story',
|
|
442
|
-
status: 'in_progress',
|
|
443
|
-
points: 3,
|
|
444
|
-
priority: 'P1',
|
|
445
|
-
assigned_to: 'Old Person',
|
|
446
|
-
},
|
|
447
|
-
];
|
|
448
|
-
const result = importFromBmadStatus(bmadStatus, existing);
|
|
449
|
-
assert.strictEqual(result.success, true);
|
|
450
|
-
assert.ok(result.updatedStories);
|
|
451
|
-
const statusUpdate = result.updatedStories.find((u) => u.field === 'status');
|
|
452
|
-
assert.ok(statusUpdate);
|
|
453
|
-
assert.strictEqual(statusUpdate.oldValue, 'in_progress');
|
|
454
|
-
assert.strictEqual(statusUpdate.newValue, 'done');
|
|
455
|
-
const assigneeUpdate = result.updatedStories.find((u) => u.field === 'assigned_to');
|
|
456
|
-
assert.ok(assigneeUpdate);
|
|
457
|
-
assert.strictEqual(assigneeUpdate.oldValue, 'Old Person');
|
|
458
|
-
assert.strictEqual(assigneeUpdate.newValue, 'New Person');
|
|
459
|
-
});
|
|
460
|
-
});
|
|
461
|
-
});
|
|
462
|
-
// =============================================================================
|
|
463
|
-
// AC3: Export Pennyfarthing to BMAD Tests
|
|
464
|
-
// =============================================================================
|
|
465
|
-
describe('AC3: Export Pennyfarthing to BMAD', () => {
|
|
466
|
-
describe('convertPennyStoryToBmad', () => {
|
|
467
|
-
it('converts story ID from dash to dot notation', () => {
|
|
468
|
-
const penny = {
|
|
469
|
-
id: '32-6',
|
|
470
|
-
title: 'Test Story',
|
|
471
|
-
status: 'backlog',
|
|
472
|
-
points: 2,
|
|
473
|
-
priority: 'P1',
|
|
474
|
-
};
|
|
475
|
-
const bmad = convertPennyStoryToBmad(penny);
|
|
476
|
-
assert.strictEqual(bmad.id, '32.6');
|
|
477
|
-
});
|
|
478
|
-
it('maps status correctly', () => {
|
|
479
|
-
const penny = {
|
|
480
|
-
id: '1-1',
|
|
481
|
-
title: 'Test',
|
|
482
|
-
status: 'in_progress',
|
|
483
|
-
points: 3,
|
|
484
|
-
priority: 'P0',
|
|
485
|
-
};
|
|
486
|
-
const bmad = convertPennyStoryToBmad(penny);
|
|
487
|
-
assert.strictEqual(bmad.status, 'in-progress');
|
|
488
|
-
});
|
|
489
|
-
it('maps approved to review', () => {
|
|
490
|
-
const penny = {
|
|
491
|
-
id: '1-1',
|
|
492
|
-
title: 'Test',
|
|
493
|
-
status: 'approved',
|
|
494
|
-
points: 3,
|
|
495
|
-
priority: 'P0',
|
|
496
|
-
};
|
|
497
|
-
const bmad = convertPennyStoryToBmad(penny);
|
|
498
|
-
assert.strictEqual(bmad.status, 'review');
|
|
499
|
-
});
|
|
500
|
-
it('converts blocked_reason to blockers array and blocked status', () => {
|
|
501
|
-
const penny = {
|
|
502
|
-
id: '1-3',
|
|
503
|
-
title: 'Blocked Story',
|
|
504
|
-
status: 'backlog',
|
|
505
|
-
points: 3,
|
|
506
|
-
priority: 'P1',
|
|
507
|
-
blocked_reason: 'Waiting for dependency',
|
|
508
|
-
};
|
|
509
|
-
const bmad = convertPennyStoryToBmad(penny);
|
|
510
|
-
assert.strictEqual(bmad.status, 'blocked');
|
|
511
|
-
assert.ok(bmad.blockers);
|
|
512
|
-
assert.strictEqual(bmad.blockers[0], 'Waiting for dependency');
|
|
513
|
-
});
|
|
514
|
-
it('preserves optional fields', () => {
|
|
515
|
-
const penny = {
|
|
516
|
-
id: '1-1',
|
|
517
|
-
title: 'Test',
|
|
518
|
-
status: 'done',
|
|
519
|
-
points: 5,
|
|
520
|
-
priority: 'P0',
|
|
521
|
-
assigned_to: 'Alice',
|
|
522
|
-
started: '2024-01-15',
|
|
523
|
-
completed: '2024-01-17',
|
|
524
|
-
};
|
|
525
|
-
const bmad = convertPennyStoryToBmad(penny);
|
|
526
|
-
assert.strictEqual(bmad.assignee, 'Alice');
|
|
527
|
-
assert.strictEqual(bmad.started, '2024-01-15');
|
|
528
|
-
assert.strictEqual(bmad.completed, '2024-01-17');
|
|
529
|
-
});
|
|
530
|
-
});
|
|
531
|
-
describe('exportToSprintStatus', () => {
|
|
532
|
-
it('exports valid YAML', () => {
|
|
533
|
-
const sprintInfo = {
|
|
534
|
-
number: 10,
|
|
535
|
-
goal: 'Test sprint',
|
|
536
|
-
start_date: '2024-01-15',
|
|
537
|
-
end_date: '2024-01-26',
|
|
538
|
-
};
|
|
539
|
-
const stories = [
|
|
540
|
-
{ id: '1-1', title: 'Story 1', status: 'done', points: 5, priority: 'P0' },
|
|
541
|
-
{ id: '1-2', title: 'Story 2', status: 'in_progress', points: 3, priority: 'P1' },
|
|
542
|
-
];
|
|
543
|
-
const result = exportToSprintStatus(sprintInfo, stories);
|
|
544
|
-
assert.strictEqual(result.success, true);
|
|
545
|
-
assert.ok(result.yaml);
|
|
546
|
-
assert.ok(result.yaml.includes('number: 10'));
|
|
547
|
-
assert.ok(result.yaml.includes('goal: Test sprint'));
|
|
548
|
-
});
|
|
549
|
-
it('calculates metrics correctly', () => {
|
|
550
|
-
const sprintInfo = {
|
|
551
|
-
number: 10,
|
|
552
|
-
goal: 'Test',
|
|
553
|
-
start_date: '2024-01-15',
|
|
554
|
-
end_date: '2024-01-26',
|
|
555
|
-
};
|
|
556
|
-
const stories = [
|
|
557
|
-
{ id: '1-1', title: 'Done', status: 'done', points: 5, priority: 'P0' },
|
|
558
|
-
{ id: '1-2', title: 'In Progress', status: 'in_progress', points: 3, priority: 'P1' },
|
|
559
|
-
{ id: '1-3', title: 'Backlog', status: 'backlog', points: 2, priority: 'P2' },
|
|
560
|
-
];
|
|
561
|
-
const result = exportToSprintStatus(sprintInfo, stories);
|
|
562
|
-
assert.strictEqual(result.success, true);
|
|
563
|
-
assert.ok(result.yaml);
|
|
564
|
-
assert.ok(result.yaml.includes('total_points: 10'));
|
|
565
|
-
assert.ok(result.yaml.includes('completed_points: 5'));
|
|
566
|
-
assert.ok(result.yaml.includes('in_progress_points: 3'));
|
|
567
|
-
});
|
|
568
|
-
it('converts story IDs to dot notation', () => {
|
|
569
|
-
const sprintInfo = {
|
|
570
|
-
number: 10,
|
|
571
|
-
goal: 'Test',
|
|
572
|
-
start_date: '2024-01-15',
|
|
573
|
-
end_date: '2024-01-26',
|
|
574
|
-
};
|
|
575
|
-
const stories = [
|
|
576
|
-
{ id: '32-6', title: 'Story', status: 'backlog', points: 2, priority: 'P1' },
|
|
577
|
-
];
|
|
578
|
-
const result = exportToSprintStatus(sprintInfo, stories);
|
|
579
|
-
assert.strictEqual(result.success, true);
|
|
580
|
-
assert.ok(result.yaml);
|
|
581
|
-
assert.ok(result.yaml.includes('id: "32.6"') || result.yaml.includes("id: '32.6'") || result.yaml.includes('id: 32.6'));
|
|
582
|
-
});
|
|
583
|
-
it('returns errors for missing sprint info', () => {
|
|
584
|
-
const sprintInfo = {
|
|
585
|
-
number: 10,
|
|
586
|
-
goal: '',
|
|
587
|
-
start_date: '',
|
|
588
|
-
end_date: '',
|
|
589
|
-
};
|
|
590
|
-
const result = exportToSprintStatus(sprintInfo, []);
|
|
591
|
-
assert.strictEqual(result.success, false);
|
|
592
|
-
assert.ok(result.errors);
|
|
593
|
-
assert.ok(result.errors.length >= 2);
|
|
594
|
-
});
|
|
595
|
-
});
|
|
596
|
-
});
|
|
597
|
-
// =============================================================================
|
|
598
|
-
// AC5: Conflict Detection Tests
|
|
599
|
-
// =============================================================================
|
|
600
|
-
describe('AC5: Conflict Detection', () => {
|
|
601
|
-
it('detects no conflicts when statuses match mapping', () => {
|
|
602
|
-
const bmadStories = [
|
|
603
|
-
{ id: '1.1', title: 'Story', status: 'in-progress', points: 3, priority: 'P1' },
|
|
604
|
-
];
|
|
605
|
-
const pennyStories = [
|
|
606
|
-
{ id: '1-1', title: 'Story', status: 'in_progress', points: 3, priority: 'P1' },
|
|
607
|
-
];
|
|
608
|
-
const result = detectConflicts(bmadStories, pennyStories);
|
|
609
|
-
assert.strictEqual(result.hasConflicts, false);
|
|
610
|
-
assert.strictEqual(result.conflicts.length, 0);
|
|
611
|
-
});
|
|
612
|
-
it('detects status conflicts', () => {
|
|
613
|
-
const bmadStories = [
|
|
614
|
-
{ id: '1.1', title: 'Story', status: 'done', points: 3, priority: 'P1' },
|
|
615
|
-
];
|
|
616
|
-
const pennyStories = [
|
|
617
|
-
{ id: '1-1', title: 'Story', status: 'in_progress', points: 3, priority: 'P1' },
|
|
618
|
-
];
|
|
619
|
-
const result = detectConflicts(bmadStories, pennyStories);
|
|
620
|
-
assert.strictEqual(result.hasConflicts, true);
|
|
621
|
-
assert.strictEqual(result.conflicts.length, 1);
|
|
622
|
-
assert.strictEqual(result.conflicts[0].field, 'status');
|
|
623
|
-
assert.strictEqual(result.conflicts[0].bmadValue, 'done');
|
|
624
|
-
assert.strictEqual(result.conflicts[0].pennyValue, 'in_progress');
|
|
625
|
-
});
|
|
626
|
-
it('detects assignee conflicts', () => {
|
|
627
|
-
const bmadStories = [
|
|
628
|
-
{ id: '1.1', title: 'Story', status: 'in-progress', points: 3, priority: 'P1', assignee: 'Alice' },
|
|
629
|
-
];
|
|
630
|
-
const pennyStories = [
|
|
631
|
-
{ id: '1-1', title: 'Story', status: 'in_progress', points: 3, priority: 'P1', assigned_to: 'Bob' },
|
|
632
|
-
];
|
|
633
|
-
const result = detectConflicts(bmadStories, pennyStories);
|
|
634
|
-
assert.strictEqual(result.hasConflicts, true);
|
|
635
|
-
assert.ok(result.conflicts.some((c) => c.field === 'assignee'));
|
|
636
|
-
});
|
|
637
|
-
it('detects completion date conflicts', () => {
|
|
638
|
-
const bmadStories = [
|
|
639
|
-
{ id: '1.1', title: 'Story', status: 'done', points: 3, priority: 'P1', completed: '2024-01-20' },
|
|
640
|
-
];
|
|
641
|
-
const pennyStories = [
|
|
642
|
-
{ id: '1-1', title: 'Story', status: 'done', points: 3, priority: 'P1', completed: '2024-01-21' },
|
|
643
|
-
];
|
|
644
|
-
const result = detectConflicts(bmadStories, pennyStories);
|
|
645
|
-
assert.strictEqual(result.hasConflicts, true);
|
|
646
|
-
assert.ok(result.conflicts.some((c) => c.field === 'completed'));
|
|
647
|
-
});
|
|
648
|
-
it('ignores stories only in one system', () => {
|
|
649
|
-
const bmadStories = [
|
|
650
|
-
{ id: '1.1', title: 'BMAD Only', status: 'ready-for-dev', points: 3, priority: 'P1' },
|
|
651
|
-
];
|
|
652
|
-
const pennyStories = [
|
|
653
|
-
{ id: '2-1', title: 'Penny Only', status: 'backlog', points: 2, priority: 'P2' },
|
|
654
|
-
];
|
|
655
|
-
const result = detectConflicts(bmadStories, pennyStories);
|
|
656
|
-
assert.strictEqual(result.hasConflicts, false);
|
|
657
|
-
});
|
|
658
|
-
it('detects multiple conflicts across stories', () => {
|
|
659
|
-
const bmadStories = [
|
|
660
|
-
{ id: '1.1', title: 'Story 1', status: 'done', points: 3, priority: 'P1' },
|
|
661
|
-
{ id: '1.2', title: 'Story 2', status: 'review', points: 2, priority: 'P1', assignee: 'Alice' },
|
|
662
|
-
];
|
|
663
|
-
const pennyStories = [
|
|
664
|
-
{ id: '1-1', title: 'Story 1', status: 'in_progress', points: 3, priority: 'P1' },
|
|
665
|
-
{ id: '1-2', title: 'Story 2', status: 'in_progress', points: 2, priority: 'P1', assigned_to: 'Bob' },
|
|
666
|
-
];
|
|
667
|
-
const result = detectConflicts(bmadStories, pennyStories);
|
|
668
|
-
assert.strictEqual(result.hasConflicts, true);
|
|
669
|
-
assert.ok(result.conflicts.length >= 2);
|
|
670
|
-
});
|
|
671
|
-
});
|
|
672
|
-
// =============================================================================
|
|
673
|
-
// Round-Trip Tests
|
|
674
|
-
// =============================================================================
|
|
675
|
-
describe('Round-trip: Export → Parse', () => {
|
|
676
|
-
it('exported YAML can be parsed back', () => {
|
|
677
|
-
const sprintInfo = {
|
|
678
|
-
number: 10,
|
|
679
|
-
goal: 'Test sprint',
|
|
680
|
-
start_date: '2024-01-15',
|
|
681
|
-
end_date: '2024-01-26',
|
|
682
|
-
};
|
|
683
|
-
const stories = [
|
|
684
|
-
{ id: '1-1', title: 'Story One', status: 'done', points: 5, priority: 'P0', assigned_to: 'Alice', completed: '2024-01-17' },
|
|
685
|
-
{ id: '1-2', title: 'Story Two', status: 'in_progress', points: 3, priority: 'P1', assigned_to: 'Bob', started: '2024-01-18' },
|
|
686
|
-
];
|
|
687
|
-
const exportResult = exportToSprintStatus(sprintInfo, stories);
|
|
688
|
-
assert.strictEqual(exportResult.success, true);
|
|
689
|
-
assert.ok(exportResult.yaml);
|
|
690
|
-
const parseResult = parseBmadSprintStatus(exportResult.yaml);
|
|
691
|
-
assert.strictEqual(parseResult.success, true);
|
|
692
|
-
assert.ok(parseResult.data);
|
|
693
|
-
// Verify data integrity
|
|
694
|
-
assert.strictEqual(parseResult.data.sprint.number, 10);
|
|
695
|
-
assert.strictEqual(parseResult.data.stories.length, 2);
|
|
696
|
-
assert.strictEqual(parseResult.data.stories[0].id, '1.1');
|
|
697
|
-
assert.strictEqual(parseResult.data.stories[0].status, 'done');
|
|
698
|
-
assert.strictEqual(parseResult.data.metrics.total_points, 8);
|
|
699
|
-
assert.strictEqual(parseResult.data.metrics.completed_points, 5);
|
|
700
|
-
});
|
|
701
|
-
});
|
|
702
|
-
//# sourceMappingURL=status-sync.test.js.map
|