1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Allow managing Lovelace storage dashboards (#32241)

* Allow managing Lovelace storage dashboards

* Make sure we do not allow duplicate url paths

* Allow setting sidebar to None

* Fix tests

* Delete storage file on delete

* List all dashboards
This commit is contained in:
Paulus Schoutsen
2020-02-28 12:43:17 -08:00
committed by GitHub
parent ede39454a2
commit deda2f86e7
11 changed files with 447 additions and 90 deletions

View File

@@ -133,7 +133,11 @@ async def test_yaml_collection():
"mock-3",
{"id": "mock-3", "name": "Mock 3"},
)
assert changes[4] == (collection.CHANGE_REMOVED, "mock-2", None,)
assert changes[4] == (
collection.CHANGE_REMOVED,
"mock-2",
{"id": "mock-2", "name": "Mock 2"},
)
async def test_yaml_collection_skipping_duplicate_ids():
@@ -370,4 +374,12 @@ async def test_storage_collection_websocket(hass, hass_ws_client):
assert response["success"]
assert len(changes) == 3
assert changes[2] == (collection.CHANGE_REMOVED, "initial_name", None)
assert changes[2] == (
collection.CHANGE_REMOVED,
"initial_name",
{
"id": "initial_name",
"immutable_string": "no-changes",
"name": "Updated name",
},
)