mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 14:44:34 +08:00
FEATURE: Use rich user status tooltip everywhere (#21125)
- Inline mentions on posts - Inline mentions on chat messages - The user autocomplete for the composer - The user autocomplete for chat - The chat section of the sidebar
This commit is contained in:
@ -181,10 +181,10 @@ RSpec.describe "Chat channel", type: :system do
|
||||
chat.visit_channel(channel_1)
|
||||
|
||||
expect(page).to have_selector(
|
||||
".mention .user-status[title='#{current_user.user_status.description}']",
|
||||
".mention .user-status-message img[alt='#{current_user.user_status.emoji}']",
|
||||
)
|
||||
expect(page).to have_selector(
|
||||
".mention .user-status[title='#{other_user.user_status.description}']",
|
||||
".mention .user-status-message img[alt='#{other_user.user_status.emoji}']",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
@ -146,7 +146,7 @@ RSpec.describe "Sidebar navigation menu", type: :system do
|
||||
visit("/")
|
||||
|
||||
expect(sidebar_page.dms_section.find("a.sidebar-section-link:nth-child(1)")).to have_css(
|
||||
".user-status",
|
||||
".user-status-message",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
@ -20,8 +20,8 @@ RSpec.describe "User status | sidebar", type: :system do
|
||||
|
||||
visit("/")
|
||||
|
||||
expect(find(".user-status .emoji")["title"]).to eq("online")
|
||||
expect(find(".user-status .emoji")["src"]).to include("heart")
|
||||
expect(find(".user-status-message .emoji")["alt"]).to eq("heart")
|
||||
expect(find(".user-status-message .emoji")["src"]).to include("heart")
|
||||
end
|
||||
|
||||
context "when changing status" do
|
||||
@ -31,8 +31,8 @@ RSpec.describe "User status | sidebar", type: :system do
|
||||
visit("/")
|
||||
current_user.set_status!("offline", "tooth")
|
||||
|
||||
expect(page).to have_css('.user-status .emoji[title="offline"]')
|
||||
expect(find(".user-status .emoji")["src"]).to include("tooth")
|
||||
expect(page).to have_css('.user-status-message .emoji[alt="tooth"]')
|
||||
expect(find(".user-status-message .emoji")["src"]).to include("tooth")
|
||||
end
|
||||
end
|
||||
|
||||
@ -43,7 +43,7 @@ RSpec.describe "User status | sidebar", type: :system do
|
||||
visit("/")
|
||||
current_user.clear_status!
|
||||
|
||||
expect(page).to have_no_css(".user-status")
|
||||
expect(page).to have_no_css(".user-status-message")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user