Skip to content

Commit 0d4d1d4

Browse files
authored
test(LandingPage): verify 3 FeatureCards render with correct titles (JhaSourav07#767)
## Description Fixes JhaSourav07#712 ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs) ## Visual Preview N/A — test-only change, no visual output. ## 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 `npm run format` and `npm run lint` locally and resolved all errors (CI will fail otherwise). - [x] My commits follow the Conventional Commits format (e.g., `feat(themes): ...`, `fix(calculate): ...`). - [ ] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have started the repo. - [x] I have made sure that i have only one commit to merge in this PR. - [ ] 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 a439dd3 + dba71d3 commit 0d4d1d4

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

app/page.test.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,15 @@ describe('LandingPage', () => {
210210
expect(navigator.clipboard.writeText).not.toHaveBeenCalled();
211211
});
212212

213-
it('renders the FeatureCards', () => {
213+
it('renders exactly 3 FeatureCards with correct titles', () => {
214214
render(<LandingPage />);
215-
expect(screen.getByText('Real-time Sync')).toBeDefined();
216-
expect(screen.getByText('Theme Engine')).toBeDefined();
217-
expect(screen.getByText('Isometric Math')).toBeDefined();
215+
216+
const featureHeadings = screen.getAllByRole('heading', { level: 3 });
217+
218+
expect(featureHeadings).toHaveLength(3);
219+
220+
const titles = featureHeadings.map((h) => h.textContent);
221+
expect(titles).toEqual(['Real-time Sync', 'Theme Engine', 'Isometric Math']);
218222
});
219223

220224
it('renders the CustomizeCTA', () => {

0 commit comments

Comments
 (0)