summaryrefslogtreecommitdiff
path: root/spec/javascripts/notes
diff options
context:
space:
mode:
authorAndré Luís <aluis@gitlab.com>2018-07-31 20:24:16 +0100
committerAndré Luís <aluis@gitlab.com>2018-08-01 15:26:57 +0100
commit8047b00fb6b315bdeb86525cc05b447a8defcb54 (patch)
treeaa4ad9b84d23fba8cbafde74f37e336c352e4378 /spec/javascripts/notes
parent677136741f58b1e159dc597da63662f29fcc1c0b (diff)
downloadgitlab-ce-8047b00fb6b315bdeb86525cc05b447a8defcb54.tar.gz
Reapply "Merge branch '_acet-fix-mr-autosave' into 'master'"
This reverts commit bd5b177b0fc48d77b5069b112faf36d151221be7.
Diffstat (limited to 'spec/javascripts/notes')
-rw-r--r--spec/javascripts/notes/components/noteable_discussion_spec.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/javascripts/notes/components/noteable_discussion_spec.js b/spec/javascripts/notes/components/noteable_discussion_spec.js
index 7da931fd9cb..f3f50aed232 100644
--- a/spec/javascripts/notes/components/noteable_discussion_spec.js
+++ b/spec/javascripts/notes/components/noteable_discussion_spec.js
@@ -46,10 +46,15 @@ describe('noteable_discussion component', () => {
it('should toggle reply form', done => {
vm.$el.querySelector('.js-vue-discussion-reply').click();
+
Vue.nextTick(() => {
- expect(vm.$refs.noteForm).not.toBeNull();
expect(vm.isReplying).toEqual(true);
- done();
+
+ // There is a watcher for `isReplying` which will init autosave in the next tick
+ Vue.nextTick(() => {
+ expect(vm.$refs.noteForm).not.toBeNull();
+ done();
+ });
});
});