diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-02 00:06:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-02 00:06:26 +0000 |
commit | 587794b4b8a6e919e77ee4abe8215fa291e6a91d (patch) | |
tree | 380d6578d1ab5902bb521071128bafd4f70472ef /spec/javascripts/flash_spec.js | |
parent | e0bd3a45d9dc6c74cac1a33ea8c03d6d8334249b (diff) | |
download | gitlab-ce-587794b4b8a6e919e77ee4abe8215fa291e6a91d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts/flash_spec.js')
-rw-r--r-- | spec/javascripts/flash_spec.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/javascripts/flash_spec.js b/spec/javascripts/flash_spec.js index bd8608b6bac..28fa87ac097 100644 --- a/spec/javascripts/flash_spec.js +++ b/spec/javascripts/flash_spec.js @@ -176,7 +176,7 @@ describe('Flash', () => { it('removes element after clicking', () => { flash('test', 'alert', document, null, false, true); - document.querySelector('.flash-alert').click(); + document.querySelector('.flash-alert .js-close-icon').click(); expect(document.querySelector('.flash-alert')).toBeNull(); @@ -210,7 +210,13 @@ describe('Flash', () => { describe('removeFlashClickListener', () => { beforeEach(() => { - document.body.innerHTML += '<div class="flash-container"><div class="flash"></div></div>'; + document.body.innerHTML += ` + <div class="flash-container"> + <div class="flash"> + <div class="close-icon js-close-icon"></div> + </div> + </div> + `; }); it('removes global flash on click', done => { @@ -218,7 +224,7 @@ describe('Flash', () => { removeFlashClickListener(flashEl, false); - flashEl.click(); + flashEl.querySelector('.js-close-icon').click(); setTimeout(() => { expect(document.querySelector('.flash')).toBeNull(); |