This commit is contained in:
2026-09-15 09:58:15 +08:00
parent 3f998bdb88
commit 4bf66d9571
90 changed files with 1599 additions and 1388 deletions
@@ -65,6 +65,10 @@ describe('CustomerVisitsView permissions and visit material', () => {
await wrapper.findAll('button').find(button => button.text() === '回访')!.trigger('click')
await flushPromises()
const input = wrapper.find('[data-dialog="客户回访"] input[type="file"]')
const inputClick = vi.spyOn(input.element as HTMLInputElement, 'click').mockImplementation(() => {})
await wrapper.findAll('button').find(button => button.text() === '选择文件')!.trigger('click')
expect(inputClick).toHaveBeenCalledOnce()
inputClick.mockRestore()
const file = new File(['data'], 'visit.pdf', { type: 'application/pdf' })
Object.defineProperty(input.element, 'files', { configurable: true, value: [file] })
await input.trigger('change')