Repository navigation
Conversation
Centralize shared API constraints, add dispute filing E2E coverage, run Playwright across Chromium, Firefox, and WebKit, and include app code in Jest coverage. Closes CodeGirlsInc#1325 Closes CodeGirlsInc#1326 Closes CodeGirlsInc#1327 Closes CodeGirlsInc#1328
|
@khalyaro is attempting to deploy a commit to the Mftee's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@khalyaro Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
- register-auth.dto.ts / lib/schemas/auth.ts: keep contract-driven minLength (this PR's design) combined with main's password complexity rules and translated message keys (from CodeGirlsInc#1415) rather than either side alone. - Bumped the stale api-contracts.json register.password.minLength (6->8) and fullName.minLength (1->2) to match the password policy already merged in CodeGirlsInc#1415, and re-ran contracts/sync.mjs to propagate to both copies. - Kept app/schemas/register.schema.ts and e2e/dialog.spec.ts, which this PR deleted for reasons unrelated to its own scope (predates CodeGirlsInc#1415's RegisterForm.tsx, which still imports the former; the latter's coverage isn't replaced elsewhere in this PR).
mftee
left a comment
There was a problem hiding this comment.
Reviewed. Centralizing shared API constraints (email format, password/fullName min-length, dispute description length, upload MIME/size limits) into a single contracts/api-contracts.json synced to both backend and frontend closes a real drift-prevention gap — this is exactly the kind of value that's easy to skip and expensive later. The new dispute-filing E2E coverage and running Playwright across Chromium/Firefox/WebKit widens real-browser coverage instead of just Chromium. Including app-level code and colocated tests in Jest coverage gives an honest coverage number instead of one inflated by only counting unit-testable modules.
This PR conflicted with #1415 in three places, all resolved:
- register-auth.dto.ts / lib/schemas/auth.ts: combined this PR's contract-driven minLength with #1415's password complexity rules (uppercase/lowercase/number/special) and its translated message keys — neither side alone was complete, and picking one would have either dropped complexity validation or left an unlocalized message key.
- Found the underlying contract JSON was stale (password minLength still 6, fullName still 1) relative to the password policy #1415 already shipped (8 chars + complexity, "at least 2 characters" for fullName) — bumped both in the canonical contracts/api-contracts.json and re-ran contracts/sync.mjs to propagate to the backend/frontend copies, so the "shared source of truth" this PR introduces actually reflects the real policy instead of undermining it.
- This PR deleted frontend/app/schemas/register.schema.ts and frontend/e2e/dialog.spec.ts for reasons predating #1415 (which added a RegisterForm.tsx that still imports the former) and with no replacement for the latter's coverage — kept both rather than let the merge silently break the build and drop test coverage.
Approving.
Summary
Issues
Validation
Closes #1325
Closes #1326
Closes #1327
Closes #1328