Commit 3c5fb8f0 authored by jakeburden's avatar jakeburden

Add group milestones to Vuex store

parent f82bcb41
......@@ -9,6 +9,7 @@ export const UPDATE_CREATE_FROM = 'UPDATE_CREATE_FROM';
export const UPDATE_RELEASE_TITLE = 'UPDATE_RELEASE_TITLE';
export const UPDATE_RELEASE_NOTES = 'UPDATE_RELEASE_NOTES';
export const UPDATE_RELEASE_MILESTONES = 'UPDATE_RELEASE_MILESTONES';
export const UPDATE_RELEASE_GROUP_MILESTONES = 'UPDATE_RELEASE_GROUP_MILESTONES';
export const REQUEST_SAVE_RELEASE = 'REQUEST_SAVE_RELEASE';
export const RECEIVE_SAVE_RELEASE_SUCCESS = 'RECEIVE_SAVE_RELEASE_SUCCESS';
......
......@@ -13,6 +13,7 @@ export default {
name: '',
description: '',
milestones: [],
groupMilestones: [],
assets: {
links: [],
},
......@@ -51,6 +52,10 @@ export default {
state.release.milestones = milestones;
},
[types.UPDATE_RELEASE_GROUP_MILESTONES](state, groupMilestones) {
state.release.groupMilestones = groupMilestones;
},
[types.REQUEST_SAVE_RELEASE](state) {
state.isUpdatingRelease = true;
},
......
......@@ -207,6 +207,15 @@ describe('Release detail actions', () => {
});
});
describe('updateReleaseGroupMilestones', () => {
it(`commits ${types.UPDATE_RELEASE_GROUP_MILESTONES} with the updated release group milestones`, () => {
const newReleaseGroupMilestones = ['v0.0', 'v0.1'];
return testAction(actions.updateReleaseGroupMilestones, newReleaseGroupMilestones, state, [
{ type: types.UPDATE_RELEASE_GROUP_MILESTONES, payload: newReleaseGroupMilestones },
]);
});
});
describe('addEmptyAssetLink', () => {
it(`commits ${types.ADD_EMPTY_ASSET_LINK}`, () => {
return testAction(actions.addEmptyAssetLink, undefined, state, [
......
......@@ -30,6 +30,7 @@ describe('Release detail mutations', () => {
name: '',
description: '',
milestones: [],
groupMilestones: [],
assets: {
links: [],
},
......
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