Add an option to serve ES6 JS to clients (#10474)
* Add an option to serve ES6 JS to clients * Rename es6 to latest * Fixes * Serve JS vrsions from separate dirs * Revert websocket API change * Update frontend to 20171110.0 * websocket: move request to constructor
This commit is contained in:
parent
1c36e2f586
commit
5e92fa3404
10 changed files with 150 additions and 65 deletions
|
@ -290,7 +290,7 @@ def test_get_panels(hass, websocket_client):
|
|||
"""Test get_panels command."""
|
||||
yield from hass.components.frontend.async_register_built_in_panel(
|
||||
'map', 'Map', 'mdi:account-location')
|
||||
|
||||
hass.data[frontend.DATA_JS_VERSION] = 'es5'
|
||||
websocket_client.send_json({
|
||||
'id': 5,
|
||||
'type': wapi.TYPE_GET_PANELS,
|
||||
|
@ -300,8 +300,14 @@ def test_get_panels(hass, websocket_client):
|
|||
assert msg['id'] == 5
|
||||
assert msg['type'] == wapi.TYPE_RESULT
|
||||
assert msg['success']
|
||||
assert msg['result'] == {url: panel.as_dict() for url, panel
|
||||
in hass.data[frontend.DATA_PANELS].items()}
|
||||
assert msg['result'] == {'map': {
|
||||
'component_name': 'map',
|
||||
'url_path': 'map',
|
||||
'config': None,
|
||||
'url': None,
|
||||
'icon': 'mdi:account-location',
|
||||
'title': 'Map',
|
||||
}}
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue