A platform for community discussion. Free, open, simple.
DEV: Skip flaky topic map spec on CI (#28159)
Martin Brennan78f8b7ba9988
diff --git a/plugins/chat/spec/system/navigation_spec.rb b/plugins/chat/spec/system/navigation_spec.rbindex 31b5630f260..312c7c2f029 100644--- a/plugins/chat/spec/system/navigation_spec.rb+++ b/plugins/chat/spec/system/navigation_spec.rb@@ -171,7 +171,7 @@ RSpec.describe "Navigation", type: :system docontext "when opening a thread from the thread list" doxit "goes back to the thread list when clicking the back button" do- skip("Flaky on CI") if ENV["CI"]+ skip_on_ci!visit("/chat")chat_page.visit_channel(category_channel)@@ -187,7 +187,7 @@ RSpec.describe "Navigation", type: :system docontext "for mobile" doit "goes back to the thread list when clicking the back button", mobile: true do- skip("Flaky on CI") if ENV["CI"]+ skip_on_ci!visit("/chat")chat_page.visit_channel(category_channel)@@ -207,7 +207,7 @@ RSpec.describe "Navigation", type: :system dobefore { Fabricate(:chat_message, thread: thread_2, use_service: true) }it "goes back to the thread list when clicking the back button", mobile: true do- skip("Flaky on CI") if ENV["CI"]+ skip_on_ci!chat_page.visit_channel(category_channel)channel_page.message_thread_indicator(thread.original_message).click@@ -227,7 +227,7 @@ RSpec.describe "Navigation", type: :system docontext "when opening a thread from indicator" doit "goes back to the thread list when clicking the back button" do- skip("Flaky on CI") if ENV["CI"]+ skip_on_ci!visit("/chat")chat_page.visit_channel(category_channel)@@ -242,7 +242,7 @@ RSpec.describe "Navigation", type: :system docontext "for mobile" doit "closes the thread and goes back to the channel when clicking the back button",mobile: true do- skip("Flaky on CI") if ENV["CI"]+ skip_on_ci!visit("/chat")chat_page.visit_channel(category_channel)diff --git a/plugins/chat/spec/system/uploads_spec.rb b/plugins/chat/spec/system/uploads_spec.rbindex a8736e6b9b7..8ccf3cc0690 100644--- a/plugins/chat/spec/system/uploads_spec.rb+++ b/plugins/chat/spec/system/uploads_spec.rb@@ -83,7 +83,7 @@ describe "Uploading files in chat messages", type: :system doendit "allows uploading multiple files" do- skip("This test is flaky on CI") if ENV["CI"]+ skip_on_ci!chat.visit_channel(channel_1)@@ -108,7 +108,7 @@ describe "Uploading files in chat messages", type: :system doendit "allows uploading a huge image file with preprocessing" do- skip("This test is flaky on CI") if ENV["CI"]+ skip_on_ci!SiteSetting.composer_media_optimization_image_bytes_optimization_threshold = 200.kilobyteschat.visit_channel(channel_1)diff --git a/spec/support/system_helpers.rb b/spec/support/system_helpers.rbindex 77f97740ee5..850862b7f71 100644--- a/spec/support/system_helpers.rb+++ b/spec/support/system_helpers.rb@@ -157,4 +157,8 @@ module SystemHelpers)endend++ def skip_on_ci!(message = "Flaky on CI")+ skip(message) if ENV["CI"]+ endenddiff --git a/spec/system/network_disconnected_spec.rb b/spec/system/network_disconnected_spec.rbindex aaeb883c894..a6454065dc1 100644--- a/spec/system/network_disconnected_spec.rb+++ b/spec/system/network_disconnected_spec.rb@@ -4,7 +4,7 @@ RSpec.describe "Network Disconnected", type: :system dolet(:cdp) { PageObjects::CDP.new }it "NetworkConnectivity service adds class to DOM and displays offline indicator" do- skip(<<~TEXT) if ENV["CI"]+ skip_on_ci!(<<~TEXT)In CI this test will randomly flake - timing issue with the offline indicatornot being rendered soon enough after network conditions changeTEXTdiff --git a/spec/system/private_message_map_spec.rb b/spec/system/private_message_map_spec.rbindex 876499e7913..f5fe76ea0eb 100644--- a/spec/system/private_message_map_spec.rb+++ b/spec/system/private_message_map_spec.rb@@ -39,6 +39,10 @@ describe "Topic Map - Private Message", type: :system doendit "updates the various topic stats, avatars" do+ skip_on_ci!(+ "This is flaky because it relies a lot on messagebus events and the counts don't always update in time",+ )+freeze_timesign_in(user)topic_page.visit_topic(topic)@@ -77,12 +81,11 @@ describe "Topic Map - Private Message", type: :system doexpect(expanded_avatars.length).to eq 7# views count- # TODO (martin) Investigate flakiness- # sign_in(other_user)- # topic_page.visit_topic(topic)- # try_until_success { expect(TopicViewItem.count).to eq(2) }- # page.refresh- # expect(topic_map.views_count).to eq(2)+ sign_in(other_user_1)+ topic_page.visit_topic(topic)+ try_until_success { expect(TopicViewItem.count).to eq(2) }+ page.refresh+ expect(topic_map.views_count).to eq(2)# likes countexpect(topic_map).to have_no_likes