Add responsive breakpoint tests and fix type validation errors#8079
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new responsive-breakpoint-focused test suite for DescriptionSection to validate mobile viewport expectations, and updates existing type-compiler tests to reflect current component/type shapes.
Changes:
- Added
DescriptionSection.responsive-breakpoints.test.tsxwith 5 responsive/mobile-oriented test cases. - Updated
PreviewPaneltype-compiler test expectations to include optionalhasContent. - Updated
GeneratorStatetype-compiler test expectations (viaEditorPanel.type-compiler.test.tsx) to include optional articles-related fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| app/generator/components/sections/DescriptionSection.responsive-breakpoints.test.tsx | Adds responsive/mobile-oriented assertions for DescriptionSection. |
| app/generator/components/PreviewPanel.type-compiler.test.tsx | Aligns prop-type expectations with PreviewPanelProps (adds hasContent?). |
| app/generator/components/EditorPanel.type-compiler.test.tsx | Aligns GeneratorState type expectations with optional articles fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const { container } = render(<DescriptionSection value="Test" onChange={vi.fn()} />); | ||
| expect(container).toBeDefined(); | ||
| }); |
| const sectionContainer = container.querySelector('#description-section'); | ||
| expect(sectionContainer).toBeDefined(); | ||
|
|
||
| expect(sectionContainer?.tagName).toBe('DIV'); |
| expect(textArea.className).not.toMatch(/w-\[[4-9]\d{2}px\]/); | ||
| expect(textArea.className).not.toMatch(/w-\d{2,}(px|rem)/); | ||
|
|
||
| expect(textArea.className).toContain('w-full'); | ||
| }); |
| expect(textArea.className).toContain('w-full'); | ||
| }); | ||
|
|
||
| it('checks that navigation components scale down gracefully', () => { |
…one boundary tests
📦 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.
Excellent work adding responsive breakpoint tests for DescriptionSection and fixing the type validation errors across the EditorPanel and PreviewPanel. However, the Vercel deployment check is failing. Please resolve the issues and rerun the CI pipeline.
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 @TanCodeX! 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
Adds isolated responsive layout tests for
DescriptionSectioncovering mobile viewport behavior and responsive breakpoint handling.Changes
Created
app/generator/components/sections/DescriptionSection.responsive-breakpoints.test.tsxAdded 5 test cases covering:
Fixes #6937
Pillar
Visual Preview
N/A (test-only changes)
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.