Add hotel team invitations, assisted account recovery and onboarding
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user