Commit aea013ea authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Clement Ho

Move NoteApp tests to Jest

parent 8a2afff0
import $ from 'jquery';
import 'at.js';
import _ from 'underscore';
import glRegexp from './lib/utils/regexp';
import AjaxCache from './lib/utils/ajax_cache';
......
......@@ -10,7 +10,7 @@ import Flash from '../../flash';
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import noteHeader from './note_header.vue';
import noteActions from './note_actions.vue';
import noteBody from './note_body.vue';
import NoteBody from './note_body.vue';
import eventHub from '../event_hub';
import noteable from '../mixins/noteable';
import resolvable from '../mixins/resolvable';
......@@ -21,7 +21,7 @@ export default {
userAvatarLink,
noteHeader,
noteActions,
noteBody,
NoteBody,
TimelineEntryItem,
},
mixins: [noteable, resolvable, draftMixin],
......@@ -209,7 +209,10 @@ export default {
// we need to do this to prevent noteForm inconsistent content warning
// this is something we intentionally do so we need to recover the content
this.note.note = noteText;
this.$refs.noteBody.note.note = noteText;
const { noteBody } = this.$refs;
if (noteBody) {
noteBody.note.note = noteText;
}
},
},
};
......
......@@ -127,6 +127,9 @@ export default {
initUserPopovers(this.$el.querySelectorAll('.js-user-link'));
});
},
beforeDestroy() {
this.stopPolling();
},
methods: {
...mapActions([
'setLoadingState',
......@@ -144,6 +147,7 @@ export default {
'expandDiscussion',
'startTaskList',
'convertToDiscussion',
'stopPolling',
]),
fetchNotes() {
if (this.isFetching) return null;
......
import $ from 'jquery';
global.$ = $;
global.jQuery = $;
export default $;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment