feat: Szenario per GUI löschen, Name System-Ist reserviert (A11-T1)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-28 19:01:21 +02:00
co-authored by Claude Opus 5.5
parent 1c452b48de
commit 57ab6dae4a
5 changed files with 64 additions and 0 deletions
+21
View File
@@ -483,3 +483,24 @@ def test_grafana_links_fallback_to_host_port_when_unset(client, monkeypatch):
assert "fb.example.de" not in r.text
finally:
get_settings.cache_clear()
def test_szenarien_seite_hat_loeschen_button(client, db):
client.post("/login", data={"username": "admin", "password": "geheim"})
sc = Scenario(name="Wegwerf", description="", include_recurring=True,
include_planned=True)
db.add(sc)
db.commit()
r = client.get("/szenarien")
assert f'hx-delete="/api/scenarios/{sc.id}"' in r.text
assert 'Szenario „Wegwerf" mit allen Einträgen wirklich löschen?' in r.text
def test_szenario_loeschen_roundtrip_gui(client, db):
client.post("/login", data={"username": "admin", "password": "geheim"})
sc = Scenario(name="Wegwerf-Roundtrip", description="", include_recurring=True,
include_planned=True)
db.add(sc)
db.commit()
assert client.delete(f"/api/scenarios/{sc.id}", headers=H).status_code == 204
assert "Wegwerf-Roundtrip" not in client.get("/szenarien").text