mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
4d5f9b8a21
Why this change? Group mention notifications are currently placed in the "Others" tab of the user menu which is odd considering that mentioned notifications are in the reply tab. This commit changes it such that group mention notifications are displayed in the reply tab as well.
34 lines
1002 B
Ruby
34 lines
1002 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe "Viewing User Menu", system: true do
|
|
fab!(:user) { Fabricate(:user) }
|
|
|
|
let(:user_menu) { PageObjects::Components::UserMenu.new }
|
|
|
|
describe "when viewing replies notifications tab" do
|
|
fab!(:topic) { Fabricate(:topic) }
|
|
|
|
it "should display group mentioned notifications in the tab" do
|
|
Jobs.run_immediately!
|
|
|
|
mentionable_group = Fabricate(:group, mentionable_level: Group::ALIAS_LEVELS[:everyone])
|
|
user_in_mentionable_group = Fabricate(:user).tap { |user| mentionable_group.add(user) }
|
|
|
|
_post_with_group_mention =
|
|
PostCreator.create!(user, topic_id: topic.id, raw: "Hello @#{mentionable_group.name}")
|
|
|
|
sign_in(user_in_mentionable_group)
|
|
|
|
visit("/latest")
|
|
|
|
user_menu.open
|
|
|
|
expect(user_menu).to have_right_replies_button_count(1)
|
|
|
|
user_menu.click_replies_notifications_tab
|
|
|
|
expect(user_menu).to have_group_mentioned_notification(topic, user, mentionable_group)
|
|
end
|
|
end
|
|
end
|