Commit 136dd492 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '341423-remove-operational-vulnerabilities-feature-flag' into 'master'

Remove :operational_vulnerabilities feature flag

See merge request gitlab-org/gitlab!77639
parents 481e9247 61833c7f
---
name: operational_vulnerabilities
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70732
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341423
milestone: '14.4'
type: development
group: group::container security
default_enabled: true
......@@ -30,10 +30,7 @@ export default {
return this.dashboardType === DASHBOARD_TYPES.PROJECT;
},
shouldShowTabs() {
return (
this.dashboardType !== DASHBOARD_TYPES.PIPELINE &&
this.glFeatures.operationalVulnerabilities
);
return this.dashboardType !== DASHBOARD_TYPES.PIPELINE;
},
},
};
......
......@@ -119,10 +119,6 @@ export default (el, dashboardType) => {
const router = createRouter();
const store = createStore({ dashboardType });
const component = gon.features?.operationalVulnerabilities
? getVulnerabilityComponent(dashboardType)
: VulnerabilityReport;
return new Vue({
el,
store,
......@@ -130,7 +126,7 @@ export default (el, dashboardType) => {
apolloProvider,
provide,
render(createElement) {
return createElement(component);
return createElement(getVulnerabilityComponent(dashboardType));
},
});
};
......@@ -7,7 +7,6 @@ module Groups
before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml)
push_frontend_feature_flag(:operational_vulnerabilities, current_user, default_enabled: :yaml)
end
feature_category :vulnerability_management
......
......@@ -8,7 +8,6 @@ module Projects
before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml)
push_frontend_feature_flag(:operational_vulnerabilities, current_user, default_enabled: :yaml)
end
feature_category :vulnerability_management
......
......@@ -6,7 +6,6 @@ module Security
before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml)
push_frontend_feature_flag(:operational_vulnerabilities, current_user, default_enabled: :yaml)
end
end
end
......@@ -17,7 +17,6 @@ describe('Vulnerability Report Layout component', () => {
slots,
provide: {
dashboardType: DASHBOARD_TYPES.PROJECT,
glFeatures: { operationalVulnerabilities: false },
...provide,
},
});
......@@ -60,49 +59,15 @@ describe('Vulnerability Report Layout component', () => {
});
});
describe('with the "operationalVulnerabilities" feature flag on', () => {
beforeEach(() => {
createWrapper({
slots: {
default: DummyComponent,
header: DummyComponent,
sticky: DummyComponent,
summary: DummyComponent,
},
provide: {
glFeatures: { operationalVulnerabilities: true },
},
});
});
it.each`
element | findFn | exists
${'main'} | ${findArticle} | ${true}
${'header'} | ${findHeader} | ${true}
${'sticky section'} | ${findStickySection} | ${true}
${'summary section'} | ${findSummarySection} | ${true}
`('should find that $element exists is $exists', ({ exists, findFn }) => {
expect(findFn().find(DummyComponent).exists()).toBe(exists);
});
});
describe('tabs', () => {
const createOptions = (dashboardType, operationalVulnerabilities) => ({
provide: { dashboardType, glFeatures: { operationalVulnerabilities } },
});
it.each`
test | wrapperOptions | exists
${'should not find the tabs for the pipeline-level report with the feature flag off'} | ${createOptions(DASHBOARD_TYPES.PIPELINE, false)} | ${false}
${'should not find the tabs for the pipeline-level report with the feature flag on'} | ${createOptions(DASHBOARD_TYPES.PIPELINE, true)} | ${false}
${'should not find the tabs for the project-level report with the feature flag off'} | ${createOptions(DASHBOARD_TYPES.PROJECT, false)} | ${false}
${'should find the tabs for the project-level report with the feature flag on'} | ${createOptions(DASHBOARD_TYPES.PROJECT, true)} | ${true}
${'should not find the tabs for the group-level report with the feature flag off'} | ${createOptions(DASHBOARD_TYPES.GROUP, false)} | ${false}
${'should find the tabs for the group-level report with the feature flag on'} | ${createOptions(DASHBOARD_TYPES.GROUP, true)} | ${true}
${'should not find the tabs for the instance-level report with the feature flag off'} | ${createOptions(DASHBOARD_TYPES.INSTANCE, false)} | ${false}
${'should find the tabs for the instance-level report with the feature flag on'} | ${createOptions(DASHBOARD_TYPES.INSTANCE, true)} | ${true}
`('$test', ({ exists, wrapperOptions }) => {
createWrapper(wrapperOptions);
test | dashboardType | exists
${'should not find the tabs for the pipeline-level report'} | ${DASHBOARD_TYPES.PIPELINE} | ${false}
${'should find the tabs for the project-level report'} | ${DASHBOARD_TYPES.PROJECT} | ${true}
${'should find the tabs for the group-level report'} | ${DASHBOARD_TYPES.GROUP} | ${true}
${'should find the tabs for the instance-level report'} | ${DASHBOARD_TYPES.INSTANCE} | ${true}
`('$test', ({ exists, dashboardType }) => {
createWrapper({ provide: { dashboardType } });
expect(findTabs().exists()).toBe(exists);
});
});
......
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