mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-53087 - remove AB test for reduced onboarding task list item (#23856)
This commit is contained in:
committed by
GitHub
parent
a35c350a85
commit
e8349545b8
@@ -55,9 +55,6 @@ type FeatureFlags struct {
|
||||
|
||||
PeopleProduct bool
|
||||
|
||||
// A/B Test on reduced onboarding task list item
|
||||
ReduceOnBoardingTaskList bool
|
||||
|
||||
ThreadsEverywhere bool
|
||||
|
||||
GlobalDrafts bool
|
||||
@@ -86,7 +83,6 @@ func (f *FeatureFlags) SetDefaults() {
|
||||
f.CallsEnabled = true
|
||||
f.PostPriority = true
|
||||
f.PeopleProduct = false
|
||||
f.ReduceOnBoardingTaskList = false
|
||||
f.ThreadsEverywhere = false
|
||||
f.GlobalDrafts = true
|
||||
f.DeprecateCloudFree = false
|
||||
|
||||
@@ -8,8 +8,6 @@ import {mount} from 'enzyme';
|
||||
|
||||
import configureStore from 'store';
|
||||
|
||||
import * as preferences from 'mattermost-redux/selectors/entities/preferences';
|
||||
|
||||
import {useTasksList} from './onboarding_tasks_manager';
|
||||
|
||||
const WrapperComponent = (): JSX.Element => {
|
||||
@@ -97,53 +95,4 @@ describe('onboarding tasks manager', () => {
|
||||
// verify visit_system_console and start_trial were removed
|
||||
expect(wrapper.findWhere((node) => node.key() === 'invite_people')).toHaveLength(0);
|
||||
});
|
||||
|
||||
describe('with ReduceOnBoardingTaskList feature flag true ', () => {
|
||||
it('removes only the ReduceOnBoardingTaskList feature flag items when user is first admin or admin', () => {
|
||||
const store = configureStore(initialState);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-ignore
|
||||
preferences.isReduceOnBoardingTaskList = jest.fn().mockReturnValue('true');
|
||||
|
||||
const wrapper = mount(
|
||||
<Provider store={store}>
|
||||
<WrapperComponent/>
|
||||
</Provider>,
|
||||
);
|
||||
expect(wrapper.find('li')).toHaveLength(3);
|
||||
});
|
||||
|
||||
it('removes start_trial and ReduceOnBoardingTaskList feature flag items when user is end user', () => {
|
||||
const endUserState = {...initialState, entities: {...initialState.entities, users: {...initialState.entities.users, currentUserId: user2}}};
|
||||
const store = configureStore(endUserState);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-ignore
|
||||
preferences.isReduceOnBoardingTaskList = jest.fn().mockReturnValue('true');
|
||||
|
||||
const wrapper = mount(
|
||||
<Provider store={store}>
|
||||
<WrapperComponent/>
|
||||
</Provider>,
|
||||
);
|
||||
expect(wrapper.find('li')).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('removes start_trial and invite people and ReduceOnBoardingTaskList feature flag items when user is GUEST user', () => {
|
||||
const endUserState = {...initialState, entities: {...initialState.entities, users: {...initialState.entities.users, currentUserId: user3}}};
|
||||
const store = configureStore(endUserState);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-ignore
|
||||
preferences.isReduceOnBoardingTaskList = jest.fn().mockReturnValue('true');
|
||||
|
||||
const wrapper = mount(
|
||||
<Provider store={store}>
|
||||
<WrapperComponent/>
|
||||
</Provider>,
|
||||
);
|
||||
expect(wrapper.find('li')).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,10 +22,7 @@ import LearnMoreTrialModal from 'components/learn_more_trial_modal/learn_more_tr
|
||||
import {savePreferences} from 'mattermost-redux/actions/preferences';
|
||||
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/common';
|
||||
|
||||
import {
|
||||
isReduceOnBoardingTaskList,
|
||||
makeGetCategory,
|
||||
} from 'mattermost-redux/selectors/entities/preferences';
|
||||
import {makeGetCategory} from 'mattermost-redux/selectors/entities/preferences';
|
||||
import {getLicense} from 'mattermost-redux/selectors/entities/general';
|
||||
import {isCurrentUserGuestUser, isCurrentUserSystemAdmin, isFirstAdmin} from 'mattermost-redux/selectors/entities/users';
|
||||
|
||||
@@ -144,9 +141,6 @@ export const useTasksList = () => {
|
||||
const isUserAdmin = useSelector((state: GlobalState) => isCurrentUserSystemAdmin(state));
|
||||
const isGuestUser = useSelector((state: GlobalState) => isCurrentUserGuestUser(state));
|
||||
const isUserFirstAdmin = useSelector(isFirstAdmin);
|
||||
const isThinOnBoardingTaskList = useSelector((state: GlobalState) => {
|
||||
return isReduceOnBoardingTaskList(state);
|
||||
});
|
||||
|
||||
// Cloud conditions
|
||||
const subscription = useSelector((state: GlobalState) => state.entities.cloud.subscription);
|
||||
@@ -187,12 +181,6 @@ export const useTasksList = () => {
|
||||
delete list.INVITE_PEOPLE;
|
||||
}
|
||||
|
||||
if (isThinOnBoardingTaskList) {
|
||||
delete list.DOWNLOAD_APP;
|
||||
delete list.COMPLETE_YOUR_PROFILE;
|
||||
delete list.VISIT_SYSTEM_CONSOLE;
|
||||
}
|
||||
|
||||
return Object.values(list);
|
||||
};
|
||||
|
||||
|
||||
@@ -282,10 +282,6 @@ export function localDraftsAreEnabled(state: GlobalState): boolean {
|
||||
return getFeatureFlagValue(state, 'GlobalDrafts') === 'true';
|
||||
}
|
||||
|
||||
export function isReduceOnBoardingTaskList(state: GlobalState): boolean {
|
||||
return getFeatureFlagValue(state, 'ReduceOnBoardingTaskList') === 'true';
|
||||
}
|
||||
|
||||
export function getVisibleDmGmLimit(state: GlobalState) {
|
||||
const defaultLimit = 40;
|
||||
return getInt(state, Preferences.CATEGORY_SIDEBAR_SETTINGS, Preferences.LIMIT_VISIBLE_DMS_GMS, defaultLimit);
|
||||
|
||||
@@ -194,7 +194,6 @@ export type ClientConfig = {
|
||||
DisableAppBar: string;
|
||||
EnableComplianceExport: string;
|
||||
PostPriority: string;
|
||||
ReduceOnBoardingTaskList: string;
|
||||
PostAcknowledgements: string;
|
||||
AllowPersistentNotifications: string;
|
||||
PersistentNotificationMaxRecipients: string;
|
||||
|
||||
Reference in New Issue
Block a user