diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-05-29 00:22:05 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-05-29 04:57:06 +0100 |
commit | c0e521e6b9afccb286d79bfed28131e332559598 (patch) | |
tree | 773c973533e07b70b441f5d8c0c7abbc61def5a5 | |
parent | 9daae83fdd14d2cfb5b4b9651cae178884892ac7 (diff) | |
download | gitlab-ce-missing-mount-note-app-spec.tar.gz |
Add missing mount in note_app_spec.jsmissing-mount-note-app-spec
-rw-r--r-- | spec/javascripts/notes/components/note_app_spec.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/javascripts/notes/components/note_app_spec.js b/spec/javascripts/notes/components/note_app_spec.js index f04af04f852..62af468ab5a 100644 --- a/spec/javascripts/notes/components/note_app_spec.js +++ b/spec/javascripts/notes/components/note_app_spec.js @@ -166,12 +166,22 @@ describe('note_app', () => { describe('update note', () => { describe('individual note', () => { beforeEach(done => { + console.log(1); Vue.http.interceptors.push(mockData.individualNoteInterceptor); + console.log(2); + console.log(Vue.http.interceptors); spyOn(service, 'updateNote').and.callThrough(); + console.log(3); wrapper = mountComponent(); + console.log(4); setTimeout(() => { + console.log(5); wrapper.find('.js-note-edit').trigger('click'); - Vue.nextTick(done); + console.log(6); + Vue.nextTick(() => { + console.log(7); + done(); + }); }, 0); }); @@ -182,8 +192,13 @@ describe('note_app', () => { ); }); - it('renders edit form', () => { + it('renders edit form', done => { + console.log(8); expect(wrapper.find('.js-vue-issue-note-form').exists()).toBe(true); + // Wait for the requests to finish before destroying + setTimeout(() => { + done(); + }); }); it('calls the service to update the note', done => { @@ -311,6 +326,7 @@ describe('note_app', () => { }, }); const toggleAwardAction = jasmine.createSpy('toggleAward'); + wrapper = mountComponent(); wrapper.vm.$store.hotUpdate({ actions: { toggleAward: toggleAwardAction, |