test: keep Mojia samples within customer box limits
This commit is contained in:
@@ -126,7 +126,7 @@ export async function runMojiaMeasurementScenario(run, options = {}) {
|
||||
const boxCode = `${afterPrint.summary.inboundCode}#${printedTotal}-1`
|
||||
const scanPath = `/api/platform/v1/first-leg/inbounds/${inboundId}/measurement/carton-scans?tenantId=${resolvedTenantId}`
|
||||
const firstFields = {
|
||||
boxCode, length: 60.1, width: 40.2, height: 30.3, weight: 12.5,
|
||||
boxCode, length: 59.1, width: 40.2, height: 30.3, weight: 12.5,
|
||||
machineNo: 'MJ-ADMIN-E2E-01', measuredAt: '2026-08-08T10:00:00',
|
||||
}
|
||||
const firstResponse = await multipartRequest(run, scanPath, firstFields, imagePath)
|
||||
@@ -149,14 +149,14 @@ export async function runMojiaMeasurementScenario(run, options = {}) {
|
||||
}
|
||||
|
||||
const rescanResponse = await multipartRequest(run, scanPath, {
|
||||
boxCode, length: 61.1, width: 41.2, height: 31.3, weight: 13.5,
|
||||
boxCode, length: 59.5, width: 41.2, height: 31.3, weight: 13.5,
|
||||
machineNo: 'MJ-ADMIN-E2E-02', measuredAt: '2026-08-08T10:01:00',
|
||||
}, imagePath)
|
||||
const rescan = requireData(run, '墨家同箱复测覆盖', rescanResponse)
|
||||
const rescanPassed = rescan.created === false
|
||||
&& String(rescan.itemId) === String(first.itemId)
|
||||
&& rescan.confirmedPackageCount === printedTotal
|
||||
&& Number(rescan.lengthCm) === 61.1
|
||||
&& Number(rescan.lengthCm) === 59.5
|
||||
record(run, '墨家同箱复测保留人工箱数', rescanResponse, rescanPassed,
|
||||
`itemId=${rescan.itemId}, confirmedPackageCount=${rescan.confirmedPackageCount}`)
|
||||
if (!rescanPassed) throw new Error('同箱复测没有覆盖设备值或覆盖人工箱数')
|
||||
|
||||
Reference in New Issue
Block a user