Draft
As a 测试工程师 I want 残疾人管理的新增和编辑功能的集成测试能够覆盖完整流程 so that 确保相关功能的质量和稳定性
allin-packages/disability-person-management-ui/tests/integration/disability-person.integration.test.tsxcreateAggregatedDisabledPerson和updateAggregatedDisabledPersonallin-packages/disability-person-management-ui/tests/integration/disability-person.integration.test.tsx [Source: docs/prd/epic-010-system-bug-fixes.md#技术说明]allin-packages/目录下,测试文件与源码并列在tests/目录中 [Source: architecture/source-tree.md#集成指南]基于架构文档中的测试用例编写规范,必须遵循以下原则:
根据残疾人管理模块移植故事,实际使用的API端点包括:
POST /disability-persons/aggregated/create - 创建聚合残疾人信息 [Source: docs/stories/007.004.transplant-disability-management-module.story.md#API端点]GET /disability-persons/aggregated/:personId - 查询聚合残疾人信息 [Source: docs/stories/007.004.transplant-disability-management-module.story.md#API端点]POST /disability-persons - 创建残疾人基本信息GET /disability-persons/:id - 根据ID获取残疾人信息GET /disability-persons - 获取所有残疾人信息(分页+条件查询)PUT /disability-persons/:id - 更新残疾人信息DELETE /disability-persons/:id - 删除残疾人信息注意: 当前测试文件mock了createDisabledPerson和updateDisabledPerson,但实际UI组件可能使用聚合API createAggregatedDisabledPerson和updateAggregatedDisabledPerson,需要检查并修正。
残疾人管理涉及多个关联实体:
DisabledPerson - 残疾人基本信息DisabledBankCard - 银行卡信息DisabledPhoto - 照片信息(通过fileId引用File实体)DisabledRemark - 备注信息DisabledVisit - 回访记录信息聚合API返回包含所有关联数据的完整结构。
@d8d/file-management-ui的FileSelector组件@d8d/area-management-ui的区域选择器组件(省份→城市→区县三级联动)@d8d/allin-enums包中的残疾类型、残疾等级等枚举故事010.006(修复省信息编辑功能)的经验:
parentId转换错误(null || 0导致验证失败)这些经验表明在修复测试时需要注意数据转换和实际值使用。
| Date | Version | Description | Author |
|---|---|---|---|
| 2025-12-12 | 1.0 | 故事创建,基于史诗010-07需求 | Bob (Scrum Master) |
This section will be populated by the development agent during implementation
This section will be populated by the development agent during implementation
This section will be populated by the development agent during implementation
This section will be populated by the development agent during implementation
This section will be populated by the development agent during implementation
This section will be populated by the QA agent during review