diff --git a/app/constants/license.ts b/app/constants/license.ts index e62e2967b..698126080 100644 --- a/app/constants/license.ts +++ b/app/constants/license.ts @@ -8,7 +8,7 @@ export default { Starter: 'starter', Professional: 'professional', Enterprise: 'enterprise', - Premium: 'premium', + EnterpriseAdvanced: 'advanced', }, SelfHostedProducts: { STARTER: 'starter', diff --git a/app/screens/channel/channel_feature_checks.test.tsx b/app/screens/channel/channel_feature_checks.test.tsx index d1dab0f36..3929490e0 100644 --- a/app/screens/channel/channel_feature_checks.test.tsx +++ b/app/screens/channel/channel_feature_checks.test.tsx @@ -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); }); }); diff --git a/app/screens/channel/channel_feature_checks.ts b/app/screens/channel/channel_feature_checks.ts index 8d9deb521..0dc2551c4 100644 --- a/app/screens/channel/channel_feature_checks.ts +++ b/app/screens/channel/channel_feature_checks.ts @@ -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; } diff --git a/app/screens/channel/header/channel_banner/channel_banner.test.tsx b/app/screens/channel/header/channel_banner/channel_banner.test.tsx index 9d991e2ca..5136fbe7b 100644 --- a/app/screens/channel/header/channel_banner/channel_banner.test.tsx +++ b/app/screens/channel/header/channel_banner/channel_banner.test.tsx @@ -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', () => {