Commit b6bbcfe1 authored by Florie Guibert's avatar Florie Guibert

Delete epic board list

Review feedback
parent 354c8f01
...@@ -265,9 +265,8 @@ export default { ...@@ -265,9 +265,8 @@ export default {
commit(types.TOGGLE_LIST_COLLAPSED, { listId, collapsed }); commit(types.TOGGLE_LIST_COLLAPSED, { listId, collapsed });
}, },
removeList: ({ state, commit }, listId) => { removeList: ({ state: { issuableType, boardLists }, commit }, listId) => {
const { issuableType } = state; const listsBackup = { ...boardLists };
const listsBackup = { ...state.boardLists };
commit(types.REMOVE_LIST, listId); commit(types.REMOVE_LIST, listId);
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
formatIssue, formatIssue,
getMoveData, getMoveData,
} from '~/boards/boards_util'; } from '~/boards/boards_util';
import { inactiveId, ISSUABLE, ListType } from '~/boards/constants'; import { inactiveId, ISSUABLE, ListType, issuableTypes } from '~/boards/constants';
import destroyBoardListMutation from '~/boards/graphql/board_list_destroy.mutation.graphql'; import destroyBoardListMutation from '~/boards/graphql/board_list_destroy.mutation.graphql';
import issueCreateMutation from '~/boards/graphql/issue_create.mutation.graphql'; import issueCreateMutation from '~/boards/graphql/issue_create.mutation.graphql';
import actions, { gqlClient } from '~/boards/stores/actions'; import actions, { gqlClient } from '~/boards/stores/actions';
...@@ -459,7 +459,7 @@ describe('updateList', () => { ...@@ -459,7 +459,7 @@ describe('updateList', () => {
boardType: 'group', boardType: 'group',
disabled: false, disabled: false,
boardLists: [{ type: 'closed' }], boardLists: [{ type: 'closed' }],
issuableType: 'issue', issuableType: issuableTypes.issue,
}; };
testAction( testAction(
...@@ -503,7 +503,7 @@ describe('removeList', () => { ...@@ -503,7 +503,7 @@ describe('removeList', () => {
beforeEach(() => { beforeEach(() => {
state = { state = {
boardLists: mockListsById, boardLists: mockListsById,
issuableType: 'issue', issuableType: issuableTypes.issue,
}; };
}); });
...@@ -1376,7 +1376,7 @@ describe('setActiveItemSubscribed', () => { ...@@ -1376,7 +1376,7 @@ describe('setActiveItemSubscribed', () => {
[mockActiveIssue.id]: mockActiveIssue, [mockActiveIssue.id]: mockActiveIssue,
}, },
fullPath: 'gitlab-org', fullPath: 'gitlab-org',
issuableType: 'issue', issuableType: issuableTypes.issue,
}; };
const getters = { activeBoardItem: mockActiveIssue, isEpicBoard: false }; const getters = { activeBoardItem: mockActiveIssue, isEpicBoard: false };
const subscribedState = true; const subscribedState = true;
...@@ -1484,7 +1484,7 @@ describe('setActiveIssueMilestone', () => { ...@@ -1484,7 +1484,7 @@ describe('setActiveIssueMilestone', () => {
describe('setActiveItemTitle', () => { describe('setActiveItemTitle', () => {
const state = { const state = {
boardItems: { [mockIssue.id]: mockIssue }, boardItems: { [mockIssue.id]: mockIssue },
issuableType: 'issue', issuableType: issuableTypes.issue,
fullPath: 'path/f', fullPath: 'path/f',
}; };
const getters = { activeBoardItem: mockIssue, isEpicBoard: false }; const getters = { activeBoardItem: mockIssue, isEpicBoard: 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