Skip to content

test: verify Interactive Tooltips, Cursor Hovers & Touch Event Propagation (Variation 5) #7086#7406

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
BikramMondal5:fix-issue-#7086
Jul 4, 2026
Merged

test: verify Interactive Tooltips, Cursor Hovers & Touch Event Propagation (Variation 5) #7086#7406
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
BikramMondal5:fix-issue-#7086

Conversation

@BikramMondal5

Copy link
Copy Markdown
Contributor

Description

Fixes #7086

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs, testing)

Visual Preview

NA (this PR adds unit and integration test coverage for TopMetricsRow).

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (via npx vitest run components/dashboard/PRInsights/TopMetricsRow.mouse-interactivity.test.tsx).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., test(PRInsights): add mouse interactivity tests for TopMetricsRow).
  • I have updated README.md if I added a new theme or URL parameter. (Not applicable)
  • I have starred the repo.
  • 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). (Not applicable)
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

Copilot AI review requested due to automatic review settings July 4, 2026 14:48
@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated Vitest + Testing Library suite to validate hover-driven visual states and basic pointer/touch event bubbling for the TopMetricsRow dashboard component, aligning with the goal of increasing isolated UI interactivity coverage.

Changes:

  • Introduces TopMetricsRow.mouse-interactivity.test.tsx with 5 interaction-focused test cases.
  • Mocks framer-motion to map hover callbacks onto standard DOM mouse events and to surface whileHover configuration for assertions.
  • Verifies hover class transitions, hover-only glow overlays, mouseleave cleanup, and click/touch propagation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +60
// Get the first card (Total PRs)
const card = screen.getByText('Total PRs').closest('div')?.parentElement;
expect(card).toBeInTheDocument();
Comment on lines +78 to +80
// Find the card container
const card = screen.getByText('Total PRs').closest('div')?.parentElement;
expect(card).toBeInTheDocument();
Comment on lines +100 to +103

const card = screen.getByText('Total PRs').closest('div')?.parentElement;
expect(card).toBeInTheDocument();

Comment on lines +121 to +124

const card = screen.getByText('Total PRs').closest('div')?.parentElement;
expect(card).toBeInTheDocument();

Comment on lines +141 to +162
const { container } = render(
<div onClick={clickSpy} onTouchStart={clickSpy}>
<TopMetricsRow data={mockData} />
</div>
);

const firstCardTitle = screen.getByText('Total PRs');
const firstCardValue = screen.getByText('120');

// Simulate click on title element and check propagation
fireEvent.click(firstCardTitle);
expect(clickSpy).toHaveBeenCalledTimes(1);

// Simulate touchStart on value element and check propagation
fireEvent.touchStart(firstCardValue);
expect(clickSpy).toHaveBeenCalledTimes(2);

// Click SVG icon inside metric card to check propagation
const icon = container.querySelector('svg');
expect(icon).toBeInTheDocument();
fireEvent.click(icon!);
expect(clickSpy).toHaveBeenCalledTimes(3);
Comment on lines +55 to +57
it('triggers hover state (mouseenter) on a metric card and updates transition classes', () => {
render(<TopMetricsRow data={mockData} />);

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

✨ No significant bundle size changes detected.

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3883.44 KB 3883.44 KB 0 B
Total CSS 323.09 KB 323.09 KB 0 B

@github-actions github-actions Bot added the type:testing Adding, updating, or fixing tests label Jul 4, 2026
@Aamod007 Aamod007 added mentor:Aamod007 level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jul 4, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks for adding these interactive tooltip and hover tests. Ensuring that mouse and touch events propagate properly via Vitest is a great way to guarantee our UI behaves perfectly on all devices.

I'm assigning level:beginner, type:testing, and quality:clean.

Looks good to me, so I'm approving!

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jul 4, 2026
@JhaSourav07 JhaSourav07 merged commit 3dc2ddc into JhaSourav07:main Jul 4, 2026
8 of 9 checks passed
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🎉 Congratulations @BikramMondal5! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jul 4, 2026
@BikramMondal5

Copy link
Copy Markdown
Contributor Author

Thanks for the approval and merged! Happy to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(TopMetricsRow-mouse-interactivity): verify Interactive Tooltips, Cursor Hovers & Touch Event Propagation (Variation 5)

4 participants