[BREAKING CHANGE] remove call recording feature flag and backfill upgrade command for existing command menu items navigation command (#22176)
<!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/22176?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
This commit is contained in:
+12
-10
@@ -119,13 +119,14 @@ describe('buildNavigationFlatCommandMenuItem', () => {
|
||||
...baseArgs,
|
||||
objectMetadata: {
|
||||
...baseObjectMetadata,
|
||||
universalIdentifier: STANDARD_OBJECTS.callRecording.universalIdentifier,
|
||||
nameSingular: 'callRecording',
|
||||
universalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.universalIdentifier,
|
||||
nameSingular: 'messageCampaign',
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.conditionalAvailabilityExpression).toBe(
|
||||
'featureFlags.IS_CALL_RECORDING_ENABLED and targetObjectReadPermissions.callRecording',
|
||||
'featureFlags.IS_EMAIL_GROUP_ENABLED and targetObjectReadPermissions.messageCampaign',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -154,14 +155,15 @@ describe('buildNavigationFlatCommandMenuItem', () => {
|
||||
});
|
||||
|
||||
describe('buildNavigationConditionalAvailabilityExpression', () => {
|
||||
it('gates the standard call recording object behind both the flag and read permission', () => {
|
||||
it('gates a feature-flagged standard object behind both the flag and read permission', () => {
|
||||
expect(
|
||||
buildNavigationConditionalAvailabilityExpression({
|
||||
universalIdentifier: STANDARD_OBJECTS.callRecording.universalIdentifier,
|
||||
nameSingular: 'callRecording',
|
||||
universalIdentifier:
|
||||
STANDARD_OBJECTS.messageCampaign.universalIdentifier,
|
||||
nameSingular: 'messageCampaign',
|
||||
}),
|
||||
).toBe(
|
||||
'featureFlags.IS_CALL_RECORDING_ENABLED and targetObjectReadPermissions.callRecording',
|
||||
'featureFlags.IS_EMAIL_GROUP_ENABLED and targetObjectReadPermissions.messageCampaign',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -174,12 +176,12 @@ describe('buildNavigationConditionalAvailabilityExpression', () => {
|
||||
).toBe('targetObjectReadPermissions.person');
|
||||
});
|
||||
|
||||
it('does not gate a custom object that reuses the callRecording name', () => {
|
||||
it('does not gate a custom object that reuses a feature-flagged object name', () => {
|
||||
expect(
|
||||
buildNavigationConditionalAvailabilityExpression({
|
||||
universalIdentifier: 'custom-object-universal-id',
|
||||
nameSingular: 'callRecording',
|
||||
nameSingular: 'messageCampaign',
|
||||
}),
|
||||
).toBe('targetObjectReadPermissions.callRecording');
|
||||
).toBe('targetObjectReadPermissions.messageCampaign');
|
||||
});
|
||||
});
|
||||
|
||||
-2
@@ -20,8 +20,6 @@ export const NAVIGATION_INTERPOLATED_ICON =
|
||||
const NAVIGATION_FEATURE_FLAG_GATE_BY_OBJECT_UNIVERSAL_IDENTIFIER: Partial<
|
||||
Record<string, FeatureFlagKey>
|
||||
> = {
|
||||
[STANDARD_OBJECTS.callRecording.universalIdentifier]:
|
||||
FeatureFlagKey.IS_CALL_RECORDING_ENABLED,
|
||||
[STANDARD_OBJECTS.messageCampaign.universalIdentifier]:
|
||||
FeatureFlagKey.IS_EMAIL_GROUP_ENABLED,
|
||||
[STANDARD_OBJECTS.messageList.universalIdentifier]:
|
||||
|
||||
Reference in New Issue
Block a user