Commit 5d6f8a75 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo Committed by Miguel Rincon

Author and Assignees labels not working in VSA

parent fa883dba
......@@ -290,7 +290,7 @@ export const initializeCycleAnalytics = ({ dispatch, commit }, initialData = {})
if (group?.fullPath) {
return Promise.all([
dispatch('setPaths', { group, milestonesPath, labelsPath }),
dispatch('setPaths', { groupPath: group.fullPath, milestonesPath, labelsPath }),
dispatch('filters/initialize', {
selectedAuthor,
selectedMilestone,
......
---
title: Fix vsa filter paths
merge_request: 47058
author:
type: fixed
......@@ -755,9 +755,19 @@ describe('Value Stream Analytics actions', () => {
let mockCommit;
let store;
const selectedAuthor = 'Noam Chomsky';
const selectedMilestone = '13.6';
const selectedAssigneeList = ['nchom'];
const selectedLabelList = ['label 1', 'label 2'];
const initialData = {
group: currentGroup,
projectIds: [1, 2],
milestonesPath,
labelsPath,
selectedAuthor,
selectedMilestone,
selectedAssigneeList,
selectedLabelList,
};
beforeEach(() => {
......@@ -784,6 +794,17 @@ describe('Value Stream Analytics actions', () => {
});
describe('with initialData', () => {
it.each`
action | args
${'setPaths'} | ${{ milestonesPath, labelsPath, groupPath: currentGroup.fullPath }}
${'filters/initialize'} | ${{ selectedAuthor, selectedMilestone, selectedAssigneeList, selectedLabelList }}
${'durationChart/setLoading'} | ${true}
${'typeOfWork/setLoading'} | ${true}
`('dispatches $action', async ({ action, args }) => {
await actions.initializeCycleAnalytics(store, initialData);
expect(mockDispatch).toHaveBeenCalledWith(action, args);
});
it('dispatches "fetchCycleAnalyticsData" and "initializeCycleAnalyticsSuccess"', async () => {
await actions.initializeCycleAnalytics(store, initialData);
expect(mockDispatch).toHaveBeenCalledWith('fetchCycleAnalyticsData');
......
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