diff options
author | GeoSot <geo.sotis@gmail.com> | 2022-09-07 11:56:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 11:56:33 +0300 |
commit | 23fb7a79156d1ea4ce2ab5713debbbc251b4e22f (patch) | |
tree | 47960992a48a2c16ff3e872e2636140fd84f28cb /js/tests/unit | |
parent | 949456984aa21536afd35eddf7ea38b3648830a3 (diff) |
Fix modal event-listeners during dismiss click (#36863)
ref: #36855
Diffstat (limited to 'js/tests/unit')
-rw-r--r-- | js/tests/unit/modal.spec.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/tests/unit/modal.spec.js b/js/tests/unit/modal.spec.js index 1bdf4e66ad..e774fc4e8e 100644 --- a/js/tests/unit/modal.spec.js +++ b/js/tests/unit/modal.spec.js @@ -644,7 +644,9 @@ describe('Modal', () => { const mouseDown = createEvent('mousedown') modalEl.dispatchEvent(mouseDown) + modalEl.click() modalEl.dispatchEvent(mouseDown) + modalEl.click() setTimeout(() => { expect(spy).toHaveBeenCalledTimes(1) @@ -719,9 +721,11 @@ describe('Modal', () => { const mouseDown = createEvent('mousedown') dialogEl.dispatchEvent(mouseDown) + modalEl.click() expect(spy).not.toHaveBeenCalled() modalEl.dispatchEvent(mouseDown) + modalEl.click() expect(spy).toHaveBeenCalled() resolve() }) |