From f933c9fcd9db968e1999382a7a81a0125d3229a2 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 13 Jul 2023 13:00:49 +0800 Subject: [PATCH] DEV: Rename method PageObjects::Pages::Chat (#22583) `has_right_header_href?` is a little verbose and `has_header_href?` has the same meaning. --- plugins/chat/spec/system/navigation_spec.rb | 2 +- plugins/chat/spec/system/page_objects/chat/chat.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/chat/spec/system/navigation_spec.rb b/plugins/chat/spec/system/navigation_spec.rb index 04b9d10c520..6fa84a9ba38 100644 --- a/plugins/chat/spec/system/navigation_spec.rb +++ b/plugins/chat/spec/system/navigation_spec.rb @@ -294,7 +294,7 @@ RSpec.describe "Navigation", type: :system do sidebar_page.open_channel(category_channel_2) find("#site-logo").click - expect(chat_page).to have_right_header_href(chat_channel_path) + expect(chat_page).to have_header_href(chat_channel_path) chat_page.open_from_header diff --git a/plugins/chat/spec/system/page_objects/chat/chat.rb b/plugins/chat/spec/system/page_objects/chat/chat.rb index ebd2d42f146..9c2289a1dc5 100644 --- a/plugins/chat/spec/system/page_objects/chat/chat.rb +++ b/plugins/chat/spec/system/page_objects/chat/chat.rb @@ -21,7 +21,7 @@ module PageObjects find(".chat-header-icon").click end - def has_right_header_href?(href) + def has_header_href?(href) find(".chat-header-icon").has_link?(href: href) end