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:
David Battersby
2024-03-18 11:17:37 +08:00
committed by GitHub
parent 426c035b80
commit d5b944f1de
8 changed files with 90 additions and 15 deletions

View File

@ -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