mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 17:40:43 +08:00
FEATURE: add chat direct message button to user profile (#26135)
This change adds the chat direct message button to user profiles, similarly to how we use it within the user card.
This commit is contained in:
@ -10,13 +10,13 @@ RSpec.describe "User card", type: :system do
|
||||
|
||||
shared_examples "not showing chat button" do
|
||||
it "doesn’t show the chat button" do
|
||||
expect(page).to have_no_css(".chat-user-card-btn")
|
||||
expect(page).to have_no_css(".chat-direct-message-btn")
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples "showing chat button" do
|
||||
it "shows the chat button" do
|
||||
expect(page).to have_css(".chat-user-card-btn")
|
||||
expect(page).to have_css(".chat-direct-message-btn")
|
||||
end
|
||||
end
|
||||
|
||||
@ -49,7 +49,7 @@ RSpec.describe "User card", type: :system do
|
||||
include_examples "showing chat button"
|
||||
|
||||
context "when clicking chat button" do
|
||||
before { find(".chat-user-card-btn").click }
|
||||
before { find(".chat-direct-message-btn").click }
|
||||
|
||||
it "opens correct channel" do
|
||||
# at this point the ChatChannel is not created yet
|
||||
|
Reference in New Issue
Block a user