test(firstleg): scope trucking warehouse lookup

This commit is contained in:
2026-09-01 10:22:15 +08:00
parent 0613d1095e
commit bfc2a4dbd4
2 changed files with 3 additions and 3 deletions
@@ -21,10 +21,10 @@ test('channel catalog accepts the formal array response shape', () => {
assert.doesNotMatch(source, /\(data\(channelsResponse\) \|\| \[\]\)\[0\]/)
})
test('ACTIVE platform warehouses are scanned through bounded complete pagination', () => {
test('ACTIVE domestic platform warehouses are scanned through bounded pagination', () => {
const source = readFileSync(new URL('truck-appointments.mjs', import.meta.url), 'utf8')
assert.match(source, /for \(let page = 1; page <= 100; page\+\+\)/)
assert.match(source, /warehouse-admin\?tenantId=0&status=ACTIVE&page=\$\{page\}&size=100/)
assert.match(source, /warehouse-admin\?tenantId=0&warehouseType=DOMESTIC&status=ACTIVE&page=\$\{page\}&size=100/)
assert.match(source, /const total = Number\(warehousePage\?\.total \?\? warehouseRows\.length\)/)
assert.match(source, /page \* 100 >= total/)
assert.match(source, /完整分页平台仓并解析有效海运渠道/)
@@ -87,7 +87,7 @@ async function bookingMaster(context, suffix) {
let lastWarehousesResponse = null
for (let page = 1; page <= 100; page++) {
const warehousesResponse = await request(context, 'GET',
`/api/platform/v1/warehouse-admin?tenantId=0&status=ACTIVE&page=${page}&size=100`)
`/api/platform/v1/warehouse-admin?tenantId=0&warehouseType=DOMESTIC&status=ACTIVE&page=${page}&size=100`)
lastWarehousesResponse = warehousesResponse
const warehousePage = data(warehousesResponse); const warehouseRows = records(warehousePage)
for (const item of warehouseRows) {