From 0b3663a16aed6aa03ad0282f22fe2e0360d5e811 Mon Sep 17 00:00:00 2001 From: David Battersby Date: Mon, 13 Jan 2025 13:01:08 +0400 Subject: [PATCH] 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. --- plugins/chat/spec/system/chat_new_message_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/chat/spec/system/chat_new_message_spec.rb b/plugins/chat/spec/system/chat_new_message_spec.rb index 2a5f4fb7fbb..02f4673da77 100644 --- a/plugins/chat/spec/system/chat_new_message_spec.rb +++ b/plugins/chat/spec/system/chat_new_message_spec.rb @@ -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