Skip to content

Commit 116ec5f

Browse files
authored
Remove skipped tests in ActionMenu (#6711)
1 parent 09b28e5 commit 116ec5f

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

packages/react/src/ActionMenu/ActionMenu.test.tsx

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -225,42 +225,6 @@ describe('ActionMenu', () => {
225225
expect(component.getByLabelText('Clear Group by')).toHaveAttribute('role', 'menuitem')
226226
})
227227

228-
// TODO: Fix the focus trap from taking over focus control
229-
// https://github.com/primer/react/issues/6434
230-
it.skip('should keep focus on Button when menu is opened with click', async () => {
231-
const component = HTMLRender(<Example />)
232-
const button = component.getByRole('button')
233-
234-
const user = userEvent.setup()
235-
await user.tab() // tab into the story, this should focus on the first button
236-
expect(button).toEqual(document.activeElement) // trust, but verify
237-
238-
await user.click(button)
239-
expect(component.queryByRole('menu')).toBeInTheDocument()
240-
expect(document.activeElement).toEqual(button)
241-
})
242-
243-
// TODO: Fix the focus trap from taking over focus control
244-
// https://github.com/primer/react/issues/6434
245-
it.skip('should select first element when ArrowDown is pressed after opening Menu with click', async () => {
246-
const component = HTMLRender(<Example />)
247-
const button = component.getByRole('button')
248-
249-
const user = userEvent.setup()
250-
await act(async () => {
251-
await user.click(button)
252-
})
253-
254-
expect(component.queryByRole('menu')).toBeInTheDocument()
255-
256-
await act(async () => {
257-
// assumes button is the active element at this point
258-
await user.keyboard('{ArrowDown}')
259-
})
260-
261-
expect(component.getAllByRole('menuitem')[0]).toEqual(document.activeElement)
262-
})
263-
264228
it('should be able to select an Item with aria-keyshortcuts after opening Menu with click', async () => {
265229
const component = HTMLRender(<Example />)
266230
const button = component.getByRole('button')

0 commit comments

Comments
 (0)