调整 M002 V3 任务列表筛选项
This commit is contained in:
@@ -93,12 +93,12 @@ function createTaskListResult(
|
||||
}
|
||||
}
|
||||
|
||||
function createSourceMessageOnlyTaskListResult(taskSubtype: 'S10' | 'S99' | 'S000' | 'S999' = 'S10') {
|
||||
function createSourceMessageOnlyTaskListResult(taskSubtype: 'S10' | 'S99' = 'S10') {
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
task_id: taskSubtype === 'S10' || taskSubtype === 'S000' ? '19990' : '19999',
|
||||
order_id: taskSubtype === 'S10' || taskSubtype === 'S000' ? '29990' : '29999',
|
||||
task_id: taskSubtype === 'S10' ? '19990' : '19999',
|
||||
order_id: taskSubtype === 'S10' ? '29990' : '29999',
|
||||
hotel_id: 'HOTEL-TEST',
|
||||
display_order_key: null,
|
||||
temporary_order_no: null,
|
||||
@@ -114,8 +114,8 @@ function createSourceMessageOnlyTaskListResult(taskSubtype: 'S10' | 'S99' | 'S00
|
||||
queue_participation: false,
|
||||
can_process: false,
|
||||
readonly_reason_code: 'QUEUE_EXCLUDED',
|
||||
source_message_id: taskSubtype === 'S10' || taskSubtype === 'S000' ? '39990' : '39999',
|
||||
source_subject: taskSubtype === 'S10' || taskSubtype === 'S000' ? 'FYI only' : 'Unclear email',
|
||||
source_message_id: taskSubtype === 'S10' ? '39990' : '39999',
|
||||
source_subject: taskSubtype === 'S10' ? 'FYI only' : 'Unclear email',
|
||||
source_sender_summary: 'guest@example.test',
|
||||
source_received_at: '2026-07-08T03:00:00Z',
|
||||
external_conversation_id: 'thread-source-only',
|
||||
@@ -485,12 +485,40 @@ describe('reservation P0 views', () => {
|
||||
const wrapper = await mountWithPlugins(ReservationTaskListView)
|
||||
await vi.dynamicImportSettled()
|
||||
|
||||
const taskTypeOptions = wrapper.find('select[name="task_type"]').findAll('option')
|
||||
.map((option) => option.attributes('value'))
|
||||
const taskSubtypeOptions = wrapper.find('select[name="task_subtype"]').findAll('option')
|
||||
.map((option) => option.attributes('value'))
|
||||
|
||||
expect(taskTypeOptions).toEqual([
|
||||
'',
|
||||
'NEW_BOOKING',
|
||||
'UPDATE_BOOKING',
|
||||
'CANCEL_BOOKING',
|
||||
'MANUAL_REVIEW',
|
||||
'SOURCE_MESSAGE_ONLY',
|
||||
])
|
||||
expect(taskTypeOptions).not.toContain('INFORMATIONAL_MESSAGE')
|
||||
expect(taskSubtypeOptions).toEqual([
|
||||
'',
|
||||
'NEW_BOOKING',
|
||||
'UPDATE_BOOKING',
|
||||
'CANCEL_BOOKING',
|
||||
'RATE_CHANGE',
|
||||
'UPDATE_STAY_DATES',
|
||||
'UPDATE_ROOM_TYPE',
|
||||
'UPDATE_FIX_CHARGE',
|
||||
'NEW_GROUP_BLOCK',
|
||||
'NEW_FIT_RESERVATION',
|
||||
'MANUAL_REVIEW',
|
||||
'S10',
|
||||
'S99',
|
||||
])
|
||||
expect(taskSubtypeOptions).not.toContain('S000')
|
||||
expect(taskSubtypeOptions).not.toContain('S999')
|
||||
expect(wrapper.find('select[name="task_type"]').text()).toContain('来源消息只读')
|
||||
expect(wrapper.find('select[name="task_type"]').text()).toContain('历史 Message Notification')
|
||||
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('纯信息类邮件(S10)')
|
||||
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('无法形成业务素材包(S99)')
|
||||
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('纯信息类邮件')
|
||||
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('无法形成业务素材包')
|
||||
|
||||
await wrapper.find('select[name="task_type"]').setValue('SOURCE_MESSAGE_ONLY')
|
||||
await vi.dynamicImportSettled()
|
||||
@@ -504,6 +532,22 @@ describe('reservation P0 views', () => {
|
||||
page_num: 1,
|
||||
}),
|
||||
)
|
||||
const lastTaskRequest = vi.mocked(service.fetchReservationTaskList).mock.calls[
|
||||
vi.mocked(service.fetchReservationTaskList).mock.calls.length - 1
|
||||
]?.[0] ?? {}
|
||||
expect(Object.keys(lastTaskRequest).sort()).toEqual([
|
||||
'keyword',
|
||||
'order_status',
|
||||
'page_num',
|
||||
'page_size',
|
||||
'queue_participation',
|
||||
'task_status',
|
||||
'task_subtype',
|
||||
'task_type',
|
||||
])
|
||||
expect(lastTaskRequest).not.toHaveProperty('result_type')
|
||||
expect(lastTaskRequest).not.toHaveProperty('route_code')
|
||||
expect(lastTaskRequest).not.toHaveProperty('system_process_category')
|
||||
})
|
||||
|
||||
it('renders source-message-only task rows without a visible order action', async () => {
|
||||
|
||||
Reference in New Issue
Block a user