Skip to content

Commit

Permalink
WIP(ui-menu,ui-modal): fix some of the failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
balzss committed Oct 26, 2023
1 parent 6061b57 commit b1e204c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/ui-menu/src/Menu/__tests__/Menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ describe('<Menu />', async () => {
const menu = await MenuLocator.find(':label(Parent)')
const trigger = await menu.findItem(':label(Flyout)')

await trigger.click()
await trigger.mouseDown()
await trigger.mouseUp()

expect(onToggle).to.have.been.called()
expect(onToggle.getCall(0).args[0]).to.equal(true)
Expand Down
3 changes: 2 additions & 1 deletion packages/ui-modal/src/Modal/__tests__/Modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ describe('<Modal />', async () => {
expect(modal.containsFocus()).to.be.true()
})

await (within(modal.getOwnerDocument().documentElement) as any).click()
await (within(modal.getOwnerDocument().documentElement) as any).mouseDown()
await (within(modal.getOwnerDocument().documentElement) as any).mouseUp()

await wait(() => {
expect(onDismiss).to.have.been.called()
Expand Down

0 comments on commit b1e204c

Please sign in to comment.