Commit 3e417f4b authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Phil Hughes

Create empty Vuex store for issue boards

parent 0c1cd36a
const notImplemented = () => {
throw new Error('Not implemented!');
};
export default {
setEndpoints: () => {
notImplemented();
},
fetchLists: () => {
notImplemented();
},
generateDefaultLists: () => {
notImplemented();
},
createList: () => {
notImplemented();
},
updateList: () => {
notImplemented();
},
deleteList: () => {
notImplemented();
},
fetchIssuesForList: () => {
notImplemented();
},
moveIssue: () => {
notImplemented();
},
createNewIssue: () => {
notImplemented();
},
fetchBacklog: () => {
notImplemented();
},
bulkUpdateIssues: () => {
notImplemented();
},
fetchIssue: () => {
notImplemented();
},
toggleIssueSubscription: () => {
notImplemented();
},
showPage: () => {
notImplemented();
},
toggleEmptyState: () => {
notImplemented();
},
};
import Vue from 'vue';
import Vuex from 'vuex';
import state from 'ee_else_ce/boards/stores/state';
import actions from 'ee_else_ce/boards/stores/actions';
import mutations from 'ee_else_ce/boards/stores/mutations';
Vue.use(Vuex);
export default () =>
new Vuex.Store({
state,
actions,
mutations,
});
export const SET_ENDPOINTS = 'SET_ENDPOINTS';
export const REQUEST_ADD_LIST = 'REQUEST_ADD_LIST';
export const RECEIVE_ADD_LIST_SUCCESS = 'RECEIVE_ADD_LIST_SUCCESS';
export const RECEIVE_ADD_LIST_ERROR = 'RECEIVE_ADD_LIST_ERROR';
export const REQUEST_UPDATE_LIST = 'REQUEST_UPDATE_LIST';
export const RECEIVE_UPDATE_LIST_SUCCESS = 'RECEIVE_UPDATE_LIST_SUCCESS';
export const RECEIVE_UPDATE_LIST_ERROR = 'RECEIVE_UPDATE_LIST_ERROR';
export const REQUEST_REMOVE_LIST = 'REQUEST_REMOVE_LIST';
export const RECEIVE_REMOVE_LIST_SUCCESS = 'RECEIVE_REMOVE_LIST_SUCCESS';
export const RECEIVE_REMOVE_LIST_ERROR = 'RECEIVE_REMOVE_LIST_ERROR';
export const REQUEST_ADD_ISSUE = 'REQUEST_ADD_ISSUE';
export const RECEIVE_ADD_ISSUE_SUCCESS = 'RECEIVE_ADD_ISSUE_SUCCESS';
export const RECEIVE_ADD_ISSUE_ERROR = 'RECEIVE_ADD_ISSUE_ERROR';
export const REQUEST_MOVE_ISSUE = 'REQUEST_MOVE_ISSUE';
export const RECEIVE_MOVE_ISSUE_SUCCESS = 'RECEIVE_MOVE_ISSUE_SUCCESS';
export const RECEIVE_MOVE_ISSUE_ERROR = 'RECEIVE_MOVE_ISSUE_ERROR';
export const REQUEST_UPDATE_ISSUE = 'REQUEST_UPDATE_ISSUE';
export const RECEIVE_UPDATE_ISSUE_SUCCESS = 'RECEIVE_UPDATE_ISSUE_SUCCESS';
export const RECEIVE_UPDATE_ISSUE_ERROR = 'RECEIVE_UPDATE_ISSUE_ERROR';
export const SET_CURRENT_PAGE = 'SET_CURRENT_PAGE';
export const TOGGLE_EMPTY_STATE = 'TOGGLE_EMPTY_STATE';
import * as mutationTypes from './mutation_types';
const notImplemented = () => {
throw new Error('Not implemented!');
};
export default {
[mutationTypes.SET_ENDPOINTS]: () => {
notImplemented();
},
[mutationTypes.REQUEST_ADD_LIST]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_ADD_LIST_SUCCESS]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_ADD_LIST_ERROR]: () => {
notImplemented();
},
[mutationTypes.REQUEST_UPDATE_LIST]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_UPDATE_LIST_SUCCESS]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_UPDATE_LIST_ERROR]: () => {
notImplemented();
},
[mutationTypes.REQUEST_REMOVE_LIST]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_REMOVE_LIST_SUCCESS]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_REMOVE_LIST_ERROR]: () => {
notImplemented();
},
[mutationTypes.REQUEST_ADD_ISSUE]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_ADD_ISSUE_SUCCESS]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_ADD_ISSUE_ERROR]: () => {
notImplemented();
},
[mutationTypes.REQUEST_MOVE_ISSUE]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_MOVE_ISSUE_SUCCESS]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_MOVE_ISSUE_ERROR]: () => {
notImplemented();
},
[mutationTypes.REQUEST_UPDATE_ISSUE]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_UPDATE_ISSUE_SUCCESS]: () => {
notImplemented();
},
[mutationTypes.RECEIVE_UPDATE_ISSUE_ERROR]: () => {
notImplemented();
},
[mutationTypes.SET_CURRENT_PAGE]: () => {
notImplemented();
},
[mutationTypes.TOGGLE_EMPTY_STATE]: () => {
notImplemented();
},
};
export default () => ({
// ...
});
import actions from '~/boards/stores/actions';
const expectNotImplemented = action => {
it('is not implemented', () => {
expect(action).toThrow(new Error('Not implemented!'));
});
};
describe('setEndpoints', () => {
expectNotImplemented(actions.setEndpoints);
});
describe('fetchLists', () => {
expectNotImplemented(actions.fetchLists);
});
describe('generateDefaultLists', () => {
expectNotImplemented(actions.generateDefaultLists);
});
describe('createList', () => {
expectNotImplemented(actions.createList);
});
describe('updateList', () => {
expectNotImplemented(actions.updateList);
});
describe('deleteList', () => {
expectNotImplemented(actions.deleteList);
});
describe('fetchIssuesForList', () => {
expectNotImplemented(actions.fetchIssuesForList);
});
describe('moveIssue', () => {
expectNotImplemented(actions.moveIssue);
});
describe('createNewIssue', () => {
expectNotImplemented(actions.createNewIssue);
});
describe('fetchBacklog', () => {
expectNotImplemented(actions.fetchBacklog);
});
describe('bulkUpdateIssues', () => {
expectNotImplemented(actions.bulkUpdateIssues);
});
describe('fetchIssue', () => {
expectNotImplemented(actions.fetchIssue);
});
describe('toggleIssueSubscription', () => {
expectNotImplemented(actions.toggleIssueSubscription);
});
describe('showPage', () => {
expectNotImplemented(actions.showPage);
});
describe('toggleEmptyState', () => {
expectNotImplemented(actions.toggleEmptyState);
});
import mutations from '~/boards/stores/mutations';
const expectNotImplemented = action => {
it('is not implemented', () => {
expect(action).toThrow(new Error('Not implemented!'));
});
};
describe('SET_ENDPOINTS', () => {
expectNotImplemented(mutations.SET_ENDPOINTS);
});
describe('REQUEST_ADD_LIST', () => {
expectNotImplemented(mutations.REQUEST_ADD_LIST);
});
describe('RECEIVE_ADD_LIST_SUCCESS', () => {
expectNotImplemented(mutations.RECEIVE_ADD_LIST_SUCCESS);
});
describe('RECEIVE_ADD_LIST_ERROR', () => {
expectNotImplemented(mutations.RECEIVE_ADD_LIST_ERROR);
});
describe('REQUEST_UPDATE_LIST', () => {
expectNotImplemented(mutations.REQUEST_UPDATE_LIST);
});
describe('RECEIVE_UPDATE_LIST_SUCCESS', () => {
expectNotImplemented(mutations.RECEIVE_UPDATE_LIST_SUCCESS);
});
describe('RECEIVE_UPDATE_LIST_ERROR', () => {
expectNotImplemented(mutations.RECEIVE_UPDATE_LIST_ERROR);
});
describe('REQUEST_REMOVE_LIST', () => {
expectNotImplemented(mutations.REQUEST_REMOVE_LIST);
});
describe('RECEIVE_REMOVE_LIST_SUCCESS', () => {
expectNotImplemented(mutations.RECEIVE_REMOVE_LIST_SUCCESS);
});
describe('RECEIVE_REMOVE_LIST_ERROR', () => {
expectNotImplemented(mutations.RECEIVE_REMOVE_LIST_ERROR);
});
describe('REQUEST_ADD_ISSUE', () => {
expectNotImplemented(mutations.REQUEST_ADD_ISSUE);
});
describe('RECEIVE_ADD_ISSUE_SUCCESS', () => {
expectNotImplemented(mutations.RECEIVE_ADD_ISSUE_SUCCESS);
});
describe('RECEIVE_ADD_ISSUE_ERROR', () => {
expectNotImplemented(mutations.RECEIVE_ADD_ISSUE_ERROR);
});
describe('REQUEST_MOVE_ISSUE', () => {
expectNotImplemented(mutations.REQUEST_MOVE_ISSUE);
});
describe('RECEIVE_MOVE_ISSUE_SUCCESS', () => {
expectNotImplemented(mutations.RECEIVE_MOVE_ISSUE_SUCCESS);
});
describe('RECEIVE_MOVE_ISSUE_ERROR', () => {
expectNotImplemented(mutations.RECEIVE_MOVE_ISSUE_ERROR);
});
describe('REQUEST_UPDATE_ISSUE', () => {
expectNotImplemented(mutations.REQUEST_UPDATE_ISSUE);
});
describe('RECEIVE_UPDATE_ISSUE_SUCCESS', () => {
expectNotImplemented(mutations.RECEIVE_UPDATE_ISSUE_SUCCESS);
});
describe('RECEIVE_UPDATE_ISSUE_ERROR', () => {
expectNotImplemented(mutations.RECEIVE_UPDATE_ISSUE_ERROR);
});
describe('SET_CURRENT_PAGE', () => {
expectNotImplemented(mutations.SET_CURRENT_PAGE);
});
describe('TOGGLE_EMPTY_STATE', () => {
expectNotImplemented(mutations.TOGGLE_EMPTY_STATE);
});
import createState from '~/boards/stores/state';
describe('createState', () => {
it('is a function', () => {
expect(createState).toEqual(expect.any(Function));
});
it('returns an object', () => {
expect(createState()).toEqual(expect.any(Object));
});
});
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