From 6e95c1af3f8fb8f52e1830d2e346f046cd50c891 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 14 Jul 2023 11:01:35 +0200 Subject: [PATCH] FIX: incorrect selector in system specs (#22615) This could lead to flakey specs, and was invalid anyways. --- plugins/chat/spec/system/page_objects/chat/chat.rb | 2 +- plugins/chat/spec/system/react_to_message_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/chat/spec/system/page_objects/chat/chat.rb b/plugins/chat/spec/system/page_objects/chat/chat.rb index fe58d03c73a..f917f8401a6 100644 --- a/plugins/chat/spec/system/page_objects/chat/chat.rb +++ b/plugins/chat/spec/system/page_objects/chat/chat.rb @@ -81,7 +81,7 @@ module PageObjects end def has_message?(message) - container = find(".chat-message-container[data-id=\"#{message.id}\"") + container = find(".chat-message-container[data-id=\"#{message.id}\"]") container.has_content?(message.message) container.has_content?(message.user.username) end diff --git a/plugins/chat/spec/system/react_to_message_spec.rb b/plugins/chat/spec/system/react_to_message_spec.rb index 76f11fe36bc..76b0de60495 100644 --- a/plugins/chat/spec/system/react_to_message_spec.rb +++ b/plugins/chat/spec/system/react_to_message_spec.rb @@ -130,7 +130,7 @@ RSpec.describe "React to message", type: :system do sign_in(current_user) chat.visit_channel(category_channel_1) channel.hover_message(message_1) - find(".chat-message-actions [data-emoji-name=\"+1\"").click + find(".chat-message-actions [data-emoji-name=\"+1\"]").click expect(channel.message_reactions_list(message_1)).to have_css( "[data-emoji-name=\"+1\"]",