This commit is contained in:
2026-10-20 23:34:11 +08:00
parent f155976f52
commit 13e4aa56ec
321 changed files with 6756 additions and 2110 deletions
@@ -77,7 +77,11 @@ describe('CustomerBillingRulesPanel', () => {
await flushPromises()
expect(getCustomerDimensionConfig).toHaveBeenCalledWith('8')
expect(document.body.textContent).toContain('按箱规尺寸计算')
expect(document.body.textContent).toContain('长、宽、高各加 2X = 外径尺寸')
expect(document.querySelector('.formula-band')).toBeNull()
const help = document.querySelector<HTMLButtonElement>('button[aria-label="查看箱规计算说明"]')
expect(help).not.toBeNull()
help!.focus()
await vi.waitFor(() => expect(document.body.textContent).toContain('长、宽、高各加 2X = 外径尺寸'))
expect(document.body.textContent).toContain('小箱')
expect(document.body.textContent).toContain('特大箱')
expect(document.body.textContent).toContain('34 × 24 × 24')
@@ -213,7 +217,7 @@ describe('CustomerBillingRulesPanel', () => {
const confirmation = vi.spyOn(ElMessageBox, 'confirm').mockRejectedValueOnce('cancel')
document.querySelector<HTMLButtonElement>('.customer-density-dialog .el-dialog__headerbtn')!.click()
await flushPromises()
expect(confirmation).toHaveBeenCalledWith(expect.stringContaining('尚未保存'), '放弃编辑 · C0008', expect.objectContaining({ customClass: 'admin-density-confirm' }))
expect(confirmation).toHaveBeenCalledWith(expect.stringContaining('尚未保存'), '放弃编辑 · C0008', expect.objectContaining({ customClass: 'admin-density-confirm admin-workbench' }))
expect(wrapper.findComponent(AppDialog).props('modelValue')).toBe(true)
expect(input.value).toBe('32.000')
confirmation.mockRestore()