Commit b09ee69c authored by Miguel Rincon's avatar Miguel Rincon

Merge branch...

Merge branch '325061-present-lead-time-for-mrs-to-be-deployed-to-production-in-group-level-ci-cd-dashboard' into 'master'

Add group-level lead time charts

See merge request gitlab-org/gitlab!62941
parents 1e4dcd28 84a5e859
......@@ -84,4 +84,4 @@ processes.
For time periods in which no merge requests were deployed, the charts render a
red, dashed line.
These charts are only available for projects.
These charts are available for both groups and projects.
<script>
import { GlTabs, GlTab } from '@gitlab/ui';
import DeploymentFrequencyCharts from 'ee/dora/components/deployment_frequency_charts.vue';
import LeadTimeCharts from 'ee/dora/components/lead_time_charts.vue';
import { mergeUrlParams, updateHistory, getParameterValues } from '~/lib/utils/url_utility';
import { TABS } from '../constants';
import ReleaseStatsCard from './release_stats_card.vue';
......@@ -12,6 +13,7 @@ export default {
GlTabs,
GlTab,
DeploymentFrequencyCharts,
LeadTimeCharts,
},
data() {
return {
......@@ -47,6 +49,9 @@ export default {
<gl-tab :title="s__('CICDAnalytics|Deployment frequency')">
<deployment-frequency-charts />
</gl-tab>
<gl-tab :title="s__('CICDAnalytics|Lead time')">
<lead-time-charts />
</gl-tab>
</gl-tabs>
</div>
</template>
export const STAT_ERROR_PLACEHOLDER = '-';
export const TABS = ['release-statistics', 'deployment-frequency'];
export const TABS = ['release-statistics', 'deployment-frequency', 'lead-time'];
......@@ -3,6 +3,7 @@ import { shallowMount } from '@vue/test-utils';
import CiCdAnalyticsApp from 'ee/analytics/group_ci_cd_analytics/components/app.vue';
import ReleaseStatsCard from 'ee/analytics/group_ci_cd_analytics/components/release_stats_card.vue';
import DeploymentFrequencyCharts from 'ee/dora/components/deployment_frequency_charts.vue';
import LeadTimeCharts from 'ee/dora/components/lead_time_charts.vue';
import setWindowLocation from 'helpers/set_window_location_helper';
import { TEST_HOST } from 'helpers/test_constants';
import { getParameterValues } from '~/lib/utils/url_utility';
......@@ -52,16 +53,27 @@ describe('ee/analytics/group_ci_cd_analytics/components/app.vue', () => {
createComponent();
});
it('renders the deployment frequency component inside the first tab', () => {
it('renders the deployment frequency component inside the second tab', () => {
expect(findGlTabAtIndex(1).findComponent(DeploymentFrequencyCharts).exists()).toBe(true);
});
});
describe('lead time', () => {
beforeEach(() => {
createComponent();
});
it('renders the lead time component inside the third tab', () => {
expect(findGlTabAtIndex(2).findComponent(LeadTimeCharts).exists()).toBe(true);
});
});
describe('when provided with a query param', () => {
it.each`
tab | index
${'release-statistics'} | ${'0'}
${'deployment-frequency'} | ${'1'}
${'lead-time'} | ${'2'}
${'fake'} | ${'0'}
${''} | ${'0'}
`('shows the correct tab for URL parameter "$tab"', ({ tab, index }) => {
......
......@@ -5720,6 +5720,9 @@ msgstr ""
msgid "CICDAnalytics|Deployment frequency"
msgstr ""
msgid "CICDAnalytics|Lead time"
msgstr ""
msgid "CICDAnalytics|Projects with releases"
msgstr ""
......
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