diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/frontend/pipeline_editor/components/commit/commit_section_spec.js | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/frontend/pipeline_editor/components/commit/commit_section_spec.js')
-rw-r--r-- | spec/frontend/pipeline_editor/components/commit/commit_section_spec.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js b/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js index 9e677425807..39081e07e52 100644 --- a/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js +++ b/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js @@ -118,7 +118,8 @@ describe('Pipeline Editor | Commit section', () => { }); it('calls the mutation with the CREATE action', () => { - expect(mockMutate).toHaveBeenCalledTimes(1); + // the extra calls are for updating client queries (currentBranch and lastCommitBranch) + expect(mockMutate).toHaveBeenCalledTimes(3); expect(mockMutate).toHaveBeenCalledWith({ mutation: commitCreate, update: expect.any(Function), @@ -138,7 +139,7 @@ describe('Pipeline Editor | Commit section', () => { }); it('calls the mutation with the UPDATE action', () => { - expect(mockMutate).toHaveBeenCalledTimes(1); + expect(mockMutate).toHaveBeenCalledTimes(3); expect(mockMutate).toHaveBeenCalledWith({ mutation: commitCreate, update: expect.any(Function), @@ -158,7 +159,7 @@ describe('Pipeline Editor | Commit section', () => { }); it('calls the mutation with the current branch', () => { - expect(mockMutate).toHaveBeenCalledTimes(1); + expect(mockMutate).toHaveBeenCalledTimes(3); expect(mockMutate).toHaveBeenCalledWith({ mutation: commitCreate, update: expect.any(Function), @@ -181,7 +182,7 @@ describe('Pipeline Editor | Commit section', () => { it('a second commit submits the latest sha, keeping the form updated', async () => { await submitCommit(); - expect(mockMutate).toHaveBeenCalledTimes(2); + expect(mockMutate).toHaveBeenCalledTimes(6); expect(mockMutate).toHaveBeenCalledWith({ mutation: commitCreate, update: expect.any(Function), |