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 { ...@@ -30,10 +30,7 @@ export default {
return this.dashboardType === DASHBOARD_TYPES.PROJECT; return this.dashboardType === DASHBOARD_TYPES.PROJECT;
}, },
shouldShowTabs() { shouldShowTabs() {
return ( return this.dashboardType !== DASHBOARD_TYPES.PIPELINE;
this.dashboardType !== DASHBOARD_TYPES.PIPELINE &&
this.glFeatures.operationalVulnerabilities
);
}, },
}, },
}; };
......
...@@ -119,10 +119,6 @@ export default (el, dashboardType) => { ...@@ -119,10 +119,6 @@ export default (el, dashboardType) => {
const router = createRouter(); const router = createRouter();
const store = createStore({ dashboardType }); const store = createStore({ dashboardType });
const component = gon.features?.operationalVulnerabilities
? getVulnerabilityComponent(dashboardType)
: VulnerabilityReport;
return new Vue({ return new Vue({
el, el,
store, store,
...@@ -130,7 +126,7 @@ export default (el, dashboardType) => { ...@@ -130,7 +126,7 @@ export default (el, dashboardType) => {
apolloProvider, apolloProvider,
provide, provide,
render(createElement) { render(createElement) {
return createElement(component); return createElement(getVulnerabilityComponent(dashboardType));
}, },
}); });
}; };
...@@ -7,7 +7,6 @@ module Groups ...@@ -7,7 +7,6 @@ module Groups
before_action do before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml) 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
feature_category :vulnerability_management feature_category :vulnerability_management
......
...@@ -8,7 +8,6 @@ module Projects ...@@ -8,7 +8,6 @@ module Projects
before_action do before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml) 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
feature_category :vulnerability_management feature_category :vulnerability_management
......
...@@ -6,7 +6,6 @@ module Security ...@@ -6,7 +6,6 @@ module Security
before_action do before_action do
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml) 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 end
end end
...@@ -17,7 +17,6 @@ describe('Vulnerability Report Layout component', () => { ...@@ -17,7 +17,6 @@ describe('Vulnerability Report Layout component', () => {
slots, slots,
provide: { provide: {
dashboardType: DASHBOARD_TYPES.PROJECT, dashboardType: DASHBOARD_TYPES.PROJECT,
glFeatures: { operationalVulnerabilities: false },
...provide, ...provide,
}, },
}); });
...@@ -60,49 +59,15 @@ describe('Vulnerability Report Layout component', () => { ...@@ -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', () => { describe('tabs', () => {
const createOptions = (dashboardType, operationalVulnerabilities) => ({
provide: { dashboardType, glFeatures: { operationalVulnerabilities } },
});
it.each` it.each`
test | wrapperOptions | exists test | dashboardType | 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'} | ${DASHBOARD_TYPES.PIPELINE} | ${false}
${'should not find the tabs for the pipeline-level report with the feature flag on'} | ${createOptions(DASHBOARD_TYPES.PIPELINE, true)} | ${false} ${'should find the tabs for the project-level report'} | ${DASHBOARD_TYPES.PROJECT} | ${true}
${'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 group-level report'} | ${DASHBOARD_TYPES.GROUP} | ${true}
${'should find the tabs for the project-level report with the feature flag on'} | ${createOptions(DASHBOARD_TYPES.PROJECT, true)} | ${true} ${'should find the tabs for the instance-level report'} | ${DASHBOARD_TYPES.INSTANCE} | ${true}
${'should not find the tabs for the group-level report with the feature flag off'} | ${createOptions(DASHBOARD_TYPES.GROUP, false)} | ${false} `('$test', ({ exists, dashboardType }) => {
${'should find the tabs for the group-level report with the feature flag on'} | ${createOptions(DASHBOARD_TYPES.GROUP, true)} | ${true} createWrapper({ provide: { dashboardType } });
${'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);
expect(findTabs().exists()).toBe(exists); 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