This commit is contained in:
2026-08-27 11:08:03 +08:00
parent 506d310211
commit 82f0479928
7 changed files with 136 additions and 24 deletions
@@ -55,8 +55,10 @@ describe('WeightOcrPanel contract', () => {
expect(source).toContain("option.palletType || '未记录类型'")
})
it('keeps pallet type, tare weight, and capacity in one select line', () => {
expect(source).toContain(':label="palletOptionLabel(option)"')
it('keeps pallet type, tare weight, and capacity in one virtualized select line', () => {
expect(source).toContain('<el-select-v2')
expect(source).toContain(':options="virtualPalletOptions"')
expect(source).toContain('label: palletOptionLabel(option)')
expect(source).toContain("`${option.palletType || '未记录类型'} · 皮重 ${formatWeight(option.tareWeightKg)} · 容量 ${option.capacityCbm} m³`")
expect(source).not.toContain('<small v-if="selectedPallet">')
expect(source).toContain('width: clamp(360px, 36vw, 520px)')
@@ -67,6 +69,9 @@ describe('WeightOcrPanel contract', () => {
expect(source).toContain("platform:firstleg:inbound:weight:edit")
expect(source).toContain("platform:firstleg:inbound:weight:confirm")
expect(source).toContain("new Set(['WAIT_MEASURE', 'MEASURING', 'MEASURE_REJECTED'])")
expect(source).toContain('&& canEdit.value')
expect(source).toContain('&& editable.value')
expect(source).toContain('cancelPalletOptionsLoad()')
expect(source).toContain("workspace.value?.processStatus === 'MEASURE_PENDING'")
expect(source).toContain('v-if="canEdit && !reviewMode"')
expect(source).toContain('v-if="canEdit && editable && !reviewMode"')