mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 23:18:44 +08:00
fix(a11y): label dialog close buttons (#654)
This commit is contained in:
@@ -220,7 +220,9 @@ describe('SiteImportDialog', () => {
|
||||
await fireEvent.click(await screen.findByRole('button', { name: '开始导入' }))
|
||||
expect(await screen.findByText('导入过程中出现 1 个错误')).toBeInTheDocument()
|
||||
|
||||
await fireEvent.click(screen.getByRole('button', { name: '关闭' }))
|
||||
const resultCloseButton = screen.getByText('关闭').closest('button')
|
||||
expect(resultCloseButton).not.toBeNull()
|
||||
await fireEvent.click(resultCloseButton!)
|
||||
expect(events.update).toHaveBeenCalledWith(false)
|
||||
expect(events.importSuccess).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user