Commit 7f95f25e authored by Miguel Rincon's avatar Miguel Rincon

Merge branch '276955-author-and-assignees-labels-not-working-in-vsa' into 'master'

Author and Assignees labels not working in VSA

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