webui: use partial status polling
This commit is contained in:
@@ -300,3 +300,14 @@ def test_status_endpoint_supports_field_selection_and_cache_headers():
|
||||
assert 'server.header("If-Modified-Since")' in source
|
||||
assert 'server.send(304)' in source
|
||||
assert 'server.collectHeaders(statusCacheHeaders, 2)' in source
|
||||
|
||||
|
||||
def test_embedded_webui_uses_partial_status_for_overview_polling():
|
||||
source = firmware_source()
|
||||
|
||||
assert 'const STATUS_FIELDS_OVERVIEW="battery,temps,relays,vehicle,network,alarms,system";' in source
|
||||
assert 'function statusUrl()' in source
|
||||
assert 'api("/status?fields="+STATUS_FIELDS_OVERVIEW)' in source
|
||||
assert 'fetch(statusUrl(),{cache:"no-store"})' in source
|
||||
assert 'function mergeStatus(previous,next)' in source
|
||||
assert 'api("/status?fields=config")' in source
|
||||
|
||||
Reference in New Issue
Block a user