Add hotel team invitations, assisted account recovery and onboarding

This commit is contained in:
wolf-demon
2026-09-15 17:08:13 +01:00
parent 5a93c35b18
commit 7fcf51c900
14 changed files with 377 additions and 18 deletions
+9 -1
View File
@@ -52,11 +52,19 @@ assert "securityKey" not in payment_status
request("/api/payments/controls", "PUT", {"version": 0, "enabled": True}, expected=400)
assert request("/api/payments/requests") == []
hotel = request("/api/hotel")
assert "root" in request("/account"), "Container must serve account link page"
assert len(request("/api/onboarding")["steps"]) == 5
team = request("/api/team")
assert all("passwordHash" not in member and "securityStamp" not in member and "accountLinkHash" not in member for member in team)
if "--read" in sys.argv:
assert hotel["signature"] == "Persisted across container restart"
invited = next(member for member in team if member["email"] == "ci-staff@example.invalid")
assert invited["pending"] and not invited["active"] and invited["linkPurpose"] == "Invite"
else:
hotel["signature"] = "Persisted across container restart"
request("/api/hotel", "PUT", hotel)
invite = request("/api/team/invite", "POST", {"name": "CI Staff", "email": "ci-staff@example.invalid"})
assert invite["link"].startswith("https://sandbox-guestops.futuresens.co.uk/account#token=")
request("/api/auth/logout", "POST")
request("/api/hotel", expected=401)
print("Production smoke checks passed: built UI, secure cookies, owner login, MongoDB settings and logout.")
print("Production smoke checks passed: built UI, secure cookies, owner login, persisted settings and staff invitation, onboarding and logout.")