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

Why this change?

This change ensures that we scroll to the top of the message when
hovering over a message to ensure that the message actions container
that appears on hover is not hidden in the chat drawer when the content
of the chat message is long.
This commit is contained in:
Alan Guo Xiang Tan 2023-07-06 09:03:42 +08:00 committed by GitHub
parent b764c53cc0
commit cb9ae1eb1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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)