Skip to content
Snippets Groups Projects

Users can apply multiple suggestions at once.

Merged Jesse Hall requested to merge jessehall3/gitlab-ee:25486-batch-suggestions into master
2 files
+ 33
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -15,6 +15,7 @@ import {
userDataMock,
noteableDataMock,
individualNote,
batchSuggestionInfoMock,
} from '../mock_data';
import axios from '~/lib/utils/axios_utils';
@@ -876,6 +877,32 @@ describe('Actions Notes Store', () => {
});
});
describe('pushSuggestionToBatch', () => {
it('adds a suggestion\'s info to the current batch', done => {
testAction(
actions.pushSuggestionToBatch,
batchSuggestionInfoMock,
{ batchSuggestionsInfo: [] },
[{ type: 'ADD_SUGGESTION_TO_BATCH', payload: batchSuggestionInfoMock }],
[],
done,
);
});
});
describe('popSuggestionFromBatch', () => {
it('removes a suggestion\'s info the current batch', done => {
testAction(
actions.popSuggestionFromBatch,
batchSuggestionInfoMock.suggestionId,
{ batchSuggestionsInfo: [batchSuggestionInfoMock] },
[{ type: 'REMOVE_SUGGESTION_FROM_BATCH', payload: batchSuggestionInfoMock.suggestionId }],
[],
done,
);
});
});
describe('filterDiscussion', () => {
const path = 'some-discussion-path';
const filter = 0;
Loading