Various improvements to preferences code (#27710)
* Add isPostFlagged selector * Remove unused code for actions_menu preferences * Improve types of Preference and getPreference * MM-58111 Change makeGetCategory to take category name once * Use shouldShowJoinLeaveMessages everywhere * Change makeGetCategory to better memoize its result * Fix test that needs EnableJoinLeaveMessageByDefault to be set * Remove more references to action_menu preferences
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
28939d84da
Коммит
6956923b6a
@@ -256,17 +256,6 @@ Cypress.Commands.add('apiSaveCloudTrialBannerPreference', (userId, name, value)
|
||||
return cy.apiSaveUserPreference([preference], userId);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('apiSaveActionsMenuPreference', (userId, value = true) => {
|
||||
const preference = {
|
||||
user_id: userId,
|
||||
category: 'actions_menu',
|
||||
name: 'actions_menu_tutorial_state',
|
||||
value: JSON.stringify({actions_menu_modal_viewed: value}),
|
||||
};
|
||||
|
||||
return cy.apiSaveUserPreference([preference], userId);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('apiSaveStartTrialModal', (userId, value = 'true') => {
|
||||
const preference = {
|
||||
user_id: userId,
|
||||
@@ -402,12 +391,6 @@ Cypress.Commands.add('apiDisableTutorials', (userId) => {
|
||||
name: userId,
|
||||
value: '999',
|
||||
},
|
||||
{
|
||||
user_id: userId,
|
||||
category: 'actions_menu',
|
||||
name: 'actions_menu_tutorial_state',
|
||||
value: '{"actions_menu_modal_viewed":true}',
|
||||
},
|
||||
{
|
||||
user_id: userId,
|
||||
category: 'drafts',
|
||||
|
||||
Ссылка в новой задаче
Block a user