Renamed premium SKU to Enterprise Advanced (#8819)

This commit is contained in:
Harshil Sharma 2025-05-02 05:12:27 +05:30 committed by GitHub
parent 0e67bc8944
commit 45773e359d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 11 deletions

View file

@ -8,7 +8,7 @@ export default {
Starter: 'starter',
Professional: 'professional',
Enterprise: 'enterprise',
Premium: 'premium',
EnterpriseAdvanced: 'advanced',
},
SelfHostedProducts: {
STARTER: 'starter',

View file

@ -6,7 +6,7 @@ import {shouldShowChannelBanner} from '@screens/channel/channel_feature_checks';
describe('shouldShowChannelBanner', () => {
const validLicense = {
SkuShortName: License.SKU_SHORT_NAME.Premium,
SkuShortName: License.SKU_SHORT_NAME.EnterpriseAdvanced,
} as ClientLicense;
const validBannerInfo = {
@ -24,17 +24,17 @@ describe('shouldShowChannelBanner', () => {
});
it('should return false when license is not professional', () => {
const nonPremiumLicense = {
const nonEnterpriseAdvancedLicense = {
SkuShortName: License.SKU_SHORT_NAME.Professional,
} as ClientLicense;
expect(shouldShowChannelBanner(General.OPEN_CHANNEL, nonPremiumLicense, validBannerInfo)).toBe(false);
expect(shouldShowChannelBanner(General.OPEN_CHANNEL, nonEnterpriseAdvancedLicense, validBannerInfo)).toBe(false);
});
it('should return false when license is not enterprise', () => {
const nonPremiumLicense = {
const nonEnterpriseAdvancedLicense = {
SkuShortName: License.SKU_SHORT_NAME.Enterprise,
} as ClientLicense;
expect(shouldShowChannelBanner(General.OPEN_CHANNEL, nonPremiumLicense, validBannerInfo)).toBe(false);
expect(shouldShowChannelBanner(General.OPEN_CHANNEL, nonEnterpriseAdvancedLicense, validBannerInfo)).toBe(false);
});
it('should return false when banner info is incomplete', () => {
@ -60,11 +60,11 @@ describe('shouldShowChannelBanner', () => {
expect(shouldShowChannelBanner(General.GM_CHANNEL, validLicense, validBannerInfo)).toBe(false);
});
it('should return true for valid open channel with complete banner info and premium license', () => {
it('should return true for valid open channel with complete banner info and enterprise advanced license', () => {
expect(shouldShowChannelBanner(General.OPEN_CHANNEL, validLicense, validBannerInfo)).toBe(true);
});
it('should return true for valid private channel with complete banner info and premium license', () => {
it('should return true for valid private channel with complete banner info and enterprise advanced license', () => {
expect(shouldShowChannelBanner(General.PRIVATE_CHANNEL, validLicense, validBannerInfo)).toBe(true);
});
});

View file

@ -8,9 +8,9 @@ export function shouldShowChannelBanner(channelType?: ChannelType, license?: Cli
return false;
}
const isPremiumLicense = license.SkuShortName === License.SKU_SHORT_NAME.Premium;
const isEnterpriseAdvancedLicense = license.SkuShortName === License.SKU_SHORT_NAME.EnterpriseAdvanced;
const bannerInfoComplete = Boolean(bannerInfo.enabled && bannerInfo.text && bannerInfo.background_color);
const isValidChannelType = channelType === General.OPEN_CHANNEL || channelType === General.PRIVATE_CHANNEL;
return isPremiumLicense && bannerInfoComplete && isValidChannelType;
return isEnterpriseAdvancedLicense && bannerInfoComplete && isValidChannelType;
}

View file

@ -50,7 +50,7 @@ describe('ChannelBanner', () => {
});
});
await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.LICENSE, value: {IsLicensed: 'true', SkuShortName: License.SKU_SHORT_NAME.Premium}}], prepareRecordsOnly: false});
await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.LICENSE, value: {IsLicensed: 'true', SkuShortName: License.SKU_SHORT_NAME.EnterpriseAdvanced}}], prepareRecordsOnly: false});
});
it('renders correctly with valid props', () => {