diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /spec/frontend/add_context_commits_modal | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'spec/frontend/add_context_commits_modal')
-rw-r--r-- | spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js b/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js index 6904e34db5d..1a3b151afa0 100644 --- a/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js +++ b/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js @@ -78,7 +78,7 @@ describe('AddContextCommitsModal', () => { findSearch().vm.$emit('input', searchText); expect(searchCommits).not.toBeCalled(); jest.advanceTimersByTime(500); - expect(searchCommits).toHaveBeenCalledWith(expect.anything(), searchText, undefined); + expect(searchCommits).toHaveBeenCalledWith(expect.anything(), searchText); }); it('disabled ok button when no row is selected', () => { @@ -119,18 +119,17 @@ describe('AddContextCommitsModal', () => { wrapper.vm.$store.state.selectedCommits = [{ ...commit, isSelected: true }]; findModal().vm.$emit('ok'); return wrapper.vm.$nextTick().then(() => { - expect(createContextCommits).toHaveBeenCalledWith( - expect.anything(), - { commits: [{ ...commit, isSelected: true }], forceReload: true }, - undefined, - ); + expect(createContextCommits).toHaveBeenCalledWith(expect.anything(), { + commits: [{ ...commit, isSelected: true }], + forceReload: true, + }); }); }); it('"removeContextCommits" when only added commits are to be removed ', () => { wrapper.vm.$store.state.toRemoveCommits = [commit.short_id]; findModal().vm.$emit('ok'); return wrapper.vm.$nextTick().then(() => { - expect(removeContextCommits).toHaveBeenCalledWith(expect.anything(), true, undefined); + expect(removeContextCommits).toHaveBeenCalledWith(expect.anything(), true); }); }); it('"createContextCommits" and "removeContextCommits" when new commits are to be added and old commits are to be removed', () => { @@ -138,12 +137,10 @@ describe('AddContextCommitsModal', () => { wrapper.vm.$store.state.toRemoveCommits = [commit.short_id]; findModal().vm.$emit('ok'); return wrapper.vm.$nextTick().then(() => { - expect(createContextCommits).toHaveBeenCalledWith( - expect.anything(), - { commits: [{ ...commit, isSelected: true }] }, - undefined, - ); - expect(removeContextCommits).toHaveBeenCalledWith(expect.anything(), undefined, undefined); + expect(createContextCommits).toHaveBeenCalledWith(expect.anything(), { + commits: [{ ...commit, isSelected: true }], + }); + expect(removeContextCommits).toHaveBeenCalledWith(expect.anything(), undefined); }); }); }); @@ -156,7 +153,7 @@ describe('AddContextCommitsModal', () => { }); it('"resetModalState" to reset all the modal state', () => { findModal().vm.$emit('cancel'); - expect(resetModalState).toHaveBeenCalledWith(expect.anything(), undefined, undefined); + expect(resetModalState).toHaveBeenCalledWith(expect.anything(), undefined); }); }); @@ -168,7 +165,7 @@ describe('AddContextCommitsModal', () => { }); it('"resetModalState" to reset all the modal state', () => { findModal().vm.$emit('close'); - expect(resetModalState).toHaveBeenCalledWith(expect.anything(), undefined, undefined); + expect(resetModalState).toHaveBeenCalledWith(expect.anything(), undefined); }); }); }); |