Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix (again) admin_customize_themes spec flake (#40641)

Jarek Radosz1261d55a0907
diff --git a/spec/system/admin_customize_themes_spec.rb b/spec/system/admin_customize_themes_spec.rb
index d91ba7ed3c0..76438ca851e 100644
--- a/spec/system/admin_customize_themes_spec.rb
+++ b/spec/system/admin_customize_themes_spec.rb
@@ -382,13 +382,13 @@ describe "Admin Customize Themes" do
visit("/")
expect(banner).to be_visible
- # Wait for the `/client_settings` subscription's first poll finish.
+ # Wait for the `/client_settings` subscription's first poll to finish.
try_until_success do
expect(
page.evaluate_script(
- "window.MessageBus.callbacks.find(c => c.channel === '/client_settings')?.last_id",
+ "window.MessageBus.callbacks.find((c) => c.channel === '/client_settings')?.last_id ?? -1",
),
- ).not_to eq(-1)
+ ).to be >= 0
end
using_session(:admin) do