Skip to content

Commit e475bb9

Browse files
authored
test(RadarChart): verify at least 3 axes are always shown via padding (JhaSourav07#1159)
## Description Fixes JhaSourav07#1073 ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs, testing) ## Visual Preview No visual changes (Pure UI chart component validation test coverage improvement). ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [x] I have tested these changes locally (`localhost:3000/api/streak?user=YOUR_USERNAME`). - [x] I have run the isolated file prettier formatter. - [x] My commits follow the Conventional Commits format (`test(RadarChart): ...`). - [x] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have starred the repo. - [x] I have made sure that i have only one commit to merge in this PR. - [x] The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts). - [x] (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.
2 parents f88df2b + a43754e commit e475bb9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

components/dashboard/RadarChart.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,16 @@ describe('RadarChart', () => {
6666
expect(screen.getAllByText('JavaScript')).toBeDefined();
6767
expect(screen.getAllByText('Python')).toBeDefined();
6868
});
69+
70+
it('verify at least 3 axes are always shown via padding when fewer are provided', () => {
71+
const singleLang = [{ name: 'TypeScript', percentage: 100, color: '#3178c6' }];
72+
73+
render(
74+
<RadarChart languagesA={singleLang} languagesB={singleLang} labelA="User A" labelB="User B" />
75+
);
76+
77+
expect(screen.getAllByText('TypeScript')).toBeDefined();
78+
expect(screen.getAllByText('JavaScript')).toBeDefined();
79+
expect(screen.getAllByText('Python')).toBeDefined();
80+
});
6981
});

0 commit comments

Comments
 (0)