A platform for community discussion. Free, open, simple.
DEV: Restore and fix chat thread indicator specs (#39623)
Jarek Radoszf029c05c087f
diff --git a/plugins/chat/spec/system/message_thread_indicator_spec.rb b/plugins/chat/spec/system/message_thread_indicator_spec.rbindex 0d9de38cb67..0ff7008b0d6 100644--- a/plugins/chat/spec/system/message_thread_indicator_spec.rb+++ b/plugins/chat/spec/system/message_thread_indicator_spec.rb@@ -89,7 +89,7 @@ describe "Thread indicator for chat messages" doexpect(page).not_to have_css(channel_page.message_by_id_selector(new_thread.replies.first))end- xit "increments the indicator when a new reply is sent in the thread" do+ it "increments the indicator when a new reply is sent in the thread" dochat_page.visit_channel(channel)expect(channel_page.message_thread_indicator(thread_1.original_message)).to have_reply_count(diff --git a/plugins/chat/spec/system/page_objects/chat_drawer/chat_drawer.rb b/plugins/chat/spec/system/page_objects/chat_drawer/chat_drawer.rbindex a2e74511ff6..b2bd47ae1e1 100644--- a/plugins/chat/spec/system/page_objects/chat_drawer/chat_drawer.rb+++ b/plugins/chat/spec/system/page_objects/chat_drawer/chat_drawer.rb@@ -97,11 +97,11 @@ module PageObjectsenddef has_unread_user_threads?- has_css?(".chat-channel-row.--threads .c-unread-indicator")+ has_css?("#c-footer-threads .c-unread-indicator")enddef has_no_unread_user_threads?- has_no_css?(".chat-channel-row.--threads .c-unread-indicator")+ has_no_css?("#c-footer-threads .c-unread-indicator")enddef click_channelsdiff --git a/plugins/chat/spec/system/page_objects/sidebar/chat_sidebar.rb b/plugins/chat/spec/system/page_objects/sidebar/chat_sidebar.rbindex 1ef03d2e2a5..8fbd7a7b690 100644--- a/plugins/chat/spec/system/page_objects/sidebar/chat_sidebar.rb+++ b/plugins/chat/spec/system/page_objects/sidebar/chat_sidebar.rb@@ -101,13 +101,13 @@ module PageObjectsdef has_unread_user_threads?has_css?(- ".sidebar-section-link[data-link-name='user-threads'] .sidebar-section-link-content-badge.icon.unread",+ ".sidebar-section-link[data-link-name='user-threads'] .sidebar-section-link-suffix.icon.unread",)enddef has_no_unread_user_threads?has_no_css?(- ".sidebar-section-link[data-link-name='user-threads'] .sidebar-section-link-content-badge.icon.unread",+ ".sidebar-section-link[data-link-name='user-threads'] .sidebar-section-link-suffix.icon.unread",)enddiff --git a/plugins/chat/spec/system/user_threads_spec.rb b/plugins/chat/spec/system/user_threads_spec.rbindex d52be53c274..c9cab8def7a 100644--- a/plugins/chat/spec/system/user_threads_spec.rb+++ b/plugins/chat/spec/system/user_threads_spec.rb@@ -42,9 +42,15 @@ RSpec.describe "User threads" docontext "when user has unreads" dobefore dochat_thread_chain_bootstrap(channel: channel_1, users: [current_user, Fabricate(:user)])+ Fabricate(+ :chat_message,+ thread: channel_1.threads.last,+ user: Fabricate(:user),+ use_service: true,+ )end- xit "has an unread indicator" do+ it "has an unread indicator" dovisit("/")expect(sidebar_page).to have_unread_user_threads@@ -160,9 +166,15 @@ RSpec.describe "User threads" docontext "when user has unreads" dobefore dochat_thread_chain_bootstrap(channel: channel_1, users: [current_user, Fabricate(:user)])+ Fabricate(+ :chat_message,+ thread: channel_1.threads.last,+ user: Fabricate(:user),+ use_service: true,+ )end- xit "has an unread indicator" do+ it "has an unread indicator" dovisit("/")chat_page.open_from_header