Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-26 15:12:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-26 15:12:11 +0300
commit0594381ba711725d7d676db202902dfcbe9ec4a0 (patch)
tree9922e6dcee0fae9c04539f3763a8b5314c1060c4 /spec/frontend/flash_spec.js
parente48c28ed86567f049865a590fdda4569a760ee1f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/flash_spec.js')
-rw-r--r--spec/frontend/flash_spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/flash_spec.js b/spec/frontend/flash_spec.js
index 96e5202780b..f7bde8d2f16 100644
--- a/spec/frontend/flash_spec.js
+++ b/spec/frontend/flash_spec.js
@@ -3,6 +3,7 @@ import createFlash, {
createAction,
hideFlash,
removeFlashClickListener,
+ FLASH_CLOSED_EVENT,
} from '~/flash';
describe('Flash', () => {
@@ -79,6 +80,16 @@ describe('Flash', () => {
expect(el.remove.mock.calls.length).toBe(1);
});
+
+ it(`dispatches ${FLASH_CLOSED_EVENT} event after transitionend event`, () => {
+ jest.spyOn(el, 'dispatchEvent');
+
+ hideFlash(el);
+
+ el.dispatchEvent(new Event('transitionend'));
+
+ expect(el.dispatchEvent).toHaveBeenCalledWith(new Event(FLASH_CLOSED_EVENT));
+ });
});
describe('createAction', () => {