You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(test): align e2e fixtures with PR-P G-01 register validation
CI failure root cause after edaf2bf:
PR-P G-01 (85ae293) hardened `/api/auth/register` Zod schema:
- password regex `(?=.*[a-zA-Z])(?=.*\d).{8,}` (must contain
a digit + a letter, ≥ 8 chars)
- birthYear clamped to `[CURRENT_YEAR-16, CURRENT_YEAR-6]` →
2010-2020 today
Most e2e fixtures still used:
- `"correct horse battery"` (8+ chars, letters, NO DIGIT)
- `birthYear: 2000` or `1985` (out of new clamp)
Both choices were perfectly fine before G-01 but are now hard-
rejected by the production-mirroring API. CI surfaced this as a
flood of `register foo: 400 {"error":"Hasło: min. 8 znaków, 1
litera i 1 cyfra."}` failures across smoke, security, golden-paths,
data-integrity, bot-protection, rate-limits, production-ready.
Fixed via batch sed across all 7 affected specs:
- "correct horse battery (staple|teacher)?" → "correct horse battery 1"
(adds the required digit; passphrase intent preserved)
- birthYear 2000 / 1985 → 2012 (within the 7-16 GDPR-K target band)
ux-fixes.spec.ts already used "demo-password-12345" (letter +
digit + length OK) and birthYear 2010 (at the lower edge of the
clamp) so it didn't regress.
These fixtures are not assertions about the API — they're just
the means to bootstrap a test user. The right discipline is
"tests use compliant data" rather than "API special-cases CI".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments