test(ui-schedule): cover closing the cleanup menu
This commit is contained in:
1 parent
1c20d3fe36
commit
583f6b529c
1 file changed
+9
@@ -1021,6 +1021,15 @@ describe('clearing inactive tasks', () => {
|
||||
expect(within(dialog).getByText(en['clear.description'])).toBeDefined()
|
||||
})
|
||||
|
||||
it('closes the cleanup menu without opening the confirmation', () => {
|
||||
mount({ records: [at, endedTask] })
|
||||
fireEvent.click(moreTrigger())
|
||||
expect(screen.getByRole('menuitem', { name: en['clear.action'] })).toBeDefined()
|
||||
fireEvent.keyDown(document, { key: 'Escape' })
|
||||
expect(screen.queryByRole('menuitem', { name: en['clear.action'] })).toBeNull()
|
||||
expect(screen.queryByRole('dialog')).toBeNull()
|
||||
})
|
||||
|
||||
it('removes nothing when the confirmation is dismissed', () => {
|
||||
const h = mount({ records: [at, endedTask] })
|
||||
openClear()
|
||||
|
||||
Reference in new issue
Block a user