test: keep Mojia samples within customer box limits

This commit is contained in:
2026-08-08 11:50:55 +08:00
parent 0113d19274
commit 7c0f2fc5f5
2 changed files with 6 additions and 5 deletions
@@ -173,7 +173,8 @@ export async function run(context) {
}
const scanPath = `/api/platform/v1/first-leg/inbounds/${inboundId}/measurement/carton-scans?${query(tenantId)}`
const firstDimensions = { length: 60.1, width: 40.2, height: 30.3, weight: 12.5 }
// Keep the isolated sample inside the customer's largest configured inner box (60x50x50cm).
const firstDimensions = { length: 59.1, width: 40.2, height: 30.3, weight: 12.5 }
const firstScanResponse = await multipartRequest(context, scanPath, {
boxCode, ...firstDimensions, machineNo: 'MJ-ADMIN-E2E-01', measuredAt: new Date().toISOString().slice(0, 19),
})
@@ -214,7 +215,7 @@ export async function run(context) {
&& Number(countResult?.measurementVersion) === Number(firstScan.measurementVersion) + 1,
`version=${countResult?.measurementVersion ?? 'missing'}`, OPTIONS)
const replacement = { length: 61.1, width: 41.2, height: 31.3, weight: 13.6 }
const replacement = { length: 59.5, width: 41.2, height: 31.3, weight: 13.6 }
const rescanResponse = await multipartRequest(context, scanPath, {
boxCode, ...replacement, machineNo: 'MJ-ADMIN-E2E-02', measuredAt: new Date().toISOString().slice(0, 19),
})