From bd7a10d7058011ccb9e9b3d1af77c4a2c333c18d Mon Sep 17 00:00:00 2001 From: Mark VanLandingham Date: Mon, 14 Aug 2023 12:24:16 -0500 Subject: [PATCH] DEV: Skip flakey network disconnected spec (#23087) --- spec/system/network_disconnected_spec.rb | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/spec/system/network_disconnected_spec.rb b/spec/system/network_disconnected_spec.rb index 288babbcbd0..7e3dd0f7041 100644 --- a/spec/system/network_disconnected_spec.rb +++ b/spec/system/network_disconnected_spec.rb @@ -11,19 +11,24 @@ RSpec.describe "Network Disconnected", type: :system do end it "NetworkConnectivity service adds class to DOM and displays offline indicator" do - SiteSetting.enable_offline_indicator = true + skip(<<~TEXT) + # In CI this test will randomly flake - timing issue with the offline indicator + # not being rendered soon enough after network conditions change - visit("/c") + SiteSetting.enable_offline_indicator = true - expect(page).to have_no_css("html.network-disconnected") - expect(page).to have_no_css(".offline-indicator") + visit("/c") - with_network_disconnected do - # Message bus connectivity services adds the disconnected class to the DOM - expect(page).to have_css("html.network-disconnected") + expect(page).to have_no_css("html.network-disconnected") + expect(page).to have_no_css(".offline-indicator") - # Offline indicator is rendered - expect(page).to have_css(".offline-indicator") - end + with_network_disconnected doskip(<<~TEXT) + # Message bus connectivity services adds the disconnected class to the DOM + expect(page).to have_css("html.network-disconnected") + + # Offline indicator is rendered + expect(page).to have_css(".offline-indicator") + end + TEXT end end