Skip to content

Add Component-Level Tests for Heatmap Mouse Interactivity#8175

Open
soumyasekharshee265-ux wants to merge 2 commits into
JhaSourav07:mainfrom
soumyasekharshee265-ux:test/heatmap-mouse-interactivity
Open

Add Component-Level Tests for Heatmap Mouse Interactivity#8175
soumyasekharshee265-ux wants to merge 2 commits into
JhaSourav07:mainfrom
soumyasekharshee265-ux:test/heatmap-mouse-interactivity

Conversation

@soumyasekharshee265-ux

Copy link
Copy Markdown
Contributor

Description

Fixes #2557

This PR adds a new component-level test file:

components/dashboard/Heatmap.mouse-interactivity.test.tsx

The tests validate interactive tooltip behavior, cursor hover states, click/touch event propagation, and keyboard focus accessibility for the Heatmap component.

Specifically, this covers:

  • ✅ Simulated mouseenter events and verification of tooltip rendering with computed positioning.
  • ✅ Mouse leave behavior to ensure temporary tooltip overlays are properly removed.
  • ✅ Click and touch event propagation without runtime errors or unintended side effects.
  • ✅ Verification of interactive cursor styles (cursor-pointer, hover scale/brightness classes).
  • ✅ Keyboard accessibility (focus / blur) to ensure parity with mouse interactions.

These tests complement the existing utility-level tests by providing explicit component-level interaction coverage using JSX and React Testing Library.

All tests pass locally, formatting and linting checks succeed, and the contribution follows the Conventional Commits standard.


Pillar

  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A — This PR adds unit/component tests only and does not modify SVG rendering output.


Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally.
  • I have run npm run format and npm run lint locally and resolved all errors.
  • I have run npm run test and all tests pass locally.
  • I have run npm run test:coverage and branch coverage remains above 70%.
  • My commits follow the Conventional Commits format.
  • I have made sure that I have only one commit to merge in this PR.
  • I have started the repo.

@retenta-bot

retenta-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

This PR adds important tests for the Heatmap component's mouse interactivity, ensuring that tooltips and cursor behaviors function correctly. This aligns with our previous decision to enhance testing for interactive components, as seen in the CommitPulseSection tests. Thorough testing of user interactions is crucial for maintaining reliability in our UI components. Thank you for your contribution!

@retenta-bot retenta-bot Bot changed the title test(heatmap): add mouse interactivity component tests for tooltips, … Add Component-Level Tests for Heatmap Mouse Interactivity Jul 18, 2026
@github-actions

github-actions Bot commented Jul 18, 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 3975.85 KB 3975.85 KB 0 B
Total CSS 331.16 KB 331.16 KB 0 B

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant