23 lines
993 B
Python
23 lines
993 B
Python
from fastapi.testclient import TestClient
|
|
|
|
from app.main import app
|
|
|
|
|
|
def test_dashboard_is_served_at_root() -> None:
|
|
with TestClient(app) as client:
|
|
response = client.get("/")
|
|
|
|
assert response.status_code == 200
|
|
assert "SillyHome Next" in response.text
|
|
assert "So gehst du vor" in response.text
|
|
assert "Gerät zum Lernen auswählen" in response.text
|
|
assert "Wie gewohnt bedienen" in response.text
|
|
assert "Ohne deine spätere Freigabe wird nichts geschaltet" in response.text
|
|
assert "Du wählst keine Sensoren und erstellst keine Regeln" in response.text
|
|
assert "Freigabe noch gesperrt" in response.text
|
|
assert "Bediene das Licht dafür direkt über Home Assistant" in response.text
|
|
assert "Davon erkannte HA-Automationen" in response.text
|
|
assert 'record.behavior.status === "trained" && missingUserActions === 0' in response.text
|
|
assert "Automation-Entwurf" not in response.text
|
|
assert "Manuelle Overrides" not in response.text
|