feat: Add tests for filter presets save/load/delete behavior in SearchFilterWidget

This commit is contained in:
William Valentin
2025-08-08 13:00:12 -07:00
parent 5354b963ac
commit b4a68c7c08
2 changed files with 117 additions and 0 deletions
+5
View File
@@ -43,6 +43,8 @@ class SearchFilterWidget:
self.is_visible = False
self._ui_initialized = False
self.frame = None
# May be created in _setup_ui; keep defined for headless/test usage
self.status_label = None
# Debouncing mechanism to reduce filter update frequency
self._update_timer = None
@@ -430,6 +432,9 @@ class SearchFilterWidget:
def _update_status(self) -> None:
"""Update filter status display."""
# If UI hasn't been set up yet (e.g., during headless tests), skip.
if not getattr(self, "status_label", None):
return
summary = self.data_filter.get_filter_summary()
if not summary["has_filters"]: