Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 09:09:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 09:09:32 +0300
commitafb35e247139c24382a0bb3da893ce156e183be2 (patch)
tree82b74d1eaa6d17ddb53118b205fb91764a4f24d6 /spec/frontend/boards/stores/actions_spec.js
parent58c0ae1238785d0964789537be3d75f94e8d60dd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/stores/actions_spec.js')
-rw-r--r--spec/frontend/boards/stores/actions_spec.js56
1 files changed, 45 insertions, 11 deletions
diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js
index 62e0fa7a68a..5fc661f2fac 100644
--- a/spec/frontend/boards/stores/actions_spec.js
+++ b/spec/frontend/boards/stores/actions_spec.js
@@ -1331,20 +1331,54 @@ describe('addListItem', () => {
list: mockLists[0],
item: mockIssue,
position: 0,
+ inProgress: true,
};
- testAction(actions.addListItem, payload, {}, [
- {
- type: types.ADD_BOARD_ITEM_TO_LIST,
- payload: {
- listId: mockLists[0].id,
- itemId: mockIssue.id,
- atIndex: 0,
- inProgress: false,
+ testAction(
+ actions.addListItem,
+ payload,
+ {},
+ [
+ {
+ type: types.ADD_BOARD_ITEM_TO_LIST,
+ payload: {
+ listId: mockLists[0].id,
+ itemId: mockIssue.id,
+ atIndex: 0,
+ inProgress: true,
+ },
},
- },
- { type: types.UPDATE_BOARD_ITEM, payload: mockIssue },
- ]);
+ { type: types.UPDATE_BOARD_ITEM, payload: mockIssue },
+ ],
+ [],
+ );
+ });
+
+ it('should commit ADD_BOARD_ITEM_TO_LIST and UPDATE_BOARD_ITEM mutations, dispatch setActiveId action when inProgress is false', () => {
+ const payload = {
+ list: mockLists[0],
+ item: mockIssue,
+ position: 0,
+ };
+
+ testAction(
+ actions.addListItem,
+ payload,
+ {},
+ [
+ {
+ type: types.ADD_BOARD_ITEM_TO_LIST,
+ payload: {
+ listId: mockLists[0].id,
+ itemId: mockIssue.id,
+ atIndex: 0,
+ inProgress: false,
+ },
+ },
+ { type: types.UPDATE_BOARD_ITEM, payload: mockIssue },
+ ],
+ [{ type: 'setActiveId', payload: { id: mockIssue.id, sidebarType: ISSUABLE } }],
+ );
});
});