diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/frontend/flash_spec.js | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/frontend/flash_spec.js')
-rw-r--r-- | spec/frontend/flash_spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/flash_spec.js b/spec/frontend/flash_spec.js index 6d482e5814d..6a5ac76a4d0 100644 --- a/spec/frontend/flash_spec.js +++ b/spec/frontend/flash_spec.js @@ -339,6 +339,20 @@ describe('Flash', () => { expect(actionConfig.clickHandler).toHaveBeenCalled(); }); }); + + describe('additional behavior', () => { + describe('close', () => { + it('clicks the close icon', () => { + const flash = createFlash({ ...defaultParams }); + const close = document.querySelector('.flash-alert .js-close-icon'); + + jest.spyOn(close, 'click'); + flash.close(); + + expect(close.click.mock.calls.length).toBe(1); + }); + }); + }); }); }); |