This commit is contained in:
2026-08-14 14:50:44 +08:00
parent a81af4a664
commit 1c1c48f8d3
11 changed files with 116 additions and 23 deletions
@@ -23,6 +23,18 @@ describe('InboundTaskList measurement scope', () => {
expect(source).not.toContain('selectedInbound.customerId || selectedInbound.tenantId')
})
it('embeds the weight OCR workflow in the actual measurement task without closing on weight changes', () => {
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
expect(source).toContain("import WeightOcrPanel from '../weight/components/WeightOcrPanel.vue'")
expect(source).toContain('<WeightOcrPanel')
expect(source).toContain(':customer-id="selectedInbound.tenantId"')
expect(source).toContain('@changed="handleWeightChanged"')
expect(source).toContain('@summary-changed="handleWeightSummaryChanged"')
expect(source).toContain('measurementPanelRef.value?.updateActualGrossWeight(actualGrossWeightKg)')
expect(source).not.toContain('<WeightOcrPanel\n :customer-id="selectedInbound.tenantId"\n :inbound-id="selectedInbound.id"\n @changed="handleTaskChanged"')
})
it('loads only active customers and exposes a searchable name-only select', () => {
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
const queryFieldsSource = source.slice(source.indexOf('const queryFields'), source.indexOf('const columns'))