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