Skip to content

Conversation

VetteIT
Copy link

@VetteIT VetteIT commented Sep 27, 2025

Description

Adds a comprehensive unit test suite for the GalleryTooltip component using Vitest + React Testing Library.
Covers default/explicit placement, open state management, hover vs touch interactions, and onOpen/onClose behavior.

Closes #111


What change does this PR introduce?

  • Bug fix
  • New feature
  • Breaking change
  • CI/CD
  • Documentation update
  • Chore (tests)

What is the proposed approach?

  • Mocked MUI Tooltip to a lightweight function to capture and assert open, placement, disable*, onOpen, onClose.
  • Simulated devices via window.matchMedia('(hover: none)') to test touch vs non-touch flows.
  • Verified title renders Typography-wrapped content and interactions toggle open as expected.

Checklist:

  • The commit message follows our adopted guidelines
  • Testing has been done for the change(s) added
  • Relevant comments/docs have been added/updated (N/A — tests only)

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.

[Task] Add unit test cases for GalleryTooltip component

1 participant