Commit c2429ed5 authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Clement Ho

Fix typo in updateResolvableDiscussionsCounts action

parent a0c98f70
...@@ -267,7 +267,7 @@ export const saveDiffDiscussion = ({ state, dispatch }, { note, formData }) => { ...@@ -267,7 +267,7 @@ export const saveDiffDiscussion = ({ state, dispatch }, { note, formData }) => {
return dispatch('saveNote', postData, { root: true }) return dispatch('saveNote', postData, { root: true })
.then(result => dispatch('updateDiscussion', result.discussion, { root: true })) .then(result => dispatch('updateDiscussion', result.discussion, { root: true }))
.then(discussion => dispatch('assignDiscussionsToDiff', [discussion])) .then(discussion => dispatch('assignDiscussionsToDiff', [discussion]))
.then(() => dispatch('updateResolvableDiscussonsCounts', null, { root: true })) .then(() => dispatch('updateResolvableDiscussionsCounts', null, { root: true }))
.then(() => dispatch('closeDiffFileCommentForm', formData.diffFile.file_hash)) .then(() => dispatch('closeDiffFileCommentForm', formData.diffFile.file_hash))
.catch(() => createFlash(s__('MergeRequests|Saving the comment failed'))); .catch(() => createFlash(s__('MergeRequests|Saving the comment failed')));
}; };
......
...@@ -51,7 +51,7 @@ export const fetchDiscussions = ({ commit, dispatch }, { path, filter }) => ...@@ -51,7 +51,7 @@ export const fetchDiscussions = ({ commit, dispatch }, { path, filter }) =>
.then(res => res.json()) .then(res => res.json())
.then(discussions => { .then(discussions => {
commit(types.SET_INITIAL_DISCUSSIONS, discussions); commit(types.SET_INITIAL_DISCUSSIONS, discussions);
dispatch('updateResolvableDiscussonsCounts'); dispatch('updateResolvableDiscussionsCounts');
}); });
export const updateDiscussion = ({ commit, state }, discussion) => { export const updateDiscussion = ({ commit, state }, discussion) => {
...@@ -67,7 +67,7 @@ export const deleteNote = ({ commit, dispatch, state }, note) => ...@@ -67,7 +67,7 @@ export const deleteNote = ({ commit, dispatch, state }, note) =>
commit(types.DELETE_NOTE, note); commit(types.DELETE_NOTE, note);
dispatch('updateMergeRequestWidget'); dispatch('updateMergeRequestWidget');
dispatch('updateResolvableDiscussonsCounts'); dispatch('updateResolvableDiscussionsCounts');
if (isInMRPage()) { if (isInMRPage()) {
dispatch('diffs/removeDiscussionsFromDiff', discussion); dispatch('diffs/removeDiscussionsFromDiff', discussion);
...@@ -117,7 +117,7 @@ export const replyToDiscussion = ({ commit, state, getters, dispatch }, { endpoi ...@@ -117,7 +117,7 @@ export const replyToDiscussion = ({ commit, state, getters, dispatch }, { endpoi
dispatch('updateMergeRequestWidget'); dispatch('updateMergeRequestWidget');
dispatch('startTaskList'); dispatch('startTaskList');
dispatch('updateResolvableDiscussonsCounts'); dispatch('updateResolvableDiscussionsCounts');
} else { } else {
commit(types.ADD_NEW_REPLY_TO_DISCUSSION, res); commit(types.ADD_NEW_REPLY_TO_DISCUSSION, res);
} }
...@@ -135,7 +135,7 @@ export const createNewNote = ({ commit, dispatch }, { endpoint, data }) => ...@@ -135,7 +135,7 @@ export const createNewNote = ({ commit, dispatch }, { endpoint, data }) =>
dispatch('updateMergeRequestWidget'); dispatch('updateMergeRequestWidget');
dispatch('startTaskList'); dispatch('startTaskList');
dispatch('updateResolvableDiscussonsCounts'); dispatch('updateResolvableDiscussionsCounts');
} }
return res; return res;
}); });
...@@ -168,7 +168,7 @@ export const toggleResolveNote = ({ commit, dispatch }, { endpoint, isResolved, ...@@ -168,7 +168,7 @@ export const toggleResolveNote = ({ commit, dispatch }, { endpoint, isResolved,
commit(mutationType, res); commit(mutationType, res);
dispatch('updateResolvableDiscussonsCounts'); dispatch('updateResolvableDiscussionsCounts');
dispatch('updateMergeRequestWidget'); dispatch('updateMergeRequestWidget');
}); });
...@@ -442,7 +442,7 @@ export const startTaskList = ({ dispatch }) => ...@@ -442,7 +442,7 @@ export const startTaskList = ({ dispatch }) =>
}), }),
); );
export const updateResolvableDiscussonsCounts = ({ commit }) => export const updateResolvableDiscussionsCounts = ({ commit }) =>
commit(types.UPDATE_RESOLVABLE_DISCUSSIONS_COUNTS); commit(types.UPDATE_RESOLVABLE_DISCUSSIONS_COUNTS);
export const submitSuggestion = ( export const submitSuggestion = (
......
---
title: Fix typo in updateResolvableDiscussionsCounts action
merge_request: 30278
author: Frank van Rest
type: other
...@@ -373,7 +373,7 @@ describe('Actions Notes Store', () => { ...@@ -373,7 +373,7 @@ describe('Actions Notes Store', () => {
type: 'updateMergeRequestWidget', type: 'updateMergeRequestWidget',
}, },
{ {
type: 'updateResolvableDiscussonsCounts', type: 'updateResolvableDiscussionsCounts',
}, },
], ],
done, done,
...@@ -400,7 +400,7 @@ describe('Actions Notes Store', () => { ...@@ -400,7 +400,7 @@ describe('Actions Notes Store', () => {
type: 'updateMergeRequestWidget', type: 'updateMergeRequestWidget',
}, },
{ {
type: 'updateResolvableDiscussonsCounts', type: 'updateResolvableDiscussionsCounts',
}, },
{ {
type: 'diffs/removeDiscussionsFromDiff', type: 'diffs/removeDiscussionsFromDiff',
...@@ -452,7 +452,7 @@ describe('Actions Notes Store', () => { ...@@ -452,7 +452,7 @@ describe('Actions Notes Store', () => {
type: 'startTaskList', type: 'startTaskList',
}, },
{ {
type: 'updateResolvableDiscussonsCounts', type: 'updateResolvableDiscussionsCounts',
}, },
], ],
done, done,
...@@ -527,7 +527,7 @@ describe('Actions Notes Store', () => { ...@@ -527,7 +527,7 @@ describe('Actions Notes Store', () => {
], ],
[ [
{ {
type: 'updateResolvableDiscussonsCounts', type: 'updateResolvableDiscussionsCounts',
}, },
{ {
type: 'updateMergeRequestWidget', type: 'updateMergeRequestWidget',
...@@ -552,7 +552,7 @@ describe('Actions Notes Store', () => { ...@@ -552,7 +552,7 @@ describe('Actions Notes Store', () => {
], ],
[ [
{ {
type: 'updateResolvableDiscussonsCounts', type: 'updateResolvableDiscussionsCounts',
}, },
{ {
type: 'updateMergeRequestWidget', type: 'updateMergeRequestWidget',
...@@ -587,10 +587,10 @@ describe('Actions Notes Store', () => { ...@@ -587,10 +587,10 @@ describe('Actions Notes Store', () => {
}); });
}); });
describe('updateResolvableDiscussonsCounts', () => { describe('updateResolvableDiscussionsCounts', () => {
it('commits UPDATE_RESOLVABLE_DISCUSSIONS_COUNTS', done => { it('commits UPDATE_RESOLVABLE_DISCUSSIONS_COUNTS', done => {
testAction( testAction(
actions.updateResolvableDiscussonsCounts, actions.updateResolvableDiscussionsCounts,
null, null,
{}, {},
[{ type: 'UPDATE_RESOLVABLE_DISCUSSIONS_COUNTS' }], [{ type: 'UPDATE_RESOLVABLE_DISCUSSIONS_COUNTS' }],
...@@ -712,7 +712,7 @@ describe('Actions Notes Store', () => { ...@@ -712,7 +712,7 @@ describe('Actions Notes Store', () => {
[ [
{ type: 'updateMergeRequestWidget' }, { type: 'updateMergeRequestWidget' },
{ type: 'startTaskList' }, { type: 'startTaskList' },
{ type: 'updateResolvableDiscussonsCounts' }, { type: 'updateResolvableDiscussionsCounts' },
], ],
done, done,
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment