Commit 15aaa722 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Address review comments

Address reviewer comments on the MR
including replacing utility classes
parent 9ee7ca27
...@@ -225,9 +225,9 @@ export default { ...@@ -225,9 +225,9 @@ export default {
class="gl-align-self-start gl-sm-align-self-start gl-mt-0 gl-sm-mt-5" class="gl-align-self-start gl-sm-align-self-start gl-mt-0 gl-sm-mt-5"
/> />
</div> </div>
<div class="mw-100"> <div class="gl-max-w-full">
<div class="mt-3 py-2 px-3 bg-gray-light border-top border-bottom"> <div class="gl-mt-3 gl-py-2 gl-px-3 bg-gray-light border-top border-bottom">
<div v-if="shouldDisplayPathNavigation" class="w-100 pb-2"> <div v-if="shouldDisplayPathNavigation" class="gl-w-full gl-pb-2">
<path-navigation <path-navigation
class="js-path-navigation" class="js-path-navigation"
:loading="isLoading" :loading="isLoading"
......
...@@ -217,7 +217,7 @@ export const updateStage = ({ dispatch, getters }, { id, ...params }) => { ...@@ -217,7 +217,7 @@ export const updateStage = ({ dispatch, getters }, { id, ...params }) => {
return Api.cycleAnalyticsUpdateStage(currentGroupPath, currentValueStreamId, id, params) return Api.cycleAnalyticsUpdateStage(currentGroupPath, currentValueStreamId, id, params)
.then(({ data }) => dispatch('receiveUpdateStageSuccess', data)) .then(({ data }) => dispatch('receiveUpdateStageSuccess', data))
.catch(({ response: { status = 400, data: responseData } = {} }) => .catch(({ response: { status = httpStatus.BAD_REQUEST, data: responseData } = {} }) =>
dispatch('receiveUpdateStageError', { status, responseData, data: { id, ...params } }), dispatch('receiveUpdateStageError', { status, responseData, data: { id, ...params } }),
); );
}; };
...@@ -289,7 +289,7 @@ export const reorderStage = ({ dispatch, getters }, initialData) => { ...@@ -289,7 +289,7 @@ export const reorderStage = ({ dispatch, getters }, initialData) => {
return Api.cycleAnalyticsUpdateStage(currentGroupPath, currentValueStreamId, id, params) return Api.cycleAnalyticsUpdateStage(currentGroupPath, currentValueStreamId, id, params)
.then(({ data }) => dispatch('receiveReorderStageSuccess', data)) .then(({ data }) => dispatch('receiveReorderStageSuccess', data))
.catch(({ response: { status = 400, data: responseData } = {} }) => .catch(({ response: { status = httpStatus.BAD_REQUEST, data: responseData } = {} }) =>
dispatch('receiveReorderStageError', { status, responseData }), dispatch('receiveReorderStageError', { status, responseData }),
); );
}; };
......
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import Api from 'ee/api'; import Api from 'ee/api';
import * as cycleAnalyticsConstants from 'ee/analytics/cycle_analytics/constants'; import * as valueStreamAnalyticsConstants from 'ee/analytics/cycle_analytics/constants';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import httpStatus from '~/lib/utils/http_status'; import httpStatus from '~/lib/utils/http_status';
import * as analyticsMockData from 'ee_jest/analytics/cycle_analytics/mock_data'; import * as analyticsMockData from 'ee_jest/analytics/cycle_analytics/mock_data';
...@@ -206,13 +206,15 @@ describe('Api', () => { ...@@ -206,13 +206,15 @@ describe('Api', () => {
const groupId = 'counting-54321'; const groupId = 'counting-54321';
const stageId = 'thursday'; const stageId = 'thursday';
const valueStreamId = 'a-city-by-the-light-divided'; const valueStreamId = 'a-city-by-the-light-divided';
const dummyCycleAnalyticsUrlRoot = `${dummyUrlRoot}/groups/${groupId}/-/analytics/value_stream_analytics`; const dummyValueStreamAnalyticsUrlRoot = `${dummyUrlRoot}/groups/${groupId}/-/analytics/value_stream_analytics`;
const defaultParams = { const defaultParams = {
created_after: createdAfter, created_after: createdAfter,
created_before: createdBefore, created_before: createdBefore,
}; };
const valueStreamBaseUrl = ({ resource = '', id = null }) => const valueStreamBaseUrl = ({ resource = '', id = null }) =>
[dummyCycleAnalyticsUrlRoot, id ? `value_streams/${id}/${resource}` : resource].join('/'); [dummyValueStreamAnalyticsUrlRoot, id ? `value_streams/${id}/${resource}` : resource].join(
'/',
);
const expectRequestWithCorrectParameters = (responseObj, { params, expectedUrl, response }) => { const expectRequestWithCorrectParameters = (responseObj, { params, expectedUrl, response }) => {
const { const {
...@@ -247,7 +249,7 @@ describe('Api', () => { ...@@ -247,7 +249,7 @@ describe('Api', () => {
const params = { const params = {
...defaultParams, ...defaultParams,
project_ids: null, project_ids: null,
subject: cycleAnalyticsConstants.TASKS_BY_TYPE_SUBJECT_ISSUE, subject: valueStreamAnalyticsConstants.TASKS_BY_TYPE_SUBJECT_ISSUE,
label_ids: labelIds, label_ids: labelIds,
}; };
const expectedUrl = analyticsMockData.endpoints.tasksByTypeData; const expectedUrl = analyticsMockData.endpoints.tasksByTypeData;
...@@ -270,7 +272,7 @@ describe('Api', () => { ...@@ -270,7 +272,7 @@ describe('Api', () => {
const params = { const params = {
...defaultParams, ...defaultParams,
project_ids: null, project_ids: null,
subject: cycleAnalyticsConstants.TASKS_BY_TYPE_SUBJECT_ISSUE, subject: valueStreamAnalyticsConstants.TASKS_BY_TYPE_SUBJECT_ISSUE,
label_ids: labelIds, label_ids: labelIds,
}; };
...@@ -292,7 +294,7 @@ describe('Api', () => { ...@@ -292,7 +294,7 @@ describe('Api', () => {
it('fetches value stream analytics summary data', done => { it('fetches value stream analytics summary data', done => {
const response = [{ value: 0, title: 'New Issues' }, { value: 0, title: 'Deploys' }]; const response = [{ value: 0, title: 'New Issues' }, { value: 0, title: 'Deploys' }];
const params = { ...defaultParams }; const params = { ...defaultParams };
const expectedUrl = `${dummyCycleAnalyticsUrlRoot}/summary`; const expectedUrl = `${dummyValueStreamAnalyticsUrlRoot}/summary`;
mock.onGet(expectedUrl).reply(httpStatus.OK, response); mock.onGet(expectedUrl).reply(httpStatus.OK, response);
Api.cycleAnalyticsSummaryData(groupId, params) Api.cycleAnalyticsSummaryData(groupId, params)
...@@ -316,7 +318,7 @@ describe('Api', () => { ...@@ -316,7 +318,7 @@ describe('Api', () => {
]; ];
const params = { ...defaultParams }; const params = { ...defaultParams };
const expectedUrl = `${dummyCycleAnalyticsUrlRoot}/time_summary`; const expectedUrl = `${dummyValueStreamAnalyticsUrlRoot}/time_summary`;
mock.onGet(expectedUrl).reply(httpStatus.OK, response); mock.onGet(expectedUrl).reply(httpStatus.OK, response);
Api.cycleAnalyticsTimeSummaryData(groupId, params) Api.cycleAnalyticsTimeSummaryData(groupId, params)
......
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