webui: format uptime duration
This commit is contained in:
1 parent
8004ce86e1
commit
6acfa61ddb
2 files changed
+30
-1
No files matched your search
@@ -552,3 +552,15 @@ def test_embedded_webui_temp_config_uses_mobile_cards():
|
||||
assert "Weather Badge" in body
|
||||
assert "configrow tempConfigRow" not in body
|
||||
assert "Address:" not in body
|
||||
|
||||
|
||||
def test_embedded_webui_formats_uptime():
|
||||
source = firmware_source()
|
||||
|
||||
assert "function formatUptime(totalSeconds)" in source
|
||||
assert 'parts.push(days+"d")' in source
|
||||
assert 'parts.push(hours+"h")' in source
|
||||
assert 'parts.push(minutes+"m")' in source
|
||||
assert 'parts.push(seconds+"s")' in source
|
||||
assert 'formatUptime(s.uptime_seconds||0)' in source
|
||||
assert '+" sec"' not in source
|
||||
Reference in new issue
Block a user