Skip to content

test(ThemeSwitch-mouse-interactivity): verify Interactive Tooltips, Cursor Hovers & Touch Event Propagation (Variation 5) #2837#3636

Open
alishaalmeida10 wants to merge 2 commits into
JhaSourav07:mainfrom
alishaalmeida10:fix-loading-mouse-interactivity
Open

test(ThemeSwitch-mouse-interactivity): verify Interactive Tooltips, Cursor Hovers & Touch Event Propagation (Variation 5) #2837#3636
alishaalmeida10 wants to merge 2 commits into
JhaSourav07:mainfrom
alishaalmeida10:fix-loading-mouse-interactivity

Conversation

@alishaalmeida10
Copy link
Copy Markdown
Contributor

@alishaalmeida10 alishaalmeida10 commented Jun 4, 2026

Description

Fixes #2837

This PR introduces a robust suite of 5 target unit tests for the ThemeSwitch interaction layout to ensure precise mouse tracking, pointer state validation, and custom touch event propagation.

What was done:

  • Deleted the mismatched loading layout placeholder test to maintain repository structure integrity.
  • Built 5 isolated assertions under native Vitest parameters targeting interactive cursor boundaries.
  • Simulates custom mouseenter and mousemove actions to validate real-time coordinate tooltip rendering.
  • Asserts appropriate cursor style class transformations (cursor-pointer) trigger on active hover fields.
  • Evaluates mobile touch interaction robustness using explicit synthetic touchStart and touchEnd events.
  • Guarantees clean state teardowns on component mouseleave resets.

Pillar

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

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings/linter errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Visual Preview

All 5 required interaction states, computed coordinate calculations, and element touch sweeps compile cleanly and pass local environments seamlessly.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 4, 2026

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

A member of the Team first needs to authorize it.

Aamod007
Aamod007 previously approved these changes Jun 4, 2026
@Aamod007 Aamod007 added gssoc26 GSSoC 2026 mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. level:beginner Small changes Usually isolated fixes or simple UI/text updates. type:testing Adding, updating, or fixing tests testing labels Jun 4, 2026
@Aamod007 Aamod007 dismissed their stale review June 4, 2026 07:43

Dismissing to re-review

@alishaalmeida10 alishaalmeida10 changed the title test(contributors): implement loading mouse interactivity unit tests #2837 test(ThemeSwitch-mouse-interactivity): verify Interactive Tooltips, Cursor Hovers & Touch Event Propagation (Variation 5) #2837 Jun 4, 2026
Copy link
Copy Markdown
Collaborator

@Aamod007 Aamod007 left a comment

Choose a reason for hiding this comment

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

Hi there! 👋 Thanks for your PR. Similar to another recent test PR, I noticed that heme-switch.mouse-interactivity.test.tsx creates and tests a mock component (MockThemeSwitch) directly inside the test file instead of importing the actual ThemeSwitch component from the application.

To ensure we're properly verifying the application's actual behavior, could you update the test to import and test the real component instead of the mock? Let me know if you need any pointers on how to do this!

@Aamod007 Aamod007 added the status:blocked This PR is blocked due to a failing CI check. label Jun 4, 2026
@alishaalmeida10
Copy link
Copy Markdown
Contributor Author

Hi @Aamod007, thanks for the feedback.. That makes total sense, of testing actual components than using mocks. I'm swapping them out right now for both files and I'll update the PRs as soon as they're ready. Will let you know if I get stuck anywhere. Thanks

Copy link
Copy Markdown
Collaborator

@Aamod007 Aamod007 left a comment

Choose a reason for hiding this comment

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

LGTM on the code side! However, the CI checks are failing. Please fix the CI issues so this can be merged.

@Aamod007 Aamod007 removed the gssoc26 label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSSoC 2026 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. status:blocked This PR is blocked due to a failing CI check. testing type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants