A platform for community discussion. Free, open, simple.
DEV: Remove redundant code and fix page object selectors (#37703)
Sam2a3e6d9865f4
diff --git a/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js b/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.jsindex e90758ada87..b6a0f05a749 100644--- a/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js+++ b/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js@@ -138,9 +138,7 @@ export default class ChatemojiReactions {get canReply() {return (- this.canInteractWithMessage &&- this.context !== MESSAGE_CONTEXT_THREAD &&- this.message?.channel?.isFollowing+ this.canInteractWithMessage && this.context !== MESSAGE_CONTEXT_THREAD);}diff --git a/plugins/chat/spec/system/page_objects/chat/components/messages.rb b/plugins/chat/spec/system/page_objects/chat/components/messages.rbindex 129c623dcf6..c98b91ef541 100644--- a/plugins/chat/spec/system/page_objects/chat/components/messages.rb+++ b/plugins/chat/spec/system/page_objects/chat/components/messages.rb@@ -67,7 +67,7 @@ module PageObjectsenddef has_actions_container?(message)- page.has_css?("#{ACTIONS_SELECTOR}")+ page.has_css?("#{ACTIONS_SELECTOR}[data-id='#{message.id}']")enddef expand(**args)@@ -111,19 +111,19 @@ module PageObjectsenddef has_reply_btn?(message)- page.has_css?("#{ACTIONS_SELECTOR} .reply-btn")+ page.has_css?("#{ACTIONS_SELECTOR}[data-id='#{message.id}'] .reply-btn")enddef has_no_reply_btn?(message)- page.has_no_css?("#{ACTIONS_SELECTOR} .reply-btn")+ page.has_no_css?("#{ACTIONS_SELECTOR}[data-id='#{message.id}'] .reply-btn")enddef has_reaction_buttons?(message)- page.has_css?("#{ACTIONS_SELECTOR} .react-btn")+ page.has_css?("#{ACTIONS_SELECTOR}[data-id='#{message.id}'] .react-btn")enddef has_no_reaction_buttons?(message)- page.has_no_css?("#{ACTIONS_SELECTOR} .react-btn")+ page.has_no_css?("#{ACTIONS_SELECTOR}[data-id='#{message.id}'] .react-btn")endprivate