Skip to content

test: cover NotificationSection grouping and change forwarding#906

Merged
1nonlypiece merged 1 commit into
Commitlabs-Org:masterfrom
AugistineCreates:test/notification-section
Jun 27, 2026
Merged

test: cover NotificationSection grouping and change forwarding#906
1nonlypiece merged 1 commit into
Commitlabs-Org:masterfrom
AugistineCreates:test/notification-section

Conversation

@AugistineCreates

Copy link
Copy Markdown
Contributor

This pr closes #740

Description:
This PR adds dedicated RTL (React Testing Library) test coverage for the NotificationSection wrapper component, which was previously missing a specific unit test.

Changes included:

  • Added src/components/settings/NotificationSection.test.tsx using vitest and @testing-library/react.
  • Verified that the section correctly renders its grouped toggles along with the header and description.
  • Ensured that toggling any child component properly invokes the section's change handler with the correct key.

Edge Cases Covered:

  • Mixed states: Handled correctly when some preferences are toggled on and others off.
  • All-on / All-off states: Verified that all toggles render in the correct state based on the provided preferences prop.
  • Single toggle: Works seamlessly when only one child toggle is present.
  • Empty preferences: Evaluated the fallback behavior to ensure it doesn't crash when preferences are empty.

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@AugistineCreates is attempting to deploy a commit to the 1nonly's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@AugistineCreates Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@1nonlypiece 1nonlypiece merged commit a378a4a into Commitlabs-Org:master Jun 27, 2026
0 of 2 checks passed
@1nonlypiece

Copy link
Copy Markdown
Contributor

coverage on the notification section grouping and forwarding looks good, in

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.

Add RTL tests for the settings NotificationSection grouping and per-toggle wiring

2 participants