Commit 0d0b71ca authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch '215135-group-test-coverage-feature-flag' into 'master'

Feature flag for group test coverage

See merge request gitlab-org/gitlab!43774
parents 41a3dd23 fd47d723
<script> <script>
import { s__ } from '~/locale'; 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'; import DownloadTestCoverage from './download_test_coverage.vue';
export default { export default {
name: 'GroupRepositoryAnalytics', name: 'GroupRepositoryAnalytics',
components: { components: {
TestCoverageTable,
DownloadTestCoverage, DownloadTestCoverage,
}, },
mixins: [glFeatureFlagsMixin()],
text: { text: {
codeCoverageHeader: s__('RepositoriesAnalytics|Test Code Coverage'), codeCoverageHeader: s__('RepositoriesAnalytics|Test Code Coverage'),
}, },
computed: {
shouldShowCoverageReport() {
return this.glFeatures.groupCoverageDataReport;
},
},
}; };
</script> </script>
...@@ -18,6 +27,7 @@ export default { ...@@ -18,6 +27,7 @@ export default {
<h4 data-testid="test-coverage-header"> <h4 data-testid="test-coverage-header">
{{ $options.text.codeCoverageHeader }} {{ $options.text.codeCoverageHeader }}
</h4> </h4>
<test-coverage-table v-if="shouldShowCoverageReport" />
<download-test-coverage /> <download-test-coverage />
</div> </div>
</template> </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 ...@@ -8,6 +8,7 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
before_action :load_group before_action :load_group
before_action -> { check_feature_availability!(:group_repository_analytics) } before_action -> { check_feature_availability!(:group_repository_analytics) }
before_action -> { authorize_view_by_action!(:read_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 def show
track_event(pageview_tracker_params) 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