test(api-notify-route): Add responsive tests for multi-device columns and mobile viewports#8102
Conversation
…bile viewport layouts
|
This PR adds essential tests to verify the responsiveness of the |
|
Hi maintainers! 👋 The CI failure here is unrelated to my PR. The TypeScript errors are pre-existing:
These same errors reproduce on a clean My PR only adds a new test file Could a maintainer confirm whether these type errors should be fixed in a separate PR? Happy to help if needed. |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod007
left a comment
There was a problem hiding this comment.
Great implementation of the responsive tests for the notify API route. Testing the JSON structural stability across viewports ensures mobile clients get reliable payloads. However, the Vercel check is failing. Please resolve the issues and rerun the CI pipeline.
|
Hi @Aamod007, thanks for the review! I checked the Checks tab and there's no Vercel check listed — all 5 checks that ran are passing and 1 is skipped. Could you share a screenshot or link to the failing Vercel check? It may not be triggering on PRs from forks. Thanks! |
Aamod007
left a comment
There was a problem hiding this comment.
Upon re-evaluation, I realized I previously misinterpreted the Vercel deployment failure as an issue with this PR. The Vercel build failure seems unrelated to the changes introduced here, so I will ignore it moving forward. The rest of the PR looks good, so I'm approving it!
|
🎉 Congratulations @soumyasekharshee265-ux! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Description
Fixes #6769
This PR adds a new isolated test file
app/api/notify/route.responsive-breakpoints.test.tsthat verifies the/api/notifyroute behaves consistently across responsive multi-device columns and mobile viewport layouts (~375px wide clients).The tests validate that:
All 6 new tests pass locally and no existing tests were affected.
Pillar
Visual Preview
Not applicable — this PR only adds a backend API test file. No UI or SVG changes.
Test run output:
✓ app/api/notify/route.responsive-breakpoints.test.ts (6 tests) 14ms
✓ /api/notify - responsive breakpoints & mobile viewport layouts (6)
✓ mobile (iPhone 375px) user-agent produces a JSON response with the same shape as desktop
✓ response payload keys reflow into standard vertical structure on mobile clients
✓ response does not include absolute-width values that would cause horizontal scroll on 375px viewports
✓ all HTTP methods scale down gracefully for mobile viewport requests
✓ mobile toggle states (notifyOnCommit/Streak/Milestone booleans) respond cleanly
✓ DELETE handler responds cleanly to mobile viewport request
Test Files 1 passed (1)
Tests 6 passed (6)
Checklist before requesting a review:
CONTRIBUTING.mdfile.npm run test -- app/api/notify/route.responsive-breakpoints.test.ts).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).npm run testand all tests related to this file pass locally (2 pre-existing failures inapp/api/streak/route.timezone-boundaries.test.tsare unrelated to this PR and also fail onmain).npm run test:coverageand branch coverage forapp/api/notify/route.tsimproves (new tests only add coverage — they never remove).test(api-notify-route): verify responsive multi-device columns and mobile viewport layouts).README.mdif I added a new theme or URL parameter. — N/A (no new theme or URL param).