Skip to content

A platform for community discussion. Free, open, simple.

DEV: more specific class to fix test race condition (#42658)

Kris00f91b5f7a78
diff --git a/plugins/chat/spec/system/keyboard_message_actions_spec.rb b/plugins/chat/spec/system/keyboard_message_actions_spec.rb
index dbfb482fb70..6ddead7af1f 100644
--- a/plugins/chat/spec/system/keyboard_message_actions_spec.rb
+++ b/plugins/chat/spec/system/keyboard_message_actions_spec.rb
@@ -103,9 +103,11 @@ RSpec.describe "Chat | keyboard access to message actions" do
expect(page).to have_css(
".chat-message-actions[role='toolbar'][aria-label='#{I18n.t("js.chat.message_actions")}']",
)
- expect(page).to have_css(".react-btn[title='#{I18n.t("js.chat.react")}']")
- expect(page).to have_css(".reply-btn[title='#{I18n.t("js.chat.reply")}']")
- expect(page).to have_css(".bookmark-btn[aria-label='#{I18n.t("js.chat.bookmark_message")}']")
+ expect(page).to have_css(".chat-message-actions .react-btn[title='#{I18n.t("js.chat.react")}']")
+ expect(page).to have_css(".chat-message-actions .reply-btn[title='#{I18n.t("js.chat.reply")}']")
+ expect(page).to have_css(
+ ".chat-message-actions .bookmark-btn[aria-label='#{I18n.t("js.chat.bookmark_message")}']",
+ )
expect(page).to have_css(
".more-buttons [aria-label='#{I18n.t("js.chat.more_message_actions")}']",
)
diff --git a/plugins/chat/spec/system/page_objects/chat/chat_channel.rb b/plugins/chat/spec/system/page_objects/chat/chat_channel.rb
index 237f664858b..65de54af478 100644
--- a/plugins/chat/spec/system/page_objects/chat/chat_channel.rb
+++ b/plugins/chat/spec/system/page_objects/chat/chat_channel.rb
@@ -124,7 +124,7 @@ module PageObjects
if emoji_name
message.find(".chat-message-actions [data-emoji-name=\"#{emoji_name}\"]").click
else
- message.find(".react-btn").click
+ message.find(".chat-message-react-btn").click
end
end