test: add profile validation e2e tests and fix pre-existing failures

Add 7 new e2e tests verifying profile form validation in both manage
and admin UIs: invalid phone number, phone normalization, E.164 hint
attributes, and admin-side email/phone/picture URL validation errors.

Fix 3 pre-existing test failures:
- Replace invalid seeded phone number (+1234567890) with valid E.164
  (+12025551234) that was causing profile update tests to fail
- Update email validation error assertion to match actual pydantic
  message (value_error type uses raw message, not label-prefixed)
This commit is contained in:
Johan Lundberg 2026-03-16 10:00:46 +01:00
parent 752bf87b7c
commit 2dfa3f3bff
No known key found for this signature in database
GPG key ID: A6C152738D03C7D1
3 changed files with 97 additions and 8 deletions

View file

@ -87,7 +87,7 @@ async def seed() -> None:
family_name="Smith",
preferred_username="asmith",
email="alice@example.com",
phone_number="+1234567890",
phone_number="+12025551234",
picture="https://example.com/alice.jpg",
locale="en",
groups=["users"],