Test #1

Merged
admin merged 1726 commits from test into main 2026-09-17 11:52:45 +08:00
2 changed files with 6 additions and 5 deletions
Showing only changes of commit 7c0f2fc5f5 - Show all commits
@@ -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),
})
+3 -3
View File
@@ -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('同箱复测没有覆盖设备值或覆盖人工箱数')