mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 15:49:37 +08:00
FIX: ensures thread panel closes on escape (#29651)
`chatThreadPane.isOpened` was returning `false` when it should return `true` due to an incorrect matching on the route. Note that visiting a thread will focus the composer and the first escape will blur the input, only the second will close the panel.
This commit is contained in:
@ -28,6 +28,14 @@ RSpec.describe "Chat | composer | shortcuts | thread", type: :system do
|
||||
expect(side_panel_page).to have_open_thread
|
||||
end
|
||||
end
|
||||
|
||||
it "closes the thread panel" do
|
||||
chat_page.visit_thread(thread_1)
|
||||
thread_page.composer.cancel_shortcut # ensures we are not focused in the composer
|
||||
page.send_keys(:escape)
|
||||
|
||||
expect(side_panel_page).to have_no_open_thread
|
||||
end
|
||||
end
|
||||
|
||||
describe "ArrowUp" do
|
||||
|
Reference in New Issue
Block a user