mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FIX: correctly closes panels in threads (#31013)
The following case was bugged:
- visit a thread in full page chat
- click channel title
- click back button in channel navbar
- 💥 you would have a channel with limited width as if there was
still the thread showing next to it, but it was empty
This commit is contained in:
@ -139,6 +139,24 @@ RSpec.describe "Navigation", type: :system do
|
||||
end
|
||||
end
|
||||
|
||||
context "when opening channel settings from thread" do
|
||||
fab!(:thread) { Fabricate(:chat_thread, channel: category_channel, use_service: true) }
|
||||
|
||||
before do
|
||||
category_channel.update!(threading_enabled: true)
|
||||
Fabricate(:chat_message, thread: thread, use_service: true)
|
||||
thread.add(current_user)
|
||||
end
|
||||
|
||||
it "correctly closes the side panel" do
|
||||
chat_page.visit_thread(thread)
|
||||
|
||||
find(".c-navbar__channel-title").click
|
||||
|
||||
expect(page).to have_no_selector(".main-chat-outlet.has-side-panel-expanded")
|
||||
end
|
||||
end
|
||||
|
||||
context "when collapsing full page with no previous state" do
|
||||
it "redirects to home page" do
|
||||
chat_page.open
|
||||
|
Reference in New Issue
Block a user