Commit d93d7a5e authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '300060-ca-to-vsa-ee' into 'master'

Rename "CYCLE_ANALYTICS_*" variables in spec with "VSA_*"

See merge request gitlab-org/gitlab!52609
parents 07c06377 ad375128
...@@ -112,7 +112,7 @@ export const fetchStageMedianValues = ({ dispatch, commit, getters }) => { ...@@ -112,7 +112,7 @@ export const fetchStageMedianValues = ({ dispatch, commit, getters }) => {
.catch((error) => dispatch('receiveStageMedianValuesError', error)); .catch((error) => dispatch('receiveStageMedianValuesError', error));
}; };
export const requestCycleAnalyticsData = ({ commit }) => commit(types.REQUEST_CYCLE_ANALYTICS_DATA); export const requestCycleAnalyticsData = ({ commit }) => commit(types.REQUEST_VALUE_STREAM_DATA);
export const receiveCycleAnalyticsDataSuccess = ({ commit, dispatch }) => { export const receiveCycleAnalyticsDataSuccess = ({ commit, dispatch }) => {
commit(types.RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS); commit(types.RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS);
...@@ -272,10 +272,10 @@ export const removeStage = ({ dispatch, getters }, stageId) => { ...@@ -272,10 +272,10 @@ export const removeStage = ({ dispatch, getters }, stageId) => {
}; };
export const initializeCycleAnalyticsSuccess = ({ commit }) => export const initializeCycleAnalyticsSuccess = ({ commit }) =>
commit(types.INITIALIZE_CYCLE_ANALYTICS_SUCCESS); commit(types.INITIALIZE_VALUE_STREAM_SUCCESS);
export const initializeCycleAnalytics = ({ dispatch, commit }, initialData = {}) => { export const initializeCycleAnalytics = ({ dispatch, commit }, initialData = {}) => {
commit(types.INITIALIZE_CYCLE_ANALYTICS, initialData); commit(types.INITIALIZE_VSA, initialData);
const { const {
featureFlags = {}, featureFlags = {},
......
...@@ -5,7 +5,7 @@ export const SET_SELECTED_STAGE = 'SET_SELECTED_STAGE'; ...@@ -5,7 +5,7 @@ export const SET_SELECTED_STAGE = 'SET_SELECTED_STAGE';
export const SET_DATE_RANGE = 'SET_DATE_RANGE'; export const SET_DATE_RANGE = 'SET_DATE_RANGE';
export const SET_SELECTED_VALUE_STREAM = 'SET_SELECTED_VALUE_STREAM'; export const SET_SELECTED_VALUE_STREAM = 'SET_SELECTED_VALUE_STREAM';
export const REQUEST_CYCLE_ANALYTICS_DATA = 'REQUEST_CYCLE_ANALYTICS_DATA'; export const REQUEST_VALUE_STREAM_DATA = 'REQUEST_VALUE_STREAM_DATA';
export const RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS = 'RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS'; export const RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS = 'RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS';
export const RECEIVE_CYCLE_ANALYTICS_DATA_ERROR = 'RECEIVE_CYCLE_ANALYTICS_DATA_ERROR'; export const RECEIVE_CYCLE_ANALYTICS_DATA_ERROR = 'RECEIVE_CYCLE_ANALYTICS_DATA_ERROR';
...@@ -28,8 +28,8 @@ export const RECEIVE_UPDATE_STAGE_ERROR = 'RECEIVE_UPDATE_STAGE_ERROR'; ...@@ -28,8 +28,8 @@ export const RECEIVE_UPDATE_STAGE_ERROR = 'RECEIVE_UPDATE_STAGE_ERROR';
export const REQUEST_REMOVE_STAGE = 'REQUEST_REMOVE_STAGE'; export const REQUEST_REMOVE_STAGE = 'REQUEST_REMOVE_STAGE';
export const RECEIVE_REMOVE_STAGE_RESPONSE = 'RECEIVE_REMOVE_STAGE_RESPONSE'; export const RECEIVE_REMOVE_STAGE_RESPONSE = 'RECEIVE_REMOVE_STAGE_RESPONSE';
export const INITIALIZE_CYCLE_ANALYTICS = 'INITIALIZE_CYCLE_ANALYTICS'; export const INITIALIZE_VSA = 'INITIALIZE_VSA';
export const INITIALIZE_CYCLE_ANALYTICS_SUCCESS = 'INITIALIZE_CYCLE_ANALYTICS_SUCCESS'; export const INITIALIZE_VALUE_STREAM_SUCCESS = 'INITIALIZE_VALUE_STREAM_SUCCESS';
export const REQUEST_REORDER_STAGE = 'REQUEST_REORDER_STAGE'; export const REQUEST_REORDER_STAGE = 'REQUEST_REORDER_STAGE';
export const RECEIVE_REORDER_STAGE_SUCCESS = 'RECEIVE_REORDER_STAGE_SUCCESS'; export const RECEIVE_REORDER_STAGE_SUCCESS = 'RECEIVE_REORDER_STAGE_SUCCESS';
......
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
state.startDate = startDate; state.startDate = startDate;
state.endDate = endDate; state.endDate = endDate;
}, },
[types.REQUEST_CYCLE_ANALYTICS_DATA](state) { [types.REQUEST_VALUE_STREAM_DATA](state) {
state.isLoading = true; state.isLoading = true;
}, },
[types.RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS](state) { [types.RECEIVE_CYCLE_ANALYTICS_DATA_SUCCESS](state) {
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
[types.RECEIVE_REMOVE_STAGE_RESPONSE](state) { [types.RECEIVE_REMOVE_STAGE_RESPONSE](state) {
state.isLoading = false; state.isLoading = false;
}, },
[types.INITIALIZE_CYCLE_ANALYTICS]( [types.INITIALIZE_VSA](
state, state,
{ {
group = null, group = null,
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
state.endDate = endDate; state.endDate = endDate;
state.defaultStageConfig = defaultStageConfig; state.defaultStageConfig = defaultStageConfig;
}, },
[types.INITIALIZE_CYCLE_ANALYTICS_SUCCESS](state) { [types.INITIALIZE_VALUE_STREAM_SUCCESS](state) {
state.isLoading = false; state.isLoading = false;
}, },
[types.REQUEST_REORDER_STAGE](state) { [types.REQUEST_REORDER_STAGE](state) {
......
---
title: Rename "CYCLE_ANALYTICS_*" variables in spec with "VSA_*"
merge_request: 52609
author: Takuya Noguchi
type: other
...@@ -789,9 +789,9 @@ describe('Value Stream Analytics actions', () => { ...@@ -789,9 +789,9 @@ describe('Value Stream Analytics actions', () => {
}); });
describe('with only group in initialData', () => { describe('with only group in initialData', () => {
it('commits "INITIALIZE_CYCLE_ANALYTICS"', async () => { it('commits "INITIALIZE_VSA"', async () => {
await actions.initializeCycleAnalytics(store, { group }); await actions.initializeCycleAnalytics(store, { group });
expect(mockCommit).toHaveBeenCalledWith('INITIALIZE_CYCLE_ANALYTICS', { group }); expect(mockCommit).toHaveBeenCalledWith('INITIALIZE_VSA', { group });
}); });
it('dispatches "fetchCycleAnalyticsData" and "initializeCycleAnalyticsSuccess"', async () => { it('dispatches "fetchCycleAnalyticsData" and "initializeCycleAnalyticsSuccess"', async () => {
...@@ -818,20 +818,20 @@ describe('Value Stream Analytics actions', () => { ...@@ -818,20 +818,20 @@ describe('Value Stream Analytics actions', () => {
expect(mockDispatch).toHaveBeenCalledWith('initializeCycleAnalyticsSuccess'); expect(mockDispatch).toHaveBeenCalledWith('initializeCycleAnalyticsSuccess');
}); });
it('commits "INITIALIZE_CYCLE_ANALYTICS"', async () => { it('commits "INITIALIZE_VSA"', async () => {
await actions.initializeCycleAnalytics(store, initialData); await actions.initializeCycleAnalytics(store, initialData);
expect(mockCommit).toHaveBeenCalledWith('INITIALIZE_CYCLE_ANALYTICS', initialData); expect(mockCommit).toHaveBeenCalledWith('INITIALIZE_VSA', initialData);
}); });
}); });
}); });
describe('initializeCycleAnalyticsSuccess', () => { describe('initializeCycleAnalyticsSuccess', () => {
it(`commits the ${types.INITIALIZE_CYCLE_ANALYTICS_SUCCESS} mutation`, () => it(`commits the ${types.INITIALIZE_VALUE_STREAM_SUCCESS} mutation`, () =>
testAction( testAction(
actions.initializeCycleAnalyticsSuccess, actions.initializeCycleAnalyticsSuccess,
null, null,
state, state,
[{ type: types.INITIALIZE_CYCLE_ANALYTICS_SUCCESS }], [{ type: types.INITIALIZE_VALUE_STREAM_SUCCESS }],
[], [],
)); ));
}); });
......
...@@ -35,7 +35,7 @@ describe('Value Stream Analytics mutations', () => { ...@@ -35,7 +35,7 @@ describe('Value Stream Analytics mutations', () => {
${types.REQUEST_STAGE_DATA} | ${'isLoadingStage'} | ${true} ${types.REQUEST_STAGE_DATA} | ${'isLoadingStage'} | ${true}
${types.RECEIVE_STAGE_DATA_ERROR} | ${'isEmptyStage'} | ${true} ${types.RECEIVE_STAGE_DATA_ERROR} | ${'isEmptyStage'} | ${true}
${types.RECEIVE_STAGE_DATA_ERROR} | ${'isLoadingStage'} | ${false} ${types.RECEIVE_STAGE_DATA_ERROR} | ${'isLoadingStage'} | ${false}
${types.REQUEST_CYCLE_ANALYTICS_DATA} | ${'isLoading'} | ${true} ${types.REQUEST_VALUE_STREAM_DATA} | ${'isLoading'} | ${true}
${types.RECEIVE_GROUP_STAGES_ERROR} | ${'stages'} | ${[]} ${types.RECEIVE_GROUP_STAGES_ERROR} | ${'stages'} | ${[]}
${types.REQUEST_GROUP_STAGES} | ${'stages'} | ${[]} ${types.REQUEST_GROUP_STAGES} | ${'stages'} | ${[]}
${types.REQUEST_UPDATE_STAGE} | ${'isLoading'} | ${true} ${types.REQUEST_UPDATE_STAGE} | ${'isLoading'} | ${true}
...@@ -58,7 +58,7 @@ describe('Value Stream Analytics mutations', () => { ...@@ -58,7 +58,7 @@ describe('Value Stream Analytics mutations', () => {
${types.REQUEST_DELETE_VALUE_STREAM} | ${'deleteValueStreamError'} | ${null} ${types.REQUEST_DELETE_VALUE_STREAM} | ${'deleteValueStreamError'} | ${null}
${types.RECEIVE_DELETE_VALUE_STREAM_SUCCESS} | ${'deleteValueStreamError'} | ${null} ${types.RECEIVE_DELETE_VALUE_STREAM_SUCCESS} | ${'deleteValueStreamError'} | ${null}
${types.RECEIVE_DELETE_VALUE_STREAM_SUCCESS} | ${'selectedValueStream'} | ${null} ${types.RECEIVE_DELETE_VALUE_STREAM_SUCCESS} | ${'selectedValueStream'} | ${null}
${types.INITIALIZE_CYCLE_ANALYTICS_SUCCESS} | ${'isLoading'} | ${false} ${types.INITIALIZE_VALUE_STREAM_SUCCESS} | ${'isLoading'} | ${false}
`('$mutation will set $stateKey=$value', ({ mutation, stateKey, value }) => { `('$mutation will set $stateKey=$value', ({ mutation, stateKey, value }) => {
mutations[mutation](state); mutations[mutation](state);
...@@ -186,7 +186,7 @@ describe('Value Stream Analytics mutations', () => { ...@@ -186,7 +186,7 @@ describe('Value Stream Analytics mutations', () => {
}); });
}); });
describe(`${types.INITIALIZE_CYCLE_ANALYTICS}`, () => { describe(`${types.INITIALIZE_VSA}`, () => {
const initialData = { const initialData = {
group: { fullPath: 'cool-group' }, group: { fullPath: 'cool-group' },
selectedProjects, selectedProjects,
...@@ -202,7 +202,7 @@ describe('Value Stream Analytics mutations', () => { ...@@ -202,7 +202,7 @@ describe('Value Stream Analytics mutations', () => {
${'endDate'} | ${initialData.createdBefore} ${'endDate'} | ${initialData.createdBefore}
`('$stateKey will be set to $expectedState', ({ stateKey, expectedState }) => { `('$stateKey will be set to $expectedState', ({ stateKey, expectedState }) => {
state = {}; state = {};
mutations[types.INITIALIZE_CYCLE_ANALYTICS](state, initialData); mutations[types.INITIALIZE_VSA](state, initialData);
expect(state[stateKey]).toEqual(expectedState); expect(state[stateKey]).toEqual(expectedState);
}); });
......
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