diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-15 21:07:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-15 21:07:01 +0300 |
commit | 854a0164ea775b84f5ef2508926780144bbc981a (patch) | |
tree | 648f210654b6a4f723061ae44e4265b6b15964e7 /spec/frontend/diffs | |
parent | a29eae68f453c371271641899e00ea24339fb1c6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/diffs')
-rw-r--r-- | spec/frontend/diffs/store/actions_spec.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js index c68f3c5991e..ceaaa32a0e8 100644 --- a/spec/frontend/diffs/store/actions_spec.js +++ b/spec/frontend/diffs/store/actions_spec.js @@ -183,6 +183,7 @@ describe('DiffsStoreActions', () => { new_path: 'new/123', w: '1', view: 'inline', + diff_head: true, }; const diffForPath = mergeUrlParams(defaultParams, endpointDiffForPath); const treeEntry = { @@ -258,7 +259,9 @@ describe('DiffsStoreActions', () => { // wait for the mocked network request to return and start processing the .then await waitForPromises(); - expect(mock.history.get[0].url).toEqual(finalPath); + expect(mock.history.get[0].url).toContain( + 'old_path=old%2F123&new_path=new%2F123&w=1&view=inline&commit_id=123', + ); }); describe('version parameters', () => { @@ -287,6 +290,7 @@ describe('DiffsStoreActions', () => { endpointDiffForPath, ); state.mergeRequestDiff = { version_path: versionPath }; + state.endpointBatch = versionPath; mock.onGet(finalPath).reply(HTTP_STATUS_OK, fileResult); diffActions.prefetchSingleFile({ state, getters, commit }, treeEntry); @@ -351,6 +355,7 @@ describe('DiffsStoreActions', () => { new_path: 'new/123', w: '1', view: 'inline', + diff_head: true, }; const diffForPath = mergeUrlParams(defaultParams, endpointDiffForPath); const treeEntry = { @@ -446,7 +451,9 @@ describe('DiffsStoreActions', () => { // wait for the mocked network request to return and start processing the .then await waitForPromises(); - expect(mock.history.get[0].url).toEqual(finalPath); + expect(mock.history.get[0].url).toContain( + 'old_path=old%2F123&new_path=new%2F123&w=1&view=inline&commit_id=123', + ); }); describe('version parameters', () => { @@ -474,7 +481,7 @@ describe('DiffsStoreActions', () => { { ...defaultParams, diff_id, start_sha }, endpointDiffForPath, ); - state.mergeRequestDiff = { version_path: versionPath }; + state.endpointBatch = versionPath; mock.onGet(finalPath).reply(HTTP_STATUS_OK, fileResult); diffActions.fetchFileByFile({ state, getters, commit }); |