Commit 995e0080 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'mo-remove-ping-feature-flag' into 'master'

Remove code coverage tracking feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!62595
parents ee9255f1 757dd33a
---
name: usage_data_i_testing_group_code_coverage_project_click_total
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51411
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/299893
milestone: '13.8'
type: development
group: group::testing
default_enabled: true
......@@ -6,7 +6,6 @@ import { SUPPORTED_FORMATS, getFormatter } from '~/lib/utils/unit_format';
import { joinPaths } from '~/lib/utils/url_utility';
import { __, s__ } from '~/locale';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import getProjectsTestCoverage from '../graphql/queries/get_projects_test_coverage.query.graphql';
import SelectProjectsDropdown from './select_projects_dropdown.vue';
......@@ -21,7 +20,6 @@ export default {
SelectProjectsDropdown,
TimeAgoTooltip,
},
mixins: [glFeatureFlagsMixin()],
inject: {
groupFullPath: {
default: '',
......@@ -124,9 +122,7 @@ export default {
this.hasError = true;
},
onProjectClick() {
if (this.glFeatures.usageDataITestingGroupCodeCoverageProjectClickTotal) {
api.trackRedisHllUserEvent(this.$options.usagePingProjectEvent);
}
api.trackRedisHllUserEvent(this.$options.usagePingProjectEvent);
},
selectAllProjects() {
this.allProjectsSelected = true;
......
......@@ -8,7 +8,6 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
before_action -> { authorize_view_by_action!(:read_group_repository_analytics) }
before_action only: [:show] do
push_frontend_feature_flag(:usage_data_i_testing_group_code_coverage_visit_total, @group, default_enabled: :yaml)
push_frontend_feature_flag(:usage_data_i_testing_group_code_coverage_project_click_total, @group, default_enabled: :yaml)
end
def show
......
......@@ -170,39 +170,18 @@ describe('Test coverage table component', () => {
});
describe('with usage metrics', () => {
describe('with :usageDataITestingGroupCodeCoverageProjectClickTotal enabled', () => {
it('tracks i_testing_group_code_coverage_project_click_total metric', async () => {
const { id } = projects[0];
createComponent({
glFeatures: { usageDataITestingGroupCodeCoverageProjectClickTotal: true },
mountFn: mount,
});
await clickSelectAllProjects();
findProjectNameById(id).trigger('click');
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledTimes(1);
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledWith(
wrapper.vm.$options.usagePingProjectEvent,
);
});
});
describe('with :usageDataITestingGroupCodeCoverageProjectClickTotal disabled', () => {
it('does not track i_testing_group_code_coverage_project_click_total metric', async () => {
const { id } = projects[0];
createComponent({
glFeatures: { usageDataITestingGroupCodeCoverageProjectClickTotal: false },
mountFn: mount,
});
it('tracks i_testing_group_code_coverage_project_click_total metric', async () => {
const { id } = projects[0];
createComponent({ mountFn: mount });
await clickSelectAllProjects();
await clickSelectAllProjects();
findProjectNameById(id).trigger('click');
findProjectNameById(id).trigger('click');
expect(Api.trackRedisHllUserEvent).not.toHaveBeenCalled();
});
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledTimes(1);
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledWith(
wrapper.vm.$options.usagePingProjectEvent,
);
});
});
});
......@@ -180,7 +180,6 @@
category: testing
redis_slot: testing
aggregation: weekly
feature_flag: usage_data_i_testing_group_code_coverage_project_click_total
- name: i_testing_load_performance_widget_total
category: testing
redis_slot: testing
......
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