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'; ...@@ -3,7 +3,6 @@ import { GlButton, GlModalDirective } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { import {
activateCloudLicense, activateCloudLicense,
enterActivationCode,
licensedToHeaderText, licensedToHeaderText,
manageSubscriptionButtonText, manageSubscriptionButtonText,
subscriptionSyncStatus, subscriptionSyncStatus,
...@@ -26,7 +25,6 @@ export const modalId = 'subscription-activation-modal'; ...@@ -26,7 +25,6 @@ export const modalId = 'subscription-activation-modal';
export default { export default {
i18n: { i18n: {
activateCloudLicense, activateCloudLicense,
enterActivationCode,
licensedToHeaderText, licensedToHeaderText,
manageSubscriptionButtonText, manageSubscriptionButtonText,
removeLicense, removeLicense,
...@@ -74,9 +72,6 @@ export default { ...@@ -74,9 +72,6 @@ export default {
canActivateSubscription() { canActivateSubscription() {
return this.isLicenseFileType; return this.isLicenseFileType;
}, },
canEnterActivationCode() {
return this.isCloudType;
},
canManageSubscription() { canManageSubscription() {
return this.customersPortalUrl && this.hasSubscription; return this.customersPortalUrl && this.hasSubscription;
}, },
...@@ -178,15 +173,6 @@ export default { ...@@ -178,15 +173,6 @@ export default {
> >
{{ $options.i18n.activateCloudLicense }} {{ $options.i18n.activateCloudLicense }}
</gl-button> </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 <gl-button
v-if="canUploadLicense" v-if="canUploadLicense"
:href="licenseUploadPath" :href="licenseUploadPath"
......
...@@ -16,7 +16,6 @@ export const howToActivateSubscription = s__( ...@@ -16,7 +16,6 @@ export const howToActivateSubscription = s__(
); );
export const activateLabel = s__('SuperSonics|Activate'); export const activateLabel = s__('SuperSonics|Activate');
export const activateSubscription = s__('SuperSonics|Activate subscription'); 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 activateCloudLicense = s__('SuperSonics|Activate cloud license');
export const noActiveSubscription = s__(`SuperSonics|You do not have an active subscription`); export const noActiveSubscription = s__(`SuperSonics|You do not have an active subscription`);
export const subscriptionDetailsHeaderText = s__('SuperSonics|Subscription details'); export const subscriptionDetailsHeaderText = s__('SuperSonics|Subscription details');
......
...@@ -42,11 +42,7 @@ describe('CloudLicenseApp', () => { ...@@ -42,11 +42,7 @@ describe('CloudLicenseApp', () => {
template: `<input />`, template: `<input />`,
}); });
const createFakeEvent = () => ({ const createFakeEvent = () => ({ preventDefault, stopPropagation });
preventDefault,
stopPropagation,
});
const createComponentWithApollo = ({ props = {}, mutationMock } = {}) => { const createComponentWithApollo = ({ props = {}, mutationMock } = {}) => {
wrapper = extendedWrapper( wrapper = extendedWrapper(
shallowMount(SubscriptionActivationForm, { shallowMount(SubscriptionActivationForm, {
......
...@@ -45,7 +45,6 @@ describe('Subscription Breakdown', () => { ...@@ -45,7 +45,6 @@ describe('Subscription Breakdown', () => {
const findLicenseRemoveAction = () => wrapper.findByTestId('license-remove-action'); const findLicenseRemoveAction = () => wrapper.findByTestId('license-remove-action');
const findActivateSubscriptionAction = () => const findActivateSubscriptionAction = () =>
wrapper.findByTestId('subscription-activate-subscription-action'); wrapper.findByTestId('subscription-activate-subscription-action');
const findEnterCodeAction = () => wrapper.findByTestId('subscription-enter-code-action');
const findSubscriptionMangeAction = () => wrapper.findByTestId('subscription-manage-action'); const findSubscriptionMangeAction = () => wrapper.findByTestId('subscription-manage-action');
const findSubscriptionSyncAction = () => wrapper.findByTestId('subscription-sync-action'); const findSubscriptionSyncAction = () => wrapper.findByTestId('subscription-sync-action');
const findSubscriptionActivationModal = () => wrapper.findComponent(SubscriptionActivationModal); const findSubscriptionActivationModal = () => wrapper.findComponent(SubscriptionActivationModal);
...@@ -258,21 +257,6 @@ describe('Subscription Breakdown', () => { ...@@ -258,21 +257,6 @@ describe('Subscription Breakdown', () => {
expect(findActivateSubscriptionAction().exists()).toBe(shouldShow); 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', () => { describe('with a license file', () => {
...@@ -401,13 +385,4 @@ describe('Subscription Breakdown', () => { ...@@ -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 "" ...@@ -31437,9 +31437,6 @@ msgstr ""
msgid "SuperSonics|Cloud license" msgid "SuperSonics|Cloud license"
msgstr "" msgstr ""
msgid "SuperSonics|Enter activation code"
msgstr ""
msgid "SuperSonics|Expires on" msgid "SuperSonics|Expires on"
msgstr "" 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