diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/frontend/notes/stores | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/frontend/notes/stores')
-rw-r--r-- | spec/frontend/notes/stores/actions_spec.js | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/spec/frontend/notes/stores/actions_spec.js b/spec/frontend/notes/stores/actions_spec.js index f972ff0d2e4..9b7456d54bc 100644 --- a/spec/frontend/notes/stores/actions_spec.js +++ b/spec/frontend/notes/stores/actions_spec.js @@ -253,85 +253,6 @@ describe('Actions Notes Store', () => { }); }); - describe('fetchData', () => { - describe('given there are no notes', () => { - const lastFetchedAt = '13579'; - - beforeEach(() => { - axiosMock - .onGet(notesDataMock.notesPath) - .replyOnce(200, { notes: [], last_fetched_at: lastFetchedAt }); - }); - - it('should commit SET_LAST_FETCHED_AT', () => - testAction( - actions.fetchData, - undefined, - { notesData: notesDataMock }, - [{ type: 'SET_LAST_FETCHED_AT', payload: lastFetchedAt }], - [], - )); - }); - - describe('given there are notes', () => { - const lastFetchedAt = '12358'; - - beforeEach(() => { - axiosMock - .onGet(notesDataMock.notesPath) - .replyOnce(200, { notes: discussionMock.notes, last_fetched_at: lastFetchedAt }); - }); - - it('should dispatch updateOrCreateNotes, startTaskList and commit SET_LAST_FETCHED_AT', () => - testAction( - actions.fetchData, - undefined, - { notesData: notesDataMock }, - [{ type: 'SET_LAST_FETCHED_AT', payload: lastFetchedAt }], - [ - { type: 'updateOrCreateNotes', payload: discussionMock.notes }, - { type: 'startTaskList' }, - { type: 'updateResolvableDiscussionsCounts' }, - ], - )); - }); - - describe('paginated notes feature flag enabled', () => { - const lastFetchedAt = '12358'; - - beforeEach(() => { - window.gon = { features: { paginatedNotes: true } }; - - axiosMock.onGet(notesDataMock.notesPath).replyOnce(200, { - notes: discussionMock.notes, - more: false, - last_fetched_at: lastFetchedAt, - }); - }); - - afterEach(() => { - window.gon = null; - }); - - it('should dispatch setFetchingState, setNotesFetchedState, setLoadingState, updateOrCreateNotes, startTaskList and commit SET_LAST_FETCHED_AT', () => { - return testAction( - actions.fetchData, - null, - { notesData: notesDataMock, isFetching: true }, - [{ type: 'SET_LAST_FETCHED_AT', payload: lastFetchedAt }], - [ - { type: 'setFetchingState', payload: false }, - { type: 'setNotesFetchedState', payload: true }, - { type: 'setLoadingState', payload: false }, - { type: 'updateOrCreateNotes', payload: discussionMock.notes }, - { type: 'startTaskList' }, - { type: 'updateResolvableDiscussionsCounts' }, - ], - ); - }); - }); - }); - describe('poll', () => { beforeEach((done) => { axiosMock |