feat: edit collaboration remarks across order loading
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
approvePlatformUnifiedOrder,
|
||||
batchApprovePlatformUnifiedOrders,
|
||||
getPlatformUnifiedOrderBatchApprovalPreview,
|
||||
addPlatformUnifiedOrderNote,
|
||||
updatePlatformUnifiedOrderRemarks,
|
||||
getPlatformUnifiedOrder,
|
||||
downloadPlatformProductImage,
|
||||
listPlatformUnifiedOrders,
|
||||
@@ -172,10 +172,11 @@ describe('unified orders API contract', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('writes platform internal notes through the unified order boundary', async () => {
|
||||
vi.mocked(http.post).mockResolvedValue({ data: '91001' })
|
||||
await expect(addPlatformUnifiedOrderNote('208', '90001', '已确认船期')).resolves.toBe('91001')
|
||||
expect(http.post).toHaveBeenCalledWith('/platform/v1/orders/90001/internal-notes', { content: '已确认船期' }, { params: { tenantId: '208' } })
|
||||
it('updates the three editable remarks while keeping customer remark outside the request', async () => {
|
||||
const request = { expectedVersion: 7, internalRemark: '内部', warehouseRemark: '仓库', customerServiceRemark: '客服' }
|
||||
vi.mocked(http.put).mockResolvedValue({ data: { ...request, version: 8, customerRemark: '客户只读' } })
|
||||
await expect(updatePlatformUnifiedOrderRemarks('208', '90001', request)).resolves.toMatchObject({ version: 8 })
|
||||
expect(http.put).toHaveBeenCalledWith('/platform/v1/orders/90001/remarks', request, { params: { tenantId: '208' } })
|
||||
})
|
||||
|
||||
it('updates customer declaration fields through the versioned tenant-scoped contract', async () => {
|
||||
|
||||
Reference in New Issue
Block a user