DEV: more resilient scroll to bottom spec (#21467)

The spec now checks we are in the state we expect to be before clicking bottom button. The bottom button could show while it's still loading and on slow systems cause failures.
This commit is contained in:
Joffrey JAFFEUX 2023-05-10 10:54:02 +02:00 committed by GitHub
parent 17603794b5
commit 7a84fc3d9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -62,7 +62,15 @@ RSpec.describe "Navigating to message", type: :system, js: true do
chat_page.visit_channel(channel_1)
click_link(link)
expect(page).to have_css(
".chat-message-container.highlighted[data-id='#{first_message.id}']",
)
click_button(class: "chat-scroll-to-bottom")
expect(page).to have_content(link)
click_link(link)
expect(page).to have_css(