diff --git a/plugins/chat/spec/system/navigation_spec.rb b/plugins/chat/spec/system/navigation_spec.rb index 22104c3a79b..17458ac4e50 100644 --- a/plugins/chat/spec/system/navigation_spec.rb +++ b/plugins/chat/spec/system/navigation_spec.rb @@ -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 diff --git a/plugins/chat/spec/system/page_objects/chat/chat.rb b/plugins/chat/spec/system/page_objects/chat/chat.rb index b42019daab6..ffab14c1575 100644 --- a/plugins/chat/spec/system/page_objects/chat/chat.rb +++ b/plugins/chat/spec/system/page_objects/chat/chat.rb @@ -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)