diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 15:07:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 15:07:59 +0300 |
commit | 4247e67be1faa9d52691757dad954a7fa63e8bfe (patch) | |
tree | f2a8acc41b1b16c2c1050abc61ecb8a07f44bb2f /spec/frontend/notes | |
parent | c0d8f9f3f962df6bfcc70440432da55d67307189 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes')
-rw-r--r-- | spec/frontend/notes/components/discussion_notes_spec.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/spec/frontend/notes/components/discussion_notes_spec.js b/spec/frontend/notes/components/discussion_notes_spec.js index 5ab26d742ca..51c7f45d5b0 100644 --- a/spec/frontend/notes/components/discussion_notes_spec.js +++ b/spec/frontend/notes/components/discussion_notes_spec.js @@ -119,17 +119,26 @@ describe('DiscussionNotes', () => { it('emits deleteNote when first note emits handleDeleteNote', () => { findNoteAtIndex(0).vm.$emit('handleDeleteNote'); - expect(wrapper.emitted().deleteNote).toBeTruthy(); + + return wrapper.vm.$nextTick().then(() => { + expect(wrapper.emitted().deleteNote).toBeTruthy(); + }); }); it('emits startReplying when first note emits startReplying', () => { findNoteAtIndex(0).vm.$emit('startReplying'); - expect(wrapper.emitted().startReplying).toBeTruthy(); + + return wrapper.vm.$nextTick().then(() => { + expect(wrapper.emitted().startReplying).toBeTruthy(); + }); }); it('emits deleteNote when second note emits handleDeleteNote', () => { findNoteAtIndex(1).vm.$emit('handleDeleteNote'); - expect(wrapper.emitted().deleteNote).toBeTruthy(); + + return wrapper.vm.$nextTick().then(() => { + expect(wrapper.emitted().deleteNote).toBeTruthy(); + }); }); }); @@ -142,7 +151,10 @@ describe('DiscussionNotes', () => { it('emits deleteNote when first note emits handleDeleteNote', () => { note.vm.$emit('handleDeleteNote'); - expect(wrapper.emitted().deleteNote).toBeTruthy(); + + return wrapper.vm.$nextTick().then(() => { + expect(wrapper.emitted().deleteNote).toBeTruthy(); + }); }); }); }); |