mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
UX: do not show user tab preference when disabled (#23188)
Prior to this fix we would only check if the user is allowed to chat and not if chat is enabled.
This commit is contained in:
@ -16,6 +16,12 @@ RSpec.describe "User chat preferences", type: :system do
|
||||
sign_in(current_user)
|
||||
end
|
||||
|
||||
it "doesn’t show the tab" do
|
||||
visit("/u/#{current_user.username}/preferences")
|
||||
|
||||
expect(page).to have_no_css(".user-nav__preferences-chat", visible: :all)
|
||||
end
|
||||
|
||||
it "shows a not found page" do
|
||||
visit("/u/#{current_user.username}/preferences/chat")
|
||||
|
||||
|
Reference in New Issue
Block a user