Add experimental UI backend (#15002)
* Add experimental UI * Add test * Lint
This commit is contained in:
1 parent
c5f012c85a
commit
00cbdffa12
2 files changed
+46
-4
No files matched your search
@@ -278,3 +278,22 @@ async def test_get_translations(hass, hass_ws_client):
|
||||
assert msg['type'] == wapi.TYPE_RESULT
|
||||
assert msg['success']
|
||||
assert msg['result'] == {'resources': {'lang': 'nl'}}
|
||||
|
||||
|
||||
async def test_experimental_ui(hass, hass_ws_client):
|
||||
"""Test experimental_ui command."""
|
||||
await async_setup_component(hass, 'frontend')
|
||||
client = await hass_ws_client(hass)
|
||||
|
||||
with patch('homeassistant.components.frontend.load_yaml',
|
||||
return_value={'hello': 'world'}):
|
||||
await client.send_json({
|
||||
'id': 5,
|
||||
'type': 'frontend/experimental_ui',
|
||||
})
|
||||
msg = await client.receive_json()
|
||||
|
||||
assert msg['id'] == 5
|
||||
assert msg['type'] == wapi.TYPE_RESULT
|
||||
assert msg['success']
|
||||
assert msg['result'] == {'hello': 'world'}
|
||||
Reference in new issue
Block a user