diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-04 21:08:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-04 21:08:46 +0300 |
commit | b41cd8cb92d53454b2b160ba922d33801933a9cf (patch) | |
tree | 3519da8856f8bf12ce9e75248e5ecb9ed4eacf14 /spec/javascripts/diffs | |
parent | 8d3aee3636da5181ae94d23b47c6794b5610ab01 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts/diffs')
-rw-r--r-- | spec/javascripts/diffs/components/app_spec.js | 9 | ||||
-rw-r--r-- | spec/javascripts/diffs/store/actions_spec.js | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/spec/javascripts/diffs/components/app_spec.js b/spec/javascripts/diffs/components/app_spec.js index 52f7674a7b3..7f028fb67c9 100644 --- a/spec/javascripts/diffs/components/app_spec.js +++ b/spec/javascripts/diffs/components/app_spec.js @@ -77,16 +77,17 @@ describe('diffs/components/app', () => { spyOn(wrapper.vm, 'startRenderDiffsQueue'); }); - it('calls fetchDiffFiles if diffsBatchLoad is not enabled', () => { + it('calls fetchDiffFiles if diffsBatchLoad is not enabled', done => { wrapper.vm.glFeatures.diffsBatchLoad = false; wrapper.vm.fetchData(false); expect(wrapper.vm.fetchDiffFiles).toHaveBeenCalled(); - wrapper.vm.$nextTick(() => { - expect(wrapper.vm.setDiscussions).toHaveBeenCalled(); + setTimeout(() => { expect(wrapper.vm.startRenderDiffsQueue).toHaveBeenCalled(); expect(wrapper.vm.fetchDiffFilesMeta).not.toHaveBeenCalled(); expect(wrapper.vm.fetchDiffFilesBatch).not.toHaveBeenCalled(); + + done(); }); }); @@ -97,7 +98,6 @@ describe('diffs/components/app', () => { expect(wrapper.vm.fetchDiffFiles).toHaveBeenCalled(); wrapper.vm.$nextTick(() => { - expect(wrapper.vm.setDiscussions).toHaveBeenCalled(); expect(wrapper.vm.startRenderDiffsQueue).toHaveBeenCalled(); expect(wrapper.vm.fetchDiffFilesMeta).not.toHaveBeenCalled(); expect(wrapper.vm.fetchDiffFilesBatch).not.toHaveBeenCalled(); @@ -110,7 +110,6 @@ describe('diffs/components/app', () => { expect(wrapper.vm.fetchDiffFiles).not.toHaveBeenCalled(); wrapper.vm.$nextTick(() => { - expect(wrapper.vm.setDiscussions).toHaveBeenCalled(); expect(wrapper.vm.startRenderDiffsQueue).toHaveBeenCalled(); expect(wrapper.vm.fetchDiffFilesMeta).toHaveBeenCalled(); expect(wrapper.vm.fetchDiffFilesBatch).toHaveBeenCalled(); diff --git a/spec/javascripts/diffs/store/actions_spec.js b/spec/javascripts/diffs/store/actions_spec.js index 3235febe0dc..12f76feb1ea 100644 --- a/spec/javascripts/diffs/store/actions_spec.js +++ b/spec/javascripts/diffs/store/actions_spec.js @@ -186,7 +186,7 @@ describe('DiffsStoreActions', () => { { type: types.SET_LOADING, payload: true }, { type: types.SET_LOADING, payload: false }, { type: types.SET_MERGE_REQUEST_DIFFS, payload: [] }, - { type: types.SET_DIFF_DATA, payload: { data, diff_files: [] } }, + { type: types.SET_DIFF_DATA, payload: { data } }, ], [], () => { |