diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-01-25 09:47:36 +0000 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-01-25 10:00:17 +0000 |
commit | 4903ff93971d28723ed9d81f7dae2ad2a1d5586a (patch) | |
tree | 8f6f5cbc302f0820c1ffd0c85528388fd33bb8d7 /spec/javascripts/flash_spec.js | |
parent | 3805cd7ac5e1c9b286bfba667ef45972eab4d084 (diff) | |
parent | 944c1eb684fe979339262ba6e9f7bf9e1b77fc81 (diff) | |
download | gitlab-ce-13931-custom-emoji-implementation.tar.gz |
Merge branch 'master' into 13931-custom-emoji-implementation13931-custom-emoji-implementation
Conflicts:
app/assets/javascripts/dispatcher.js
app/assets/javascripts/pages/projects/shared/project_avatar.js
Diffstat (limited to 'spec/javascripts/flash_spec.js')
-rw-r--r-- | spec/javascripts/flash_spec.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/javascripts/flash_spec.js b/spec/javascripts/flash_spec.js index 97e3ab682c5..7198dbd4cf2 100644 --- a/spec/javascripts/flash_spec.js +++ b/spec/javascripts/flash_spec.js @@ -183,11 +183,15 @@ describe('Flash', () => { }); it('adds flash element into container', () => { - flash('test'); + flash('test', 'alert', document, null, false, true); expect( document.querySelector('.flash-alert'), ).not.toBeNull(); + + expect( + document.body.className, + ).toContain('flash-shown'); }); it('adds flash into specified parent', () => { @@ -220,13 +224,17 @@ describe('Flash', () => { }); it('removes element after clicking', () => { - flash('test', 'alert', document, null, false); + flash('test', 'alert', document, null, false, true); document.querySelector('.flash-alert').click(); expect( document.querySelector('.flash-alert'), ).toBeNull(); + + expect( + document.body.className, + ).not.toContain('flash-shown'); }); describe('with actionConfig', () => { |