MM-53087 - remove AB test for reduced onboarding task list item (#23856)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a35c350a85
Коммит
e8349545b8
@@ -55,9 +55,6 @@ type FeatureFlags struct {
|
|||||||
|
|
||||||
PeopleProduct bool
|
PeopleProduct bool
|
||||||
|
|
||||||
// A/B Test on reduced onboarding task list item
|
|
||||||
ReduceOnBoardingTaskList bool
|
|
||||||
|
|
||||||
ThreadsEverywhere bool
|
ThreadsEverywhere bool
|
||||||
|
|
||||||
GlobalDrafts bool
|
GlobalDrafts bool
|
||||||
@@ -86,7 +83,6 @@ func (f *FeatureFlags) SetDefaults() {
|
|||||||
f.CallsEnabled = true
|
f.CallsEnabled = true
|
||||||
f.PostPriority = true
|
f.PostPriority = true
|
||||||
f.PeopleProduct = false
|
f.PeopleProduct = false
|
||||||
f.ReduceOnBoardingTaskList = false
|
|
||||||
f.ThreadsEverywhere = false
|
f.ThreadsEverywhere = false
|
||||||
f.GlobalDrafts = true
|
f.GlobalDrafts = true
|
||||||
f.DeprecateCloudFree = false
|
f.DeprecateCloudFree = false
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import {mount} from 'enzyme';
|
|||||||
|
|
||||||
import configureStore from 'store';
|
import configureStore from 'store';
|
||||||
|
|
||||||
import * as preferences from 'mattermost-redux/selectors/entities/preferences';
|
|
||||||
|
|
||||||
import {useTasksList} from './onboarding_tasks_manager';
|
import {useTasksList} from './onboarding_tasks_manager';
|
||||||
|
|
||||||
const WrapperComponent = (): JSX.Element => {
|
const WrapperComponent = (): JSX.Element => {
|
||||||
@@ -97,53 +95,4 @@ describe('onboarding tasks manager', () => {
|
|||||||
// verify visit_system_console and start_trial were removed
|
// verify visit_system_console and start_trial were removed
|
||||||
expect(wrapper.findWhere((node) => node.key() === 'invite_people')).toHaveLength(0);
|
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 {savePreferences} from 'mattermost-redux/actions/preferences';
|
||||||
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/common';
|
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/common';
|
||||||
|
|
||||||
import {
|
import {makeGetCategory} from 'mattermost-redux/selectors/entities/preferences';
|
||||||
isReduceOnBoardingTaskList,
|
|
||||||
makeGetCategory,
|
|
||||||
} from 'mattermost-redux/selectors/entities/preferences';
|
|
||||||
import {getLicense} from 'mattermost-redux/selectors/entities/general';
|
import {getLicense} from 'mattermost-redux/selectors/entities/general';
|
||||||
import {isCurrentUserGuestUser, isCurrentUserSystemAdmin, isFirstAdmin} from 'mattermost-redux/selectors/entities/users';
|
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 isUserAdmin = useSelector((state: GlobalState) => isCurrentUserSystemAdmin(state));
|
||||||
const isGuestUser = useSelector((state: GlobalState) => isCurrentUserGuestUser(state));
|
const isGuestUser = useSelector((state: GlobalState) => isCurrentUserGuestUser(state));
|
||||||
const isUserFirstAdmin = useSelector(isFirstAdmin);
|
const isUserFirstAdmin = useSelector(isFirstAdmin);
|
||||||
const isThinOnBoardingTaskList = useSelector((state: GlobalState) => {
|
|
||||||
return isReduceOnBoardingTaskList(state);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Cloud conditions
|
// Cloud conditions
|
||||||
const subscription = useSelector((state: GlobalState) => state.entities.cloud.subscription);
|
const subscription = useSelector((state: GlobalState) => state.entities.cloud.subscription);
|
||||||
@@ -187,12 +181,6 @@ export const useTasksList = () => {
|
|||||||
delete list.INVITE_PEOPLE;
|
delete list.INVITE_PEOPLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isThinOnBoardingTaskList) {
|
|
||||||
delete list.DOWNLOAD_APP;
|
|
||||||
delete list.COMPLETE_YOUR_PROFILE;
|
|
||||||
delete list.VISIT_SYSTEM_CONSOLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Object.values(list);
|
return Object.values(list);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -282,10 +282,6 @@ export function localDraftsAreEnabled(state: GlobalState): boolean {
|
|||||||
return getFeatureFlagValue(state, 'GlobalDrafts') === 'true';
|
return getFeatureFlagValue(state, 'GlobalDrafts') === 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isReduceOnBoardingTaskList(state: GlobalState): boolean {
|
|
||||||
return getFeatureFlagValue(state, 'ReduceOnBoardingTaskList') === 'true';
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getVisibleDmGmLimit(state: GlobalState) {
|
export function getVisibleDmGmLimit(state: GlobalState) {
|
||||||
const defaultLimit = 40;
|
const defaultLimit = 40;
|
||||||
return getInt(state, Preferences.CATEGORY_SIDEBAR_SETTINGS, Preferences.LIMIT_VISIBLE_DMS_GMS, defaultLimit);
|
return getInt(state, Preferences.CATEGORY_SIDEBAR_SETTINGS, Preferences.LIMIT_VISIBLE_DMS_GMS, defaultLimit);
|
||||||
|
|||||||
@@ -194,7 +194,6 @@ export type ClientConfig = {
|
|||||||
DisableAppBar: string;
|
DisableAppBar: string;
|
||||||
EnableComplianceExport: string;
|
EnableComplianceExport: string;
|
||||||
PostPriority: string;
|
PostPriority: string;
|
||||||
ReduceOnBoardingTaskList: string;
|
|
||||||
PostAcknowledgements: string;
|
PostAcknowledgements: string;
|
||||||
AllowPersistentNotifications: string;
|
AllowPersistentNotifications: string;
|
||||||
PersistentNotificationMaxRecipients: string;
|
PersistentNotificationMaxRecipients: string;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user