Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Nov 8, 2024
1 parent 3186b59 commit 1019cc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/basic.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1220,11 +1220,13 @@ describe('Trigger.Basic', () => {
expect(isPopupHidden()).toBeFalsy();

// Click portal should not close
fireEvent.click(document.querySelector('.portal'));
fireEvent.pointerDown(document.querySelector('.portal'));
fireEvent.mouseDown(document.querySelector('.portal'));
await awaitFakeTimer();
expect(isPopupHidden()).toBeFalsy();

// Click outside to close
fireEvent.pointerDown(document.querySelector('.outer'));
fireEvent.mouseDown(container.querySelector('.outer'));
await awaitFakeTimer();
expect(isPopupHidden()).toBeTruthy();
Expand Down

0 comments on commit 1019cc9

Please sign in to comment.