Commit ca834768 authored by Dave Pisek's avatar Dave Pisek

Remove license_approvals feature flag

This commit removes the frontend dependencies on the "licenseApprovals"
feature flag and deletes it from the responsible backend controller.
parent 5f2283ed
......@@ -38,9 +38,6 @@ export default {
'hasPendingLicenses',
'isAddingNewLicense',
]),
hasLicenseApprovals() {
return Boolean(this.glFeatures.licenseApprovals);
},
showLoadingSpinner() {
return this.isLoadingManagedLicenses && !this.hasPendingLicenses;
},
......@@ -100,7 +97,7 @@ export default {
{{ s__('LicenseCompliance|Add a license') }}
</gl-button>
<license-approvals v-if="hasLicenseApprovals" class="gl-ml-3" />
<license-approvals class="gl-ml-3" />
</div>
<template v-else>
......
......@@ -5,7 +5,6 @@ module Projects
before_action :authorize_read_licenses!, only: [:index]
before_action :authorize_admin_software_license_policy!, only: [:create, :update]
before_action do
push_frontend_feature_flag(:license_approvals, default_enabled: true)
push_frontend_feature_flag(:license_compliance_denies_mr, default_enabled: false)
end
......
......@@ -147,32 +147,15 @@ describe('License Management', () => {
});
});
describe.each([true, false])(
'with licenseApprovals feature flag set to "%p"',
licenseApprovalsEnabled => {
beforeEach(() => {
createComponent({
state: { isLoadingManagedLicenses: false },
isAdmin: true,
options: {
provide: {
glFeatures: { licenseApprovals: licenseApprovalsEnabled },
},
},
});
});
it('should render the license-approvals section accordingly', () => {
expect(wrapper.find(LicenseComplianceApprovals).exists()).toBe(licenseApprovalsEnabled);
});
},
);
describe('when not loading', () => {
beforeEach(() => {
createComponent({ state: { isLoadingManagedLicenses: false }, isAdmin: true });
});
it('should render the license-approvals section accordingly', () => {
expect(wrapper.find(LicenseComplianceApprovals).exists()).toBe(true);
});
it('should render the form if the form is open and disable the form button', () => {
wrapper.find(GlButton).vm.$emit('click');
......
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