mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 13:31:44 +08:00
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:
parent
4d045bfc61
commit
af7d44971d
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user