This commit is contained in:
2026-08-17 17:49:10 +08:00
parent 911a3620e1
commit c7334b2cf8
30 changed files with 1043 additions and 249 deletions
@@ -19,20 +19,22 @@ describe('InboundTaskList measurement scope', () => {
it('uses the inbound tenant isolation key for measurement and review requests', () => {
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
expect(source.match(/:tenant-id="selectedInbound\.tenantId"/g)).toHaveLength(2)
expect(source).toContain(':tenant-id="selectedInbound.tenantId"')
expect(source).toContain(':customer-id="selectedInbound.tenantId"')
expect(source).not.toContain('selectedInbound.customerId || selectedInbound.tenantId')
})
it('embeds the weight OCR workflow in the actual measurement task without closing on weight changes', () => {
it('opens the unique shared measurement dialog and refreshes without duplicating its workflow', () => {
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("import InboundMeasurementDialog from '../measurement/InboundMeasurementDialog.vue'")
expect(source).toContain('<InboundMeasurementDialog')
expect(source).toContain('v-model="measurementDialogOpen"')
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"')
expect(source).toContain('@updated="handleMeasurementUpdated"')
expect(source).toContain('@submitted="handleMeasurementSubmitted"')
expect(source).not.toContain('<WeightOcrPanel')
expect(source).not.toContain('<InboundMeasurementPanel')
})
it('loads only active customers and exposes a searchable name-only select', () => {