S allius/issue397 (#405)
* add Dashboards log handler to all known loggers * add list of last 3 warnings/errors to page * add note list to page * create LogHandler for the dashboard - simple memory log handler which stores the last 64 warnings/errors for the dashboard * render warnings/errors as note list * add page for warnings and errors * fix double defined build target * add well done message if no errors in the logs * translate page titles * more translations * add Notes page and table for important messages * add unit tests
This commit is contained in:
@@ -68,6 +68,13 @@ async def test_rel_page(client):
|
||||
assert response.mimetype == 'text/html'
|
||||
web.build_relative_urls = False
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_notes(client):
|
||||
"""Test the notes page route."""
|
||||
response = await client.get('/notes')
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'text/html'
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_logging(client):
|
||||
"""Test the logging page route."""
|
||||
@@ -185,6 +192,15 @@ async def test_mqtt_fetch(client, create_inverter):
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_notes_fetch(client, config_conn):
|
||||
"""Test the notes-fetch route."""
|
||||
_ = create_inverter
|
||||
|
||||
response = await client.get('/notes-fetch')
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_file_fetch(client, config_conn):
|
||||
"""Test the data-fetch route."""
|
||||
|
||||
Reference in New Issue
Block a user