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