对齐 Parent Group 前端展示与复核

This commit is contained in:
andy
2026-07-12 13:35:01 +08:00
parent 92489af18e
commit bf796946f9
13 changed files with 575 additions and 13 deletions

View File

@@ -132,6 +132,21 @@ function createSourceMessageOnlyTaskListResult(taskSubtype: 'S10' | 'S99' = 'S10
}
}
function createParentGroupCancelAllotmentTaskListResult(): ReservationTaskListResult {
const result = createTaskListResult('PARENT-2608-BLOCK', 'Parent split confirmation')
result.items[0] = {
...result.items[0]!,
task_type: 'CANCEL_BOOKING',
task_subtype: 'cancel_allotment_control_block',
result_type: 'normal_task',
ai_task_type: 'Cancel Allotment',
route_code: 'R08_CANCEL_ALLOTMENT_CONTROL_BLOCK_NORMAL',
system_process_category: 'BUSINESS_TASK',
card_name: 'CANCEL_ALLOTMENT',
}
return result
}
function createOrderDetailResult(displayName = 'GRP-001') {
return {
order: {
@@ -516,6 +531,7 @@ describe('reservation P0 views', () => {
])
expect(taskSubtypeOptions).not.toContain('S000')
expect(taskSubtypeOptions).not.toContain('S999')
expect(taskSubtypeOptions).not.toContain('linked_parent_release_after_child_split')
expect(wrapper.find('select[name="task_type"]').text()).toContain('来源消息只读')
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('纯信息类邮件S10')
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('无法形成业务素材包S99')
@@ -550,6 +566,21 @@ describe('reservation P0 views', () => {
expect(lastTaskRequest).not.toHaveProperty('system_process_category')
})
it('renders R08 parent group cancel allotment as a business card', async () => {
vi.mocked(service.fetchReservationTaskList).mockResolvedValue(createParentGroupCancelAllotmentTaskListResult())
const wrapper = await mountWithPlugins(ReservationTaskListView)
await vi.dynamicImportSettled()
expect(wrapper.text()).toContain('PARENT-2608-BLOCK')
expect(wrapper.text()).toContain('Parent Group')
expect(wrapper.text()).toContain('取消 Parent Group 配额')
expect(wrapper.text()).toContain('取消 Parent Group 整块配额')
expect(wrapper.text()).toContain('查看订单')
expect(wrapper.text()).not.toContain('适配契约异常')
expect(wrapper.text()).not.toContain('linked_parent_release_after_child_split')
})
it('renders source-message-only task rows without a visible order action', async () => {
vi.mocked(service.fetchReservationTaskList).mockResolvedValue(createSourceMessageOnlyTaskListResult('S10'))