Remove insights (#23952)
* removed server side * Updated store layer * unused import * Updated autogenerated code template * Updated tests * lint fix * unused translations * webapp side * Updated i18n * lint fix: * type fix * Updated snapshots * Removed insights from API specs * updated e2e * Updated e2e tests * Updated e2e tests * Removed insights tests * Removed Insights as possible channel to load in sidebar from test * Removed more insights tests * More e2e fixed * More cleanup * Lint * More cleanup in client4 and boards api * More cleanup * Fixes * lint fix --------- Co-authored-by: maria.nunez <maria.nunez@mattermost.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e37459cd00
Коммит
26617fcbdc
@@ -1810,16 +1810,10 @@ func TestCreateUserWithInitialPreferences(t *testing.T) {
|
||||
t.Run("successfully create a user with initial tutorial and recommended steps preferences", func(t *testing.T) {
|
||||
th.ConfigStore.SetReadOnlyFF(false)
|
||||
defer th.ConfigStore.SetReadOnlyFF(true)
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true })
|
||||
|
||||
testUser := th.CreateUser()
|
||||
defer th.App.PermanentDeleteUser(th.Context, testUser)
|
||||
|
||||
insightsPref, appErr := th.App.GetPreferenceByCategoryAndNameForUser(testUser.Id, model.PreferenceCategoryInsights, model.PreferenceNameInsights)
|
||||
require.Nil(t, appErr)
|
||||
assert.Equal(t, "insights_tutorial_state", insightsPref.Name)
|
||||
assert.Equal(t, "{\"insights_modal_viewed\":true}", insightsPref.Value)
|
||||
|
||||
tutorialStepPref, appErr := th.App.GetPreferenceByCategoryAndNameForUser(testUser.Id, model.PreferenceCategoryTutorialSteps, testUser.Id)
|
||||
require.Nil(t, appErr)
|
||||
assert.Equal(t, testUser.Id, tutorialStepPref.Name)
|
||||
@@ -1831,38 +1825,12 @@ func TestCreateUserWithInitialPreferences(t *testing.T) {
|
||||
assert.Equal(t, "false", recommendedNextStepsPref[0].Value)
|
||||
})
|
||||
|
||||
t.Run("successfully create a user with insights feature flag disabled", func(t *testing.T) {
|
||||
t.Run("successfully create a guest user with initial tutorial and recommended steps preferences", func(t *testing.T) {
|
||||
th.Server.platform.SetConfigReadOnlyFF(false)
|
||||
defer th.Server.platform.SetConfigReadOnlyFF(true)
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = false })
|
||||
defer th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true })
|
||||
testUser := th.CreateUser()
|
||||
defer th.App.PermanentDeleteUser(th.Context, testUser)
|
||||
|
||||
insightsPref, appErr := th.App.GetPreferenceByCategoryAndNameForUser(testUser.Id, model.PreferenceCategoryInsights, model.PreferenceNameInsights)
|
||||
require.Nil(t, appErr)
|
||||
assert.Equal(t, "insights_tutorial_state", insightsPref.Name)
|
||||
assert.Equal(t, "{\"insights_modal_viewed\":false}", insightsPref.Value)
|
||||
|
||||
recommendedNextStepsPref, appErr := th.App.GetPreferenceByCategoryForUser(testUser.Id, model.PreferenceRecommendedNextSteps)
|
||||
require.Nil(t, appErr)
|
||||
assert.Equal(t, model.PreferenceRecommendedNextSteps, recommendedNextStepsPref[0].Category)
|
||||
assert.Equal(t, "hide", recommendedNextStepsPref[0].Name)
|
||||
assert.Equal(t, "false", recommendedNextStepsPref[0].Value)
|
||||
})
|
||||
|
||||
t.Run("successfully create a guest user with initial tutorial, insights and recommended steps preferences", func(t *testing.T) {
|
||||
th.Server.platform.SetConfigReadOnlyFF(false)
|
||||
defer th.Server.platform.SetConfigReadOnlyFF(true)
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true })
|
||||
testUser := th.CreateGuest()
|
||||
defer th.App.PermanentDeleteUser(th.Context, testUser)
|
||||
|
||||
insightsPref, appErr := th.App.GetPreferenceByCategoryAndNameForUser(testUser.Id, model.PreferenceCategoryInsights, model.PreferenceNameInsights)
|
||||
require.Nil(t, appErr)
|
||||
assert.Equal(t, "insights_tutorial_state", insightsPref.Name)
|
||||
assert.Equal(t, "{\"insights_modal_viewed\":true}", insightsPref.Value)
|
||||
|
||||
tutorialStepPref, appErr := th.App.GetPreferenceByCategoryAndNameForUser(testUser.Id, model.PreferenceCategoryTutorialSteps, testUser.Id)
|
||||
require.Nil(t, appErr)
|
||||
assert.Equal(t, testUser.Id, tutorialStepPref.Name)
|
||||
|
||||
Ссылка в новой задаче
Block a user