Skip to content

fix(tests): complete GeneratorState mock in EditorPanel mouse interactivity test#6141

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
deepsikha-dash:fix-editorpanel-generatorstate-mocks
Jun 21, 2026
Merged

fix(tests): complete GeneratorState mock in EditorPanel mouse interactivity test#6141
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
deepsikha-dash:fix-editorpanel-generatorstate-mocks

Conversation

@deepsikha-dash

Copy link
Copy Markdown
Contributor

Description

Updated the GeneratorState mock used in EditorPanel.mouse-interactivity.test.tsx to fully satisfy the current GeneratorState interface.

Removed the unsafe as unknown as GeneratorState cast and added the missing properties:

  • showSnakeGraph
  • showPacmanGraph
  • graphPlacement

This keeps the test mock aligned with the actual type definition and improves type safety.

Fixes #5353

Pillar

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

Visual Preview

N/A

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • 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., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started 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).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@github-actions

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 3694.34 KB 3694.34 KB 0 B
Total CSS 296.06 KB 296.06 KB 0 B

@Aamod-Dev Aamod-Dev added GSSoC 2026 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. testing bug Something isn't working labels Jun 21, 2026

@Aamod-Dev Aamod-Dev 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.

Thank you for completing the GeneratorState mock in app/generator/components/EditorPanel.mouse-interactivity.test.tsx. Removing the 'as unknown as' cast and fully typing the object with the missing properties (showSnakeGraph, showPacmanGraph, graphPlacement) is exactly what we need to maintain type safety in tests. Approved!

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 21, 2026
@JhaSourav07 JhaSourav07 merged commit cc04c92 into JhaSourav07:main Jun 21, 2026
11 of 12 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @deepsikha-dash! 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 the type:bug Something isn't working as expected label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gssoc:approved PR has been reviewed and accepted for valid contribution points 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. testing type:bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix missing GeneratorState properties in EditorPanel test mocks

3 participants