Skip to content

A platform for community discussion. Free, open, simple.

Revert "FEATURE: Disable user tips + narrative bot welcome post for all sites (#34316)" (#34370)

Martin Brennan70859e277fbe
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 7c6b6c92f3d..fb4c7487cf5 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -489,7 +489,7 @@ basic:
area: "analytics"
enable_user_tips:
client: true
- default: false
+ default: true
refresh: true
area: "users"
page_loading_indicator:
diff --git a/plugins/discourse-narrative-bot/config/settings.yml b/plugins/discourse-narrative-bot/config/settings.yml
index edb8b12a0d2..45d65bf2cf2 100644
--- a/plugins/discourse-narrative-bot/config/settings.yml
+++ b/plugins/discourse-narrative-bot/config/settings.yml
@@ -3,7 +3,7 @@ plugins:
default: true
client: true
disable_discourse_narrative_bot_welcome_post:
- default: true
+ default: false
discourse_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.rb
index 8b73087375c..a1db2754dc6 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,10 +3,7 @@
RSpec.describe "Discobot welcome post" do
let(:user) { Fabricate(:user) }
- before do
- SiteSetting.discourse_narrative_bot_enabled = true
- SiteSetting.disable_discourse_narrative_bot_welcome_post = false
- end
+ before { SiteSetting.discourse_narrative_bot_enabled = true }
context "when discourse_narrative_bot_welcome_post_delay is 0" do
it "should not delay the welcome post" do
diff --git a/plugins/discourse-narrative-bot/spec/system/user_spec.rb b/plugins/discourse-narrative-bot/spec/system/user_spec.rb
index e9835db5d95..a46b45ed3b2 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 do
fab!(:admin)
- fab!(:current_user, :user)
+ fab!(:user)
fab!(:topics) { Fabricate.times(2, :post).map(&:topic) }
fab!(:posts) { Fabricate.times(3, :post, topic: topics[0]) }
@@ -11,28 +11,24 @@ describe "Narrative Bot PM", type: :system do
Jobs.run_immediately!
SiteSetting.enable_user_tips = true
SiteSetting.discourse_narrative_bot_enabled = true
- SiteSetting.disable_discourse_narrative_bot_welcome_post = false
end
it "does not delete the narrative bot PM when skipping all tips" do
- sign_in(current_user)
+ sign_in user
# shortcut to generate welcome post since we're not going through user creation or first login
- current_user.enqueue_bot_welcome_post
+ user.enqueue_bot_welcome_post
- visit("/")
+ visit "/"
tooltip = PageObjects::Components::Tooltips.new("user-tip")
- tooltip.find(".btn", text: I18n.t("js.user_tips.skip")).click
+ tooltip.find(".btn", text: "Skip tips").click
expect(tooltip).to be_not_present
expect(page).to have_css(".badge-notification.new-pms")
find("#toggle-current-user").click
- expect(page).to have_css(
- ".notification.unread.private-message",
- text: I18n.t("discourse_narrative_bot.new_user_narrative.hello.title"),
- )
+ expect(page).to have_css(".notification.unread.private-message", text: "Greetings!")
end
end
end
diff --git a/plugins/discourse-narrative-bot/spec/user_spec.rb b/plugins/discourse-narrative-bot/spec/user_spec.rb
index 9f7bbaad26a..73abae1841a 100644
--- a/plugins/discourse-narrative-bot/spec/user_spec.rb
+++ b/plugins/discourse-narrative-bot/spec/user_spec.rb
@@ -16,7 +16,6 @@ RSpec.describe User do
stub_image_size
Jobs.run_immediately!
SiteSetting.discourse_narrative_bot_enabled = true
- SiteSetting.disable_discourse_narrative_bot_welcome_post = false
end
describe "when a user is created" do