Commit ad3c27c0 authored by Tetiana Chupryna's avatar Tetiana Chupryna Committed by Phil Hughes

Use `license_scanning` in `enabled_reports` keys

parent 23795036
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
return codeclimate && codeclimate.head_path; return codeclimate && codeclimate.head_path;
}, },
shouldRenderLicenseReport() { shouldRenderLicenseReport() {
return this.mr.enabledReports?.licenseManagement; return this.mr.enabledReports?.licenseScanning;
}, },
hasCodequalityIssues() { hasCodequalityIssues() {
return ( return (
......
...@@ -168,7 +168,6 @@ module EE ...@@ -168,7 +168,6 @@ module EE
container_scanning: report_type_enabled?(:container_scanning), container_scanning: report_type_enabled?(:container_scanning),
dast: report_type_enabled?(:dast), dast: report_type_enabled?(:dast),
dependency_scanning: report_type_enabled?(:dependency_scanning), dependency_scanning: report_type_enabled?(:dependency_scanning),
license_management: report_type_enabled?(:license_scanning),
license_scanning: report_type_enabled?(:license_scanning) license_scanning: report_type_enabled?(:license_scanning)
} }
end end
......
...@@ -780,14 +780,14 @@ describe('ee merge request widget options', () => { ...@@ -780,14 +780,14 @@ describe('ee merge request widget options', () => {
}); });
}); });
describe('license management report', () => { describe('license scanning report', () => {
const licenseManagementApiUrl = `${TEST_HOST}/manage_license_api`; const licenseManagementApiUrl = `${TEST_HOST}/manage_license_api`;
it('should be rendered if license management data is set', () => { it('should be rendered if license scanning data is set', () => {
gl.mrWidgetData = { gl.mrWidgetData = {
...mockData, ...mockData,
enabled_reports: { enabled_reports: {
license_management: true, license_scanning: true,
}, },
license_scanning: { license_scanning: {
managed_licenses_path: licenseManagementApiUrl, managed_licenses_path: licenseManagementApiUrl,
...@@ -800,10 +800,10 @@ describe('ee merge request widget options', () => { ...@@ -800,10 +800,10 @@ describe('ee merge request widget options', () => {
expect(vm.$el.querySelector('.license-report-widget')).not.toBeNull(); expect(vm.$el.querySelector('.license-report-widget')).not.toBeNull();
}); });
it('should not be rendered if license management data is not set', () => { it('should not be rendered if license scanning data is not set', () => {
gl.mrWidgetData = { gl.mrWidgetData = {
...mockData, ...mockData,
license_management: {}, license_scanning: {},
}; };
vm = mountComponent(Component, { mrData: gl.mrWidgetData }); vm = mountComponent(Component, { mrData: gl.mrWidgetData });
...@@ -1096,7 +1096,7 @@ describe('ee merge request widget options', () => { ...@@ -1096,7 +1096,7 @@ describe('ee merge request widget options', () => {
undefined, undefined,
{}, {},
{ foo: true }, { foo: true },
{ license_management: true }, { license_scanning: true },
{ {
dast: false, dast: false,
sast: false, sast: false,
...@@ -1112,7 +1112,7 @@ describe('ee merge request widget options', () => { ...@@ -1112,7 +1112,7 @@ describe('ee merge request widget options', () => {
enabled_reports: noSecurityReportsEnabled, enabled_reports: noSecurityReportsEnabled,
}; };
if (noSecurityReportsEnabled?.license_management) { if (noSecurityReportsEnabled?.license_scanning) {
// Provide license report config if it's going to be rendered // Provide license report config if it's going to be rendered
gl.mrWidgetData.license_scanning = { gl.mrWidgetData.license_scanning = {
managed_licenses_path: `${TEST_HOST}/manage_license_api`, managed_licenses_path: `${TEST_HOST}/manage_license_api`,
......
...@@ -115,8 +115,7 @@ describe MergeRequest do ...@@ -115,8 +115,7 @@ describe MergeRequest do
:container_scanning | :with_container_scanning_reports | :container_scanning :container_scanning | :with_container_scanning_reports | :container_scanning
:dast | :with_dast_reports | :dast :dast | :with_dast_reports | :dast
:dependency_scanning | :with_dependency_scanning_reports | :dependency_scanning :dependency_scanning | :with_dependency_scanning_reports | :dependency_scanning
:license_management | :with_license_management_reports | :license_scanning :license_scanning | :with_license_management_reports | :license_scanning
:license_management | :with_license_scanning_reports | :license_scanning
:license_scanning | :with_license_scanning_reports | :license_scanning :license_scanning | :with_license_scanning_reports | :license_scanning
end end
......
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