Skip to content

test(DashboardLayout-theme-contrast): verify Dark and Light Prefers-Color-Scheme Visual Cohesion#5345

Merged
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
adityack477:test/dashboard-layout-theme-contrast
Jun 12, 2026
Merged

test(DashboardLayout-theme-contrast): verify Dark and Light Prefers-Color-Scheme Visual Cohesion#5345
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
adityack477:test/dashboard-layout-theme-contrast

Conversation

@adityack477

@adityack477 adityack477 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #4430

What changed

  • Created new file app/(root)/dashboard/layout.theme-contrast.test.tsx with 5 test cases

Test cases

  1. Applies light mode text color class for sufficient contrast on light backgrounds
  2. Applies dark mode text color class for sufficient contrast on dark backgrounds
  3. Uses a transparent background so it does not clip foreground content colors in either theme
  4. Renders children content correctly within the themed main wrapper
  5. Renders the Toaster component for theme-aware notification styling

How it works

  • Mocks sonner's Toaster to isolate the layout component
  • Verifies text-gray-900 and dark:text-white classes are present for light/dark contrast
  • Confirms bg-transparent is applied so foreground content is never clipped by a background overlay
  • Asserts children content renders correctly inside the <main> wrapper
  • Checks the Toaster renders for theme-aware toast notifications

Tests

All 5 new tests pass. All existing tests pass.

Pillar

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

Visual Preview

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.

@adityack477

Copy link
Copy Markdown
Contributor Author

@souravjhahind pls review and add labels

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

Summary

The PR follows a known pattern of AI-generated superficial test files or inappropriate modifications that provide little to no meaningful runtime coverage and clutter the repository.

Required Changes

Issue 1

  • Problem: The test file creates or simulates interactions on dummy structures, or simply adds redundant tests.
  • Impact: It provides 0 real test coverage.
  • Required Fix: Ensure the PR tests actual new runtime behavior and does not just add redundant tests.

@Aamod-Dev Aamod-Dev added GSSoC 2026 mentor:Aamod007 type:testing Adding, updating, or fixing tests 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. labels Jun 12, 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.

Thanks for the PR. The test suite for the dashboard layout contrast works nicely. It's a great addition to ensure light and dark mode classes are appropriately applied and don't regress over time.

I have applied the following labels for scoring:

  • \level:beginner: A clean, single-file test addition focusing on basic class validations.
  • \ ype:testing: Primary focus on test coverage.
  • \quality:clean: Readable and well-organized test cases.
  • \mentor:Aamod007\

Good job!

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 12, 2026
@JhaSourav07 JhaSourav07 merged commit 3a42b10 into JhaSourav07:main Jun 12, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @adityack477! 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 this to the GSSoC 2026 milestone Jun 12, 2026
@JhaSourav07 JhaSourav07 added gssoc:approved PR has been reviewed and accepted for valid contribution points and removed gssoc:approved PR has been reviewed and accepted for valid contribution points labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(DashboardLayout-theme-contrast): verify Dark and Light Prefers-Color-Scheme Visual Cohesion (Variation 3)

3 participants