test(ContributorsLoading-mouse-interactivity): verify Interactive Tooltips, Cursor Hovers & Touch Event Propagation (Variation 5) #2847#3638
Conversation
|
@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
left a comment
There was a problem hiding this comment.
Hi there! 👋 Thanks for working on these interactivity tests! I noticed a small issue: the tests in ThemeSwitch.mouse-interactivity.test.tsx and loading.mouse-interactivity.test.tsx are currently rendering and testing mock components (MockThemeSwitch and MockContributorsLoading) defined right inside the test files, rather than the actual ThemeSwitch and ContributorsLoading components from the codebase.
To ensure the tests are verifying the real application behavior, could you update the test files to import and test the actual components instead of the mocks? Let me know if you need any help adjusting the tests for the real components!
|
Hi @Aamod007, thanks for the feedback! That makes total sense, testing the actual components definitely makes more sense 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! |
Aamod007
left a comment
There was a problem hiding this comment.
LGTM on the code side! However, the CI checks are failing. Please fix the CI issues so this can be merged.
|
Just updated this, used real component instead of a fake mock. Also the CI pipeline passed everything now. |
Description
Fixes #2847
This PR adds a dedicated interaction test suite containing 5 targeted cases for the
ContributorsLoadinglayout module. It ensures seamless coordinate mapping, responsive tooltip rendering, and safe touch events.What was done:
app/contributors/loading.mouse-interactivity.test.tsxusing Vitest.mouseenteroperations to trigger local layout tooltip tracking arrays.mousemovetriggers to verify reactive cursor client state coordinate recalculations (clientX/clientY).touchStartandtouchEnd.mouseleaveevents.Pillar
Checklist
Visual Preview
All 5 required interaction states, cursor alignments, and coordinate boundaries compile and pass effortlessly within local environments.