feat(admin): remove customer from truck appointments
This commit is contained in:
@@ -30,18 +30,21 @@ describe('TruckAppointmentForm interaction contract', () => {
|
||||
expect(source).toContain('if (!selectableContainers.value.some((item) => item.containerBookingId === draft.containerBookingId))')
|
||||
})
|
||||
|
||||
it('freezes customer, warehouse and bill of lading snapshots from the booking', () => {
|
||||
expect(source).toContain('draft.customerId = item.customerId')
|
||||
expect(source).toContain('draft.customerName = item.customerName')
|
||||
it('freezes warehouse and bill of lading snapshots without retaining customer data', () => {
|
||||
expect(source).toContain('draft.warehouseId = item.warehouseId')
|
||||
expect(source).toContain('draft.billOfLadingNo = item.billOfLadingNo')
|
||||
expect(source).toContain('已从放舱订舱冻结资料带入')
|
||||
expect(source).toContain(':model-value="draft.billOfLadingNo || \'\'" disabled')
|
||||
expect(source).not.toContain('customerId')
|
||||
expect(source).not.toContain('customerName')
|
||||
expect(source).not.toContain('label="客户"')
|
||||
})
|
||||
|
||||
it('keeps server-side validation authoritative and preserves recoverable option errors', () => {
|
||||
expect(source).toContain('最终资格仍由服务端校验')
|
||||
expect(source).toContain('所选订舱缺少有效的订舱确认文件或提单文件')
|
||||
expect(source).toContain('所选订舱缺少有效提单号')
|
||||
expect(source).toContain("booking.status !== 'RELEASED'")
|
||||
expect(source).toContain('bookingContainersError')
|
||||
expect(source).toContain("getApiErrorDetails(cause, '该订舱柜次加载失败,请重试')")
|
||||
expect(source).toContain('<ApiErrorMeta :details="bookingContainersError" />')
|
||||
@@ -59,4 +62,10 @@ describe('TruckAppointmentForm interaction contract', () => {
|
||||
expect(source).toContain('@media (max-width: 480px)')
|
||||
expect(source).toContain('min-height: 40px')
|
||||
})
|
||||
|
||||
it('suppresses duplicate submits and truncates long booking or container labels', () => {
|
||||
expect(source).toContain('if (props.submitting) return')
|
||||
expect(source).toContain(':deep(.el-select__selected-item)')
|
||||
expect(source).toContain('text-overflow:ellipsis')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user