MM-51711_Feature flag: APPS sidebar category (#22766)

Этот коммит содержится в:
Julian Mondragón
2023-03-31 15:08:52 -05:00
коммит произвёл GitHub
родитель 3b8a0f224b
Коммит 9156205178
5 изменённых файлов: 47 добавлений и 0 удалений

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

@@ -732,3 +732,41 @@ describe('shouldShowUnreadsCategory', () => {
expect(Selectors.shouldShowUnreadsCategory(state)).toBe(true);
});
});
describe('get feature flags', () => {
test('should check the value of feature flag AppsSidebarCategory', () => {
let state = {
entities: {
general: {
config: {},
},
},
} as GlobalState;
expect(Selectors.appsSidebarCategoryEnabled(state)).toBe(false);
state = {
entities: {
general: {
config: {
FeatureFlagAppsSidebarCategory: 'false',
},
},
},
} as GlobalState;
expect(Selectors.appsSidebarCategoryEnabled(state)).toBe(false);
state = {
entities: {
general: {
config: {
FeatureFlagAppsSidebarCategory: 'true',
},
},
},
} as GlobalState;
expect(Selectors.appsSidebarCategoryEnabled(state)).toBe(true);
});
});

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

@@ -299,3 +299,7 @@ export function autoShowLinkedBoardFFEnabled(state: GlobalState): boolean {
export function onboardingTourTipsEnabled(state: GlobalState): boolean {
return getFeatureFlagValue(state, 'OnboardingTourTips') === 'true';
}
export function appsSidebarCategoryEnabled(state: GlobalState): boolean {
return getFeatureFlagValue(state, 'AppsSidebarCategory') === 'true';
}

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

@@ -116,6 +116,7 @@ export type ClientConfig = {
ExperimentalViewArchivedChannels: string;
FileLevel: string;
FeatureFlagAppsEnabled: string;
FeatureFlagAppsSidebarCategory: string;
FeatureFlagBoardsProduct: string;
FeatureFlagCallsEnabled: string;
FeatureFlagGraphQL: string;