From 5b20366d04e3c672a37954f2fc374ca81296c4c1 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 19 May 2022 03:08:03 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/boards/stores/actions_spec.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'spec/frontend/boards/stores/actions_spec.js') diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js index eacf9db191e..e1c9fa10dde 100644 --- a/spec/frontend/boards/stores/actions_spec.js +++ b/spec/frontend/boards/stores/actions_spec.js @@ -84,6 +84,9 @@ describe('fetchBoard', () => { action: actions.fetchBoard, payload, expectedMutations: [ + { + type: types.REQUEST_CURRENT_BOARD, + }, { type: types.RECEIVE_BOARD_SUCCESS, payload: mockBoard, @@ -100,6 +103,9 @@ describe('fetchBoard', () => { action: actions.fetchBoard, payload, expectedMutations: [ + { + type: types.REQUEST_CURRENT_BOARD, + }, { type: types.RECEIVE_BOARD_FAILURE, }, @@ -133,6 +139,20 @@ describe('setBoardConfig', () => { }); }); +describe('setBoard', () => { + it('dispatches setBoardConfig', () => { + return testAction({ + action: actions.setBoard, + payload: mockBoard, + expectedMutations: [{ type: types.RECEIVE_BOARD_SUCCESS, payload: mockBoard }], + expectedActions: [ + { type: 'setBoardConfig', payload: mockBoard }, + { type: 'performSearch', payload: { resetLists: true } }, + ], + }); + }); +}); + describe('setFilters', () => { it.each([ [ @@ -172,7 +192,11 @@ describe('performSearch', () => { {}, {}, [], - [{ type: 'setFilters', payload: {} }, { type: 'fetchLists' }, { type: 'resetIssues' }], + [ + { type: 'setFilters', payload: {} }, + { type: 'fetchLists', payload: { resetLists: false } }, + { type: 'resetIssues' }, + ], ); }); }); -- cgit v1.2.3