DEV: correctly check for latest (#26603)

This was not testing the right path, and was still green most of the times because we were not waiting for channels to be preloaded in this case.
This commit is contained in:
Joffrey JAFFEUX 2024-04-11 14:23:07 +02:00 committed by GitHub
parent 4d045bfc61
commit af7d44971d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -152,9 +152,7 @@ RSpec.describe "Navigation", type: :system do
chat_page.open
chat_page.minimize_full_page
expect(page).to have_current_path(
chat.channel_path(category_channel.slug, category_channel.id),
)
expect(page).to have_current_path("/latest")
end
end

View File

@ -35,8 +35,9 @@ module PageObjects
find(".chat-header-icon").has_link?(href: href)
end
def open
def open(with_preloaded_channels: true)
visit("/chat")
has_finished_loading?(with_preloaded_channels: with_preloaded_channels)
end
def open_new_message(ensure_open: true)