Commit 9d193f5d authored by Phil Hughes's avatar Phil Hughes

Makes sure discussions show as resolved after applying suggestion

Instead of setting the suggestion as applied straight after
the response has been recieved, we wait until the
the resolved request has finished which sets the suggestion
as applied.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/285635
parent 6f2da83d
......@@ -568,7 +568,6 @@ export const submitSuggestion = (
dispatch('stopPolling');
return Api.applySuggestion(suggestionId)
.then(() => commit(types.APPLY_SUGGESTION, { discussionId, noteId, suggestionId }))
.then(dispatchResolveDiscussion)
.catch((err) => {
const defaultMessage = __(
......
---
title: Fixed applied message showing before discussion gets resolved
merge_request:
author:
type: fixed
......@@ -918,7 +918,6 @@ describe('Actions Notes Store', () => {
testSubmitSuggestion(done, () => {
expect(commit.mock.calls).toEqual([
[mutationTypes.SET_RESOLVING_DISCUSSION, true],
[mutationTypes.APPLY_SUGGESTION, { discussionId, noteId, suggestionId }],
[mutationTypes.SET_RESOLVING_DISCUSSION, false],
]);
......
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