Skip to content

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

DEV: Fix flaky admin site texts theme filter spec (#44085)

Gabriel Grubbabb36a20d04a3
diff --git a/spec/system/page_objects/pages/admin_site_texts.rb b/spec/system/page_objects/pages/admin_site_texts.rb
index 8ce88dbc043..ba0ea0a8af2 100644
--- a/spec/system/page_objects/pages/admin_site_texts.rb
+++ b/spec/system/page_objects/pages/admin_site_texts.rb
@@ -33,7 +33,9 @@ module PageObjects
selector = PageObjects::Components::SelectKit.new(".theme-search")
selector.expand
selector.select_row_by_value(theme.id)
- selector.collapse
+ # the combo-box closes itself on change; calling `collapse` here would
+ # re-open it via a header click that can land on the clear button
+ selector.has_selected_value?(theme.id)
end
def open_theme_filter