feat(demo): add demo manifest, Dutch demo entry, permanent badge and About page
Adds GET /api/v1/demo/manifest as a single source of truth for the demo's fictional org identity (Northstar Mobility -- surfacing the project's already-locked tenant name), synthetic-data/reset state, and live scenario readiness. Rewrites the login screen in Dutch with an honest, no-password demo entry and a guided-demo entry point, replaces the loud full-width demo banner with a subtle badge + popover, and adds a compact About page explaining what's real vs. synthetic vs. not yet connected.
This commit is contained in:
@@ -18,6 +18,21 @@ def test_operations_manager_can_reset_demo(ops_client):
|
||||
response = ops_client.post("/api/v1/demo/reset")
|
||||
assert response.status_code == 200
|
||||
assert response.json()["counts"]["vehicles"] == 50
|
||||
assert response.json()["anchor_date"]
|
||||
assert response.json()["seeded_at"]
|
||||
|
||||
|
||||
def test_reset_is_rejected_when_demo_allow_reset_is_disabled(ops_client, monkeypatch):
|
||||
import app.api.routers.demo as demo_router
|
||||
|
||||
monkeypatch.setattr(demo_router.settings, "demo_allow_reset", False)
|
||||
response = ops_client.post("/api/v1/demo/reset")
|
||||
assert response.status_code == 403
|
||||
|
||||
# Restore real demo data: this test intentionally disabled reset, so a following test
|
||||
# module must not inherit a database left mid-mutation by an earlier test.
|
||||
monkeypatch.setattr(demo_router.settings, "demo_allow_reset", True)
|
||||
assert ops_client.post("/api/v1/demo/reset").status_code == 200
|
||||
|
||||
|
||||
def test_session_endpoint_requires_authentication(client):
|
||||
|
||||
Reference in New Issue
Block a user