Skip to content

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

DEV: Fix flaky chat drawer system test (#22452)

Alan Guo Xiang Tancb9ae1eb1f91
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 89c50c062ba..ee0f9afb769 100644
--- a/plugins/chat/spec/system/page_objects/chat/chat_channel.rb
+++ b/plugins/chat/spec/system/page_objects/chat/chat_channel.rb
@@ -77,7 +77,10 @@ module PageObjects
end
def hover_message(message)
- message_by_id(message.id).hover
+ message = message_by_id(message.id)
+ # Scroll to top of message so that the actions are not hidden
+ page.scroll_to(message, align: :top)
+ message.hover
end
def bookmark_message(message)