Commit fd47d723 authored by Scott Hampton's avatar Scott Hampton

Feature flag for group test coverage

Created a feature flag to hide the group
test coverage table while we develop the
feature. The backend and the frontend will
be done separately, and this allows us to work
in parallel.
parent 5134cb37
<script>
import { s__ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import TestCoverageTable from './test_coverage_table.vue';
import DownloadTestCoverage from './download_test_coverage.vue';
export default {
name: 'GroupRepositoryAnalytics',
components: {
TestCoverageTable,
DownloadTestCoverage,
},
mixins: [glFeatureFlagsMixin()],
text: {
codeCoverageHeader: s__('RepositoriesAnalytics|Test Code Coverage'),
},
computed: {
shouldShowCoverageReport() {
return this.glFeatures.groupCoverageDataReport;
},
},
};
</script>
......@@ -18,6 +27,7 @@ export default {
<h4 data-testid="test-coverage-header">
{{ $options.text.codeCoverageHeader }}
</h4>
<test-coverage-table v-if="shouldShowCoverageReport" />
<download-test-coverage />
</div>
</template>
<script>
import { GlCard } from '@gitlab/ui';
import { s__ } from '~/locale';
export default {
name: 'TestCoverageTable',
components: {
GlCard,
},
text: {
// This is a temporary placeholder until we actually implement the feature
header: s__('RepositoriesAnalytics|Test Code Coverage'),
},
};
</script>
<template>
<gl-card>
<template #header>
<h5>{{ $options.text.header }}</h5>
</template>
</gl-card>
</template>
......@@ -8,6 +8,7 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
before_action :load_group
before_action -> { check_feature_availability!(:group_repository_analytics) }
before_action -> { authorize_view_by_action!(:read_group_repository_analytics) }
before_action -> { push_frontend_feature_flag(:group_coverage_data_report, @group, default_enabled: false) }
def show
track_event(pageview_tracker_params)
......
---
name: group_coverage_data_report
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43774
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/215135/
type: development
group: group::testing
default_enabled: false
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