From 3e417f4ba22ed53f808c3e0fdc5de0350d62d2c2 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Mon, 20 May 2019 11:05:26 +0000 Subject: Create empty Vuex store for issue boards --- spec/frontend/boards/stores/actions_spec.js | 67 ++++++++++++++++++++ spec/frontend/boards/stores/mutations_spec.js | 91 +++++++++++++++++++++++++++ spec/frontend/boards/stores/state_spec.js | 11 ++++ 3 files changed, 169 insertions(+) create mode 100644 spec/frontend/boards/stores/actions_spec.js create mode 100644 spec/frontend/boards/stores/mutations_spec.js create mode 100644 spec/frontend/boards/stores/state_spec.js (limited to 'spec/frontend/boards') diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js new file mode 100644 index 00000000000..d23393db60d --- /dev/null +++ b/spec/frontend/boards/stores/actions_spec.js @@ -0,0 +1,67 @@ +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); +}); diff --git a/spec/frontend/boards/stores/mutations_spec.js b/spec/frontend/boards/stores/mutations_spec.js new file mode 100644 index 00000000000..aa477766978 --- /dev/null +++ b/spec/frontend/boards/stores/mutations_spec.js @@ -0,0 +1,91 @@ +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); +}); diff --git a/spec/frontend/boards/stores/state_spec.js b/spec/frontend/boards/stores/state_spec.js new file mode 100644 index 00000000000..35490a63567 --- /dev/null +++ b/spec/frontend/boards/stores/state_spec.js @@ -0,0 +1,11 @@ +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)); + }); +}); -- cgit v1.2.1