Browse Source

📝 docs(story): update payment package test plan

- 修改Task 5标题为"迁移和实现测试套件"
- 添加现有测试文件迁移任务及子项
- 移除重复的PaymentService单元测试任务
- 添加"现有测试文件迁移"章节说明
- 更新Change Log,添加版本1.1记录
yourname 3 weeks ago
parent
commit
103eadd98b
1 changed files with 11 additions and 3 deletions
  1. 11 3
      docs/stories/005.004.mini-payment-package.story.md

+ 11 - 3
docs/stories/005.004.mini-payment-package.story.md

@@ -46,10 +46,12 @@ Draft
   - [ ] 集成用户 OpenID 管理
   - [ ] 确保与现有用户实体的兼容性
 
-- [ ] Task 5: 实现测试套件 (AC: 7)
-  - [ ] 编写 PaymentService 单元测试
+- [ ] Task 5: 迁移和实现测试套件 (AC: 7)
+  - [ ] 迁移现有集成测试文件:
+    - [ ] mini-auth-demo/web/tests/integration/server/api/payment/callback/post.test.ts
+    - [ ] mini-auth-demo/web/tests/integration/server/payment.integration.test.ts
+  - [ ] 适配迁移的测试文件到新包结构
   - [ ] 编写支付路由集成测试
-  - [ ] 编写支付回调处理测试
   - [ ] 验证测试覆盖率满足要求
 
 - [ ] Task 6: 更新 server package 依赖 (AC: 8)
@@ -109,10 +111,16 @@ Draft
 - 支付状态流转测试
 - 错误处理和异常场景测试
 
+#### 现有测试文件迁移
+- **支付回调集成测试**: mini-auth-demo/web/tests/integration/server/api/payment/callback/post.test.ts
+- **支付功能集成测试**: mini-auth-demo/web/tests/integration/server/payment.integration.test.ts
+- **说明**: 由于已有完整的集成测试覆盖,无需重复编写PaymentService单元测试
+
 ## Change Log
 
 | Date | Version | Description | Author |
 |------|---------|-------------|---------|
+| 2025-11-11 | 1.1 | 添加现有测试文件迁移任务,优化测试策略 | Bob (Scrum Master) |
 | 2025-11-11 | 1.0 | 创建小程序支付模块故事文档 | Bob (Scrum Master) |
 
 ## Dev Agent Record