A platform for community discussion. Free, open, simple.
FEATURE: Disable user tips + narrative bot welcome post for all sites (#34316)
Martin Brennan443caf1bed82
diff --git a/config/site_settings.yml b/config/site_settings.ymlindex fb4c7487cf5..7c6b6c92f3d 100644--- a/config/site_settings.yml+++ b/config/site_settings.yml@@ -489,7 +489,7 @@ basic:area: "analytics"enable_user_tips:client: true- default: true+ default: falserefresh: truearea: "users"page_loading_indicator:diff --git a/plugins/discourse-narrative-bot/config/settings.yml b/plugins/discourse-narrative-bot/config/settings.ymlindex 45d65bf2cf2..edb8b12a0d2 100644--- a/plugins/discourse-narrative-bot/config/settings.yml+++ b/plugins/discourse-narrative-bot/config/settings.yml@@ -3,7 +3,7 @@ plugins:default: trueclient: truedisable_discourse_narrative_bot_welcome_post:- default: false+ default: truediscourse_narrative_bot_welcome_post_type:default: 'new_user_track'enum: 'DiscourseNarrativeBot::WelcomePostTypeSiteSetting'diff --git a/plugins/discourse-narrative-bot/spec/requests/discobot_welcome_post_spec.rb b/plugins/discourse-narrative-bot/spec/requests/discobot_welcome_post_spec.rbindex a1db2754dc6..8b73087375c 100644--- a/plugins/discourse-narrative-bot/spec/requests/discobot_welcome_post_spec.rb+++ b/plugins/discourse-narrative-bot/spec/requests/discobot_welcome_post_spec.rb@@ -3,7 +3,10 @@RSpec.describe "Discobot welcome post" dolet(:user) { Fabricate(:user) }- before { SiteSetting.discourse_narrative_bot_enabled = true }+ before do+ SiteSetting.discourse_narrative_bot_enabled = true+ SiteSetting.disable_discourse_narrative_bot_welcome_post = false+ endcontext "when discourse_narrative_bot_welcome_post_delay is 0" doit "should not delay the welcome post" dodiff --git a/plugins/discourse-narrative-bot/spec/system/user_spec.rb b/plugins/discourse-narrative-bot/spec/system/user_spec.rbindex a46b45ed3b2..e9835db5d95 100644--- a/plugins/discourse-narrative-bot/spec/system/user_spec.rb+++ b/plugins/discourse-narrative-bot/spec/system/user_spec.rb@@ -2,7 +2,7 @@describe "Narrative Bot PM", type: :system dofab!(:admin)- fab!(:user)+ fab!(:current_user, :user)fab!(:topics) { Fabricate.times(2, :post).map(&:topic) }fab!(:posts) { Fabricate.times(3, :post, topic: topics[0]) }@@ -11,24 +11,28 @@ describe "Narrative Bot PM", type: :system doJobs.run_immediately!SiteSetting.enable_user_tips = trueSiteSetting.discourse_narrative_bot_enabled = true+ SiteSetting.disable_discourse_narrative_bot_welcome_post = falseendit "does not delete the narrative bot PM when skipping all tips" do- sign_in user+ sign_in(current_user)# shortcut to generate welcome post since we're not going through user creation or first login- user.enqueue_bot_welcome_post+ current_user.enqueue_bot_welcome_post- visit "/"+ visit("/")tooltip = PageObjects::Components::Tooltips.new("user-tip")- tooltip.find(".btn", text: "Skip tips").click+ tooltip.find(".btn", text: I18n.t("js.user_tips.skip")).clickexpect(tooltip).to be_not_presentexpect(page).to have_css(".badge-notification.new-pms")find("#toggle-current-user").click- expect(page).to have_css(".notification.unread.private-message", text: "Greetings!")+ expect(page).to have_css(+ ".notification.unread.private-message",+ text: I18n.t("discourse_narrative_bot.new_user_narrative.hello.title"),+ )endendenddiff --git a/plugins/discourse-narrative-bot/spec/user_spec.rb b/plugins/discourse-narrative-bot/spec/user_spec.rbindex 73abae1841a..9f7bbaad26a 100644--- a/plugins/discourse-narrative-bot/spec/user_spec.rb+++ b/plugins/discourse-narrative-bot/spec/user_spec.rb@@ -16,6 +16,7 @@ RSpec.describe User dostub_image_sizeJobs.run_immediately!SiteSetting.discourse_narrative_bot_enabled = true+ SiteSetting.disable_discourse_narrative_bot_welcome_post = falseenddescribe "when a user is created" do