Skip to content

test(DashboardPage): verify all three StatsCards render with correct titles#774

Open
Tiya22gif wants to merge 1 commit into
JhaSourav07:mainfrom
Tiya22gif:test-dashboard-statscards
Open

test(DashboardPage): verify all three StatsCards render with correct titles#774
Tiya22gif wants to merge 1 commit into
JhaSourav07:mainfrom
Tiya22gif:test-dashboard-statscards

Conversation

@Tiya22gif
Copy link
Copy Markdown
Contributor

@Tiya22gif Tiya22gif commented May 27, 2026

▶ Description

Fixes #742

This PR improves test coverage for the DashboardPage by verifying that all three "StatsCard" components render correctly with the expected titles and values.

▶ Changes Made
Verified the following StatsCard text content:
● "Current Streak: 5"
● "Peak Streak: 15"
● "Contributions: 500"

Added a new assertion to ensure exactly three StatsCard components are rendered:
"ts id="kgduut"
expect(screen.getAllByTestId('stats-card')).toHaveLength(3);"

▶ Pillar
Testing / Quality Assurance

▶ Validation
Successfully ran the complete Vitest test suite locally.
"txt id='uw3jzu'
Test Files 27 passed (27)
Tests 353 passed (353)"
All existing tests continue to pass successfully.

▶ Why This Matters
This improves dashboard reliability by ensuring:
● all expected statistics render consistently
● the exact number of StatsCard components is validated
● future UI regressions can be caught automatically

▶ Checklist
[x] Added StatsCard count assertion
[x] Verified all required stat titles
[x] Followed existing testing conventions
[x] All tests passing
[x] No unrelated files modified

Screenshot 2026-05-27 230731 Screenshot 2026-05-27 230759

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

Someone is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

👋 Hey @Tiya22gif, welcome to CommitPulse! 🎉

Thanks for opening your first pull request — this is a big deal and we appreciate the effort!

While you wait for a review, please double-check:

  • ✅ You've read the CONTRIBUTING.md checklist
  • npm run lint, npm run format, and npm run test all pass locally
  • ✅ Your PR has a visual preview if it touches any SVG output
  • 💬 You've joined our Discord for faster PR feedback

A maintainer will review your PR shortly. Hang tight! 🚀

@github-actions github-actions Bot added the needs-details This PR is missing required description details. label May 27, 2026
@github-actions
Copy link
Copy Markdown

👋 Hey @Tiya22gif, it looks like you didn't use our PR template!

The section ## Description is missing from your PR description.

Please update your PR description to include all required sections so we can review this properly:

  • ## Description — What does this PR do? Which issue does it fix?
  • ## Pillar — Which contribution pillar does this fall under?
  • ## Checklist — Have you ticked off the quality checklist?

You can find the full template in CONTRIBUTING.md. Just edit your PR description and the needs-details label will be removed automatically. 🙌

@github-actions github-actions Bot added the type:testing Adding, updating, or fixing tests label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-details This PR is missing required description details. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(DashboardPage): verify all three StatsCards render with correct titles

1 participant