From 8e319916136a6725b928f7a45f41c4bef4abf075 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 21 Jan 2025 23:44:28 +0100 Subject: [PATCH] DEV: Fix a warning in a chat spec (#30904) ``` Checking for expected text of nil is confusing and/or pointless since it will always match. Please specify a string or regexp instead. plugins/chat/spec/system/chat_message_interaction_spec.rb:51 ``` --- plugins/chat/spec/system/chat_message_interaction_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/chat/spec/system/chat_message_interaction_spec.rb b/plugins/chat/spec/system/chat_message_interaction_spec.rb index a39c8114a94..af95db73845 100644 --- a/plugins/chat/spec/system/chat_message_interaction_spec.rb +++ b/plugins/chat/spec/system/chat_message_interaction_spec.rb @@ -48,7 +48,10 @@ RSpec.describe "Interacting with a message", type: :system do DiscourseEvent.on(:chat_message_interaction, &blk) find(".block__button").click - try_until_success { expect(chat_channel_page.messages).to have_text(action_id) } + try_until_success do + expect(action_id).to_not be_nil + expect(chat_channel_page.messages).to have_text(action_id) + end ensure DiscourseEvent.off(:chat_message_interaction, &blk) end