diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-25 18:09:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-25 18:09:02 +0300 |
commit | d1c0c1c4c3241eae6795562d8a0c22def6771238 (patch) | |
tree | 676e20b1bbee71a6a78b95dd517f0ffa7e684f96 /spec/frontend/notes | |
parent | fc4faf47ac4e5f1ddc40640c42c32405c38c9455 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes')
-rw-r--r-- | spec/frontend/notes/stores/actions_spec.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/frontend/notes/stores/actions_spec.js b/spec/frontend/notes/stores/actions_spec.js index 97249d232dc..4083546a711 100644 --- a/spec/frontend/notes/stores/actions_spec.js +++ b/spec/frontend/notes/stores/actions_spec.js @@ -68,6 +68,8 @@ describe('Actions Notes Store', () => { resetStore(store); axiosMock.restore(); resetHTMLFixture(); + + window.gon = {}; }); describe('setNotesData', () => { @@ -1467,6 +1469,29 @@ describe('Actions Notes Store', () => { ); }); + it('dispatches `fetchDiscussionsBatch` action with notes_filter 0 for merge request', () => { + window.gon = { features: { mrActivityFilters: true } }; + + return testAction( + actions.fetchDiscussions, + { path: 'test-path', filter: 'test-filter', persistFilter: 'test-persist-filter' }, + { noteableType: notesConstants.MERGE_REQUEST_NOTEABLE_TYPE }, + [], + [ + { + type: 'fetchDiscussionsBatch', + payload: { + config: { + params: { notes_filter: 0, persist_filter: false }, + }, + path: 'test-path', + perPage: 20, + }, + }, + ], + ); + }); + it('dispatches `fetchDiscussionsBatch` action if noteable is an Issue', () => { return testAction( actions.fetchDiscussions, |