优化
This commit is contained in:
@@ -16,6 +16,12 @@ describe('showExportTaskCreatedDialog', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it.each([false, true])('opts into the shared dialog style explicitly: %s', async (dense) => {
|
||||
const confirm = vi.spyOn(ElMessageBox, 'confirm').mockResolvedValue({} as never)
|
||||
await showExportTaskCreatedDialog({ taskName: '财务导出', dense })
|
||||
expect(confirm).toHaveBeenCalledWith(expect.any(String), '导出任务已创建', expect.objectContaining({ customClass: dense ? 'admin-density-confirm' : undefined }))
|
||||
})
|
||||
|
||||
it('keeps the user on the current page when the dialog is dismissed', async () => {
|
||||
vi.spyOn(ElMessageBox, 'confirm').mockRejectedValue('cancel')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user