调整订单列表待处理数量口径
This commit is contained in:
1 parent
d7b24cbef7
commit
c5244bc652
12 files changed
+149
-14
No files matched your search
@@ -390,6 +390,7 @@ describe('reservationService real API mode', () => {
|
||||
group_code: 'GRP-001',
|
||||
display_name: 'GRP-001',
|
||||
open_task_count: 2,
|
||||
open_work_item_count: 1,
|
||||
next_processable_task_id: '10002',
|
||||
next_v4_order_task_id: '9001',
|
||||
next_v4_action_card_id: '9101',
|
||||
@@ -420,6 +421,7 @@ describe('reservationService real API mode', () => {
|
||||
)
|
||||
expect(result.items[0]?.display_order_key).toBe('GRP-001')
|
||||
expect(result.items[0]?.next_processable_task_id).toBe('10002')
|
||||
expect(result.items[0]?.open_work_item_count).toBe(1)
|
||||
expect(result.items[0]?.next_v4_order_task_id).toBe('9001')
|
||||
expect(result.items[0]?.next_v4_action_type).toBe('REVIEW')
|
||||
expect(result.items[0]?.next_v4_action_status).toBe('REVIEW_REQUIRED')
|
||||
|
||||
@@ -180,6 +180,7 @@ function createOrderCandidate(overrides: Partial<ReservationOrderListItem> = {})
|
||||
group_code: 'GRP-001',
|
||||
display_name: 'GRP-001',
|
||||
open_task_count: 1,
|
||||
open_work_item_count: 1,
|
||||
next_processable_task_id: null,
|
||||
created_at: '2026-07-08T03:00:00Z',
|
||||
updated_at: '2026-07-08T03:10:00Z',
|
||||
|
||||
@@ -53,6 +53,7 @@ function createOrderListResult(
|
||||
group_code: displayOrderKey,
|
||||
display_name: displayOrderKey,
|
||||
open_task_count: 2,
|
||||
open_work_item_count: 2,
|
||||
next_processable_task_id: '10002',
|
||||
created_at: '2026-07-08T03:00:00Z',
|
||||
updated_at: '2026-07-08T03:10:00Z',
|
||||
@@ -516,6 +517,29 @@ describe('reservation P0 views', () => {
|
||||
expect(wrapper.text()).not.toContain('接口待接入')
|
||||
})
|
||||
|
||||
it('shows the backend unified open work item count in the order list', async () => {
|
||||
vi.mocked(service.fetchReservationOrders).mockResolvedValue(createOrderListResult('GRP-001', {
|
||||
page_num: 1,
|
||||
page_size: 20,
|
||||
total: 1,
|
||||
}, {
|
||||
open_task_count: 99,
|
||||
v4_open_order_task_count: 88,
|
||||
open_work_item_count: 3,
|
||||
}))
|
||||
|
||||
const wrapper = await mountWithPlugins(ReservationOrderListView)
|
||||
await vi.dynamicImportSettled()
|
||||
|
||||
const headers = wrapper.findAll('thead th').map((header) => header.text())
|
||||
const cells = wrapper.findAll('tbody td').map((cell) => cell.text())
|
||||
|
||||
expect(headers).toContain('待处理')
|
||||
expect(cells[1]).toBe('3')
|
||||
expect(cells[1]).not.toContain('99')
|
||||
expect(cells[1]).not.toContain('88')
|
||||
})
|
||||
|
||||
it('routes continue action to the V4 order task when the backend returns next_v4_order_task_id', async () => {
|
||||
vi.mocked(service.fetchReservationOrders).mockResolvedValue(createOrderListResult('GRP-001', {
|
||||
page_num: 1,
|
||||
@@ -576,6 +600,7 @@ describe('reservation P0 views', () => {
|
||||
total: 1,
|
||||
}, {
|
||||
open_task_count: 0,
|
||||
open_work_item_count: 0,
|
||||
next_processable_task_id: null,
|
||||
next_v4_order_task_id: null,
|
||||
next_v4_action_card_id: null,
|
||||
|
||||
Reference in new issue
Block a user