Commit bae6e3cf authored by David O'Regan's avatar David O'Regan

Merge branch 'ag-332996-remove-button' into 'master'

Cloud Licensing: Remove `Enter activation code` button

Changelog: removed

See merge request gitlab-org/gitlab!64382
parents d0fc25b8 0aebc9be
......@@ -3,7 +3,6 @@ import { GlButton, GlModalDirective } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils';
import {
activateCloudLicense,
enterActivationCode,
licensedToHeaderText,
manageSubscriptionButtonText,
subscriptionSyncStatus,
......@@ -26,7 +25,6 @@ export const modalId = 'subscription-activation-modal';
export default {
i18n: {
activateCloudLicense,
enterActivationCode,
licensedToHeaderText,
manageSubscriptionButtonText,
removeLicense,
......@@ -74,9 +72,6 @@ export default {
canActivateSubscription() {
return this.isLicenseFileType;
},
canEnterActivationCode() {
return this.isCloudType;
},
canManageSubscription() {
return this.customersPortalUrl && this.hasSubscription;
},
......@@ -178,15 +173,6 @@ export default {
>
{{ $options.i18n.activateCloudLicense }}
</gl-button>
<gl-button
v-if="canEnterActivationCode"
v-gl-modal="$options.modal.id"
category="primary"
variant="confirm"
data-testid="subscription-enter-code-action"
>
{{ $options.i18n.enterActivationCode }}
</gl-button>
<gl-button
v-if="canUploadLicense"
:href="licenseUploadPath"
......
......@@ -16,7 +16,6 @@ export const howToActivateSubscription = s__(
);
export const activateLabel = s__('SuperSonics|Activate');
export const activateSubscription = s__('SuperSonics|Activate subscription');
export const enterActivationCode = s__('SuperSonics|Enter activation code');
export const activateCloudLicense = s__('SuperSonics|Activate cloud license');
export const noActiveSubscription = s__(`SuperSonics|You do not have an active subscription`);
export const subscriptionDetailsHeaderText = s__('SuperSonics|Subscription details');
......
......@@ -42,11 +42,7 @@ describe('CloudLicenseApp', () => {
template: `<input />`,
});
const createFakeEvent = () => ({
preventDefault,
stopPropagation,
});
const createFakeEvent = () => ({ preventDefault, stopPropagation });
const createComponentWithApollo = ({ props = {}, mutationMock } = {}) => {
wrapper = extendedWrapper(
shallowMount(SubscriptionActivationForm, {
......
......@@ -45,7 +45,6 @@ describe('Subscription Breakdown', () => {
const findLicenseRemoveAction = () => wrapper.findByTestId('license-remove-action');
const findActivateSubscriptionAction = () =>
wrapper.findByTestId('subscription-activate-subscription-action');
const findEnterCodeAction = () => wrapper.findByTestId('subscription-enter-code-action');
const findSubscriptionMangeAction = () => wrapper.findByTestId('subscription-manage-action');
const findSubscriptionSyncAction = () => wrapper.findByTestId('subscription-sync-action');
const findSubscriptionActivationModal = () => wrapper.findComponent(SubscriptionActivationModal);
......@@ -258,21 +257,6 @@ describe('Subscription Breakdown', () => {
expect(findActivateSubscriptionAction().exists()).toBe(shouldShow);
},
);
it.each`
type | shouldShow
${subscriptionTypes.LICENSE_FILE} | ${false}
${subscriptionTypes.CLOUD} | ${true}
`(
'with url is $url and type is $type the enter activation code button is shown: $shouldShow',
({ type, shouldShow }) => {
const props = { subscription: { ...license.ULTIMATE, type } };
const stubs = { GlCard, SubscriptionDetailsCard };
createComponent({ props, stubs });
expect(findEnterCodeAction().exists()).toBe(shouldShow);
},
);
});
describe('with a license file', () => {
......@@ -401,13 +385,4 @@ describe('Subscription Breakdown', () => {
});
});
});
describe('activating a new subscription', () => {
it('shows a modal', () => {
createComponent({ stubs: { GlCard, SubscriptionDetailsCard } });
findEnterCodeAction().vm.$emit('click');
expect(glModalDirective).toHaveBeenCalledWith(modalId);
});
});
});
......@@ -31437,9 +31437,6 @@ msgstr ""
msgid "SuperSonics|Cloud license"
msgstr ""
msgid "SuperSonics|Enter activation code"
msgstr ""
msgid "SuperSonics|Expires on"
msgstr ""
......
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