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
@@ -213,7 +213,19 @@ describe('InboundMeasurementPanel', () => {
expect(source).toContain('.measurement-form-grid, .measurement-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));')
expect(source).toContain('.measurement-table { width: 100%; font-size: 12px; }')
expect(source).toContain('.measurement-data-grid :deep(.el-input__wrapper)')
expect(source).toContain('defineExpose({ saveDraft, submitForReview, mayMaintain, maySubmit, saving, submitting, canEdit, canSubmit })')
expect(source).toContain('defineExpose({ saveDraft, submitForReview, updateActualGrossWeight, mayMaintain, maySubmit, saving, submitting, canEdit, canSubmit })')
})
it('updates the server weight summary without discarding unsaved measurement edits', async () => {
const wrapper = await mountPanel()
const countInput = wrapper.find('.measurement-count-editor input')
await countInput.setValue('9')
wrapper.vm.updateActualGrossWeight(125.75)
await flushPromises()
expect(wrapper.findAll('input[readonly]').some((input) => (input.element as HTMLInputElement).value === '125.75')).toBe(true)
expect((countInput.element as HTMLInputElement).value).toBe('9')
})
it('reuses the established first-leg detail surface and status patterns', async () => {