This commit is contained in:
2026-08-07 18:44:55 +08:00
parent 2425e0cac1
commit 38a0ffd3e3
9 changed files with 272 additions and 40 deletions
@@ -43,7 +43,17 @@ describe('UnifiedOrdersView contract', () => {
expect(source).toContain("{ value: 'UNRECORDED', label: '未录入' }")
expect(source).not.toContain("{ value: 'DRAFT', label: '草稿' }")
expect(source).not.toContain("{ value: 'CANCELLED', label: '已取消' }")
expect(source).toContain("placeholder: '请输入订单号'")
expect(source).not.toContain("key: 'orderNo'")
expect(source.match(/key: 'inboundCode', type: 'input'/g)).toHaveLength(1)
expect(source).not.toContain("key: 'keyword'")
const prototypeFieldOrder = [
'receivingWarehouseId', 'destinationWarehouseId', 'inboundCode', 'internalOrderStatus', 'expectedArrivalDate',
'feeReviewStatus', 'tenantId', 'containerNo', 'cabinetNo', 'channelName', 'sailingDate', 'loaded',
'fullContainer', 'measurementReviewStatus', 'fbaCode', 'createdRange',
]
const fieldPositions = prototypeFieldOrder.map((key) => source.indexOf(`key: '${key}'`))
expect(fieldPositions).toEqual([...fieldPositions].sort((left, right) => left - right))
expect(source).toContain('preference-key="unified-orders-query-v2"')
})
it('covers real list states and keeps operation column first and left-fixed', () => {
@@ -61,6 +71,7 @@ describe('UnifiedOrdersView contract', () => {
expect(source).toContain("NOT_SUBMITTED: '未提交'")
expect(source).toContain("{ key: 'customerRemark', prop: 'customerRemark', label: '备注'")
expect(source).toContain("{ key: 'latestInternalNote', prop: 'latestInternalNote', label: '客服内部备注'")
expect(source.match(/<LineClampText v-if="column\.key === 'remark'"/g)).toHaveLength(3)
})
it('keeps only confirmed business actions as explicit boundaries', () => {