Renamed premium SKU to Enterprise Advanced (#30882)

Этот коммит содержится в:
Harshil Sharma
2025-05-02 11:34:46 +05:30
коммит произвёл GitHub
родитель e1f47e22e7
Коммит a76c063d85
16 изменённых файлов: 66 добавлений и 66 удалений

Просмотреть файл

@@ -86,7 +86,7 @@ describe('components/channel_banner', () => {
general: {
license: {
IsLicensed: 'true',
SkuShortName: LicenseSkus.Premium,
SkuShortName: LicenseSkus.EnterpriseAdvanced,
},
},
channels: {

Просмотреть файл

@@ -277,12 +277,12 @@ describe('ChannelSettingsModal', () => {
expect(screen.queryByTestId('configuration-tab-button')).not.toBeInTheDocument();
});
it('should show configuration tab when premium license', async () => {
it('should show configuration tab when enterprise advanced license', async () => {
const baseState: DeepPartial<GlobalState> = {
entities: {
general: {
license: {
SkuShortName: 'premium',
SkuShortName: 'advanced',
},
},
},

Просмотреть файл

@@ -77,5 +77,5 @@ export default {
CUSTOM_GROUP_USER_ROLE: 'custom_group_user',
MAX_GET_ROLES_BY_NAMES: 100,
SKUEnterprise: 'enterprise',
SKUPremium: 'premium',
SKUEnterpriseAdvanced: 'advanced',
};

Просмотреть файл

@@ -17,7 +17,7 @@ describe('Selectors.ChannelBanner', () => {
entities: {
general: {
license: {
SkuShortName: General.SKUPremium,
SkuShortName: General.SKUEnterpriseAdvanced,
},
},
channels: {
@@ -37,7 +37,7 @@ describe('Selectors.ChannelBanner', () => {
},
};
test('should return false when license is not premium', () => {
test('should return false when license is not enterprise advanced', () => {
const state: DeepPartial<GlobalState> = {
...baseState,
entities: {

Просмотреть файл

@@ -10,7 +10,7 @@ import {getLicense} from 'mattermost-redux/selectors/entities/general';
export const selectChannelBannerEnabled = (state: GlobalState): boolean => {
const license = getLicense(state);
return license?.SkuShortName === General.SKUPremium;
return license?.SkuShortName === General.SKUEnterpriseAdvanced;
};
export const selectShowChannelBanner = (state: GlobalState, channelId: string): boolean => {

Просмотреть файл

@@ -542,7 +542,7 @@ export enum LicenseSkus {
Starter = 'starter',
Professional = 'professional',
Enterprise = 'enterprise',
Premium = 'premium',
EnterpriseAdvanced = 'advanced',
}
export function getLicenseTier(licenseSku: string): number {
@@ -551,7 +551,7 @@ export function getLicenseTier(licenseSku: string): number {
return 10;
case LicenseSkus.Enterprise:
return 20;
case LicenseSkus.Premium:
case LicenseSkus.EnterpriseAdvanced:
return 30;
default:
return 0;

Просмотреть файл

@@ -88,7 +88,7 @@ export const isEnterpriseLicense = (license?: ClientLicense) => {
switch (license?.SkuShortName) {
case LicenseSkus.Enterprise:
case LicenseSkus.E20:
case LicenseSkus.Premium:
case LicenseSkus.EnterpriseAdvanced:
return true;
}

Просмотреть файл

@@ -22,7 +22,7 @@ export const getSkuDisplayName = (skuShortName: string, isGovSku: boolean): stri
skuName = 'Enterprise';
break;
default:
skuName = 'Premium';
skuName = 'Enterprise Advanced';
break;
}