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:
Joffrey JAFFEUX
2023-08-22 18:22:25 +02:00
committed by GitHub
parent b5b4a3f233
commit 0e00784218
3 changed files with 15 additions and 2 deletions

View File

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