feat(zones): rename tabs to zones across api, ui, and storage

Made-with: Cursor
This commit is contained in:
pi
2026-04-06 18:22:03 +12:00
parent d1ffb857c8
commit fd618d7714
35 changed files with 1347 additions and 1303 deletions

View File

@@ -3,7 +3,7 @@ import os
def test_profile():
"""Test Profile model CRUD operations.
Profile create() sets name, type, tabs (list of tab IDs), scenes, palette_id.
Profile create() sets name, type, zones (list of zone IDs), scenes, palette_id.
"""
# Clean up any existing test file (model uses db/profile.json from project root)
db_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "db")
@@ -24,20 +24,20 @@ def test_profile():
print(f"Read: {profile}")
assert profile is not None
assert profile["name"] == "test_profile"
assert "tabs" in profile
assert "zones" in profile
assert "palette_id" in profile
assert "type" in profile
print("\nTesting update profile")
update_data = {
"name": "updated_profile",
"tabs": ["tab1"],
"zones": ["tab1"],
}
result = profiles.update(profile_id, update_data)
assert result is True
updated = profiles.read(profile_id)
assert updated["name"] == "updated_profile"
assert "tab1" in updated["tabs"]
assert "tab1" in updated["zones"]
print("\nTesting list profiles")
profile_list = profiles.list()