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:
authorSam Bigelow <sbigelow@gitlab.com>2019-04-26 17:14:29 +0300
committerSam Bigelow <sbigelow@gitlab.com>2019-04-26 21:03:34 +0300
commitba8113c3238d04ed753c49303b81a4b8e5ec3f23 (patch)
tree92e5245adc8fb4ee506be655798401d37d8149ef /spec/frontend/vue_shared/components/notes
parent674e5e5baab6542eb35446fa46d45ce428c9ea1a (diff)
Init MR Popovers on system note mounted
All `renderGFM()` calls are finished before the system note is mounted so this MR inits the popover for each system note, and only the elements in the system note
Diffstat (limited to 'spec/frontend/vue_shared/components/notes')
-rw-r--r--spec/frontend/vue_shared/components/notes/system_note_spec.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/frontend/vue_shared/components/notes/system_note_spec.js b/spec/frontend/vue_shared/components/notes/system_note_spec.js
index adcb1c858aa..dc66150ab8d 100644
--- a/spec/frontend/vue_shared/components/notes/system_note_spec.js
+++ b/spec/frontend/vue_shared/components/notes/system_note_spec.js
@@ -1,6 +1,9 @@
import Vue from 'vue';
import issueSystemNote from '~/vue_shared/components/notes/system_note.vue';
import createStore from '~/notes/stores';
+import initMRPopovers from '~/mr_popover/index';
+
+jest.mock('~/mr_popover/index', () => jest.fn());
describe('system note component', () => {
let vm;
@@ -56,4 +59,8 @@ describe('system note component', () => {
it('removes wrapping paragraph from note HTML', () => {
expect(vm.$el.querySelector('.system-note-message').innerHTML).toEqual('<span>closed</span>');
});
+
+ it('should initMRPopovers onMount', () => {
+ expect(initMRPopovers).toHaveBeenCalled();
+ });
});