fix: resolve test pollution from freeze_saves and fix os_listener toggle
All checks were successful
Lint & Test / test (push) Successful in 27s
All checks were successful
Lint & Test / test (push) Successful in 27s
- Add unfreeze_saves() to base_store.py and call it in e2e cleanup. The backup restore flow calls freeze_saves() which sets a module-level flag that silently disables all store _save() calls. Without reset, this poisoned all subsequent persistence tests (9 failures). - Fix os_listener toggle to use toggle-switch/toggle-slider CSS classes instead of nonexistent switch/slider classes (was showing plain checkbox). - Add mandatory test run to CLAUDE.md pre-commit checks. All 341 tests now pass.
This commit is contained in:
@@ -46,6 +46,11 @@ def client(_test_client):
|
||||
|
||||
def _clear_stores():
|
||||
"""Remove all entities from all stores for test isolation."""
|
||||
# Reset the saves-frozen flag that freeze_saves() sets during restore flows.
|
||||
# Without this, subsequent tests can't persist data because _save() is a no-op.
|
||||
from wled_controller.storage.base_store import unfreeze_saves
|
||||
unfreeze_saves()
|
||||
|
||||
from wled_controller.api import dependencies as deps
|
||||
|
||||
store_clearers = [
|
||||
|
||||
Reference in New Issue
Block a user