优化提交

This commit is contained in:
2026-09-28 17:26:50 +08:00
parent dd6ffd0ef6
commit a646ade658
5 changed files with 102 additions and 18 deletions
+10
View File
@@ -111,6 +111,16 @@ test('warehouse transfer restores uploaded photos and exposes honest pallet labe
assert.doesNotMatch(page, /批量打印|printAllPallets/)
})
test('warehouse transfer enforces the photo limit and restores pending server uploads', async () => {
const page = await readFile(new URL('../src/pages/warehouse-transfer/warehouse-transfer.vue', import.meta.url), 'utf8')
assert.match(page, /const MAX_MEASUREMENT_PHOTOS = 20/)
assert.match(page, /photos = await listWarehouseTransferMeasurementPhotos\(transferNo\)/)
assert.match(page, /const uploadPaths = paths\.slice\(0, remaining\)/)
assert.match(page, /this\.photoFileIds\.length >= MAX_MEASUREMENT_PHOTOS/)
assert.match(page, /await this\.restorePhotos\(transferNo\)/)
assert.match(page, /at most 20\|最多\.\?20\|supports at most/)
})
test('warehouse transfer always requests newly generated pallets', async () => {
const page = await readFile(new URL('../src/pages/warehouse-transfer/warehouse-transfer.vue', import.meta.url), 'utf8')
assert.doesNotMatch(page, /托盘码\s*<small>选填|扫描或输入当前托盘码/)