mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 22:47:46 +08:00
DEV: fix flaky chat new message spec (#30731)
Ensures that visiting the route creates a new chat channel before checking the new redirected url is using the last channel.
This commit is contained in:
@ -28,6 +28,7 @@ RSpec.describe "Chat New Message from params", type: :system do
|
||||
it "creates a dm channel and redirects if none exists" do
|
||||
chat_page.visit_new_message(user_2)
|
||||
|
||||
expect(page).to have_css(".chat-channel-name__label", text: user_2.username)
|
||||
expect(page).to have_current_path("/chat/c/#{user_2.username}/#{Chat::Channel.last.id}")
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user