mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: correctly open channel info (#20297)
A typo was preventing a click on channel title when in drawer mode to correctly open the channel info in full page. This commit fixes the typo and adds a test.
This commit is contained in:
parent
c767a38086
commit
714e903e81
@ -1,5 +1,5 @@
|
|||||||
{{#if @channel}}
|
{{#if @channel}}
|
||||||
{{#if @this.chatStateManager.isDrawerExpanded}}
|
{{#if this.chatStateManager.isDrawerExpanded}}
|
||||||
<LinkTo
|
<LinkTo
|
||||||
@route={{if
|
@route={{if
|
||||||
@channel.isDirectMessageChannel
|
@channel.isDirectMessageChannel
|
||||||
|
@ -10,6 +10,24 @@ RSpec.describe "Drawer", type: :system, js: true do
|
|||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "when on channel" do
|
||||||
|
fab!(:channel) { Fabricate(:chat_channel) }
|
||||||
|
fab!(:membership) do
|
||||||
|
Fabricate(:user_chat_channel_membership, user: current_user, chat_channel: channel)
|
||||||
|
end
|
||||||
|
|
||||||
|
context "when clicking channel title" do
|
||||||
|
it "opens channel info page" do
|
||||||
|
visit("/")
|
||||||
|
chat_page.open_from_header
|
||||||
|
drawer.open_channel(channel)
|
||||||
|
page.find(".chat-channel-title").click
|
||||||
|
|
||||||
|
expect(page).to have_current_path("/chat/c/#{channel.slug}/#{channel.id}/info/about")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context "when opening" do
|
context "when opening" do
|
||||||
it "uses stored size" do
|
it "uses stored size" do
|
||||||
visit("/") # we need to visit the page first to set the local storage
|
visit("/") # we need to visit the page first to set the local storage
|
||||||
|
Loading…
Reference in New Issue
Block a user