mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: consolidate chat channel notification settings (#29080)
On the chat channel settings page, we want to show a single Send push notifications setting instead of the current Desktop notifications and Mobile push notifications settings. For existing users, use the Mobile push notifications setting value for the new Send push notifications setting.
This commit is contained in:
@ -122,36 +122,18 @@ RSpec.describe "Channel - Info - Settings page", type: :system do
|
||||
}.to change { membership.reload.muted }.from(false).to(true)
|
||||
end
|
||||
|
||||
it "can change desktop notification level" do
|
||||
it "can change notification level" do
|
||||
chat_page.visit_channel_settings(channel_1)
|
||||
membership = channel_1.membership_for(current_user)
|
||||
|
||||
expect {
|
||||
select_kit =
|
||||
PageObjects::Components::SelectKit.new(
|
||||
".c-channel-settings__desktop-notifications-selector",
|
||||
)
|
||||
PageObjects::Components::SelectKit.new(".c-channel-settings__notifications-selector")
|
||||
select_kit.expand
|
||||
select_kit.select_row_by_name("Never")
|
||||
|
||||
expect(toasts).to have_success(I18n.t("js.saved"))
|
||||
}.to change { membership.reload.desktop_notification_level }.from("mention").to("never")
|
||||
end
|
||||
|
||||
it "can change mobile notification level" do
|
||||
chat_page.visit_channel_settings(channel_1)
|
||||
membership = channel_1.membership_for(current_user)
|
||||
|
||||
expect {
|
||||
select_kit =
|
||||
PageObjects::Components::SelectKit.new(
|
||||
".c-channel-settings__mobile-notifications-selector",
|
||||
)
|
||||
select_kit.expand
|
||||
select_kit.select_row_by_name("Never")
|
||||
|
||||
expect(toasts).to have_success(I18n.t("js.saved"))
|
||||
}.to change { membership.reload.mobile_notification_level }.from("mention").to("never")
|
||||
}.to change { membership.reload.notification_level }.from("mention").to("never")
|
||||
end
|
||||
|
||||
it "can unfollow channel" do
|
||||
|
Reference in New Issue
Block a user