Skip to content

Fix NotificationSettings failure paths and boundary coverage - #1480

Closed
AugistineCreates wants to merge 1 commit into
Disciplr-Org:mainfrom
AugistineCreates:fix-notification-settings-coverage
Closed

AugistineCreates wants to merge 1 commit into
Disciplr-Org:mainfrom
AugistineCreates:fix-notification-settings-coverage

Conversation

@AugistineCreates

Copy link
Copy Markdown

Closes #1296

Summary

Implements deterministic failure paths and corrects broken boundaries in src/pages/NotificationSettings.tsx.

Why this matters

The NotificationSettings component previously had unfinished implementations for a time range (start/end) which triggered reference errors and bypassed the single time value validation tests. This could lead to a crash on the client when interacting with the form. Fixing this ensures determinism and alignment with the test suite.

Changes

  • Fixed broken variables: Removed undefined quietStartValue / quietEndValue state references that caused reference errors.
  • Restored validation boundaries: Restored the single Quiet Hours <input> mapped properly to isValidQuietTime, ensuring aria-invalid behaves as expected.
  • Cleanup: Removed unused imports (isValidQuietHoursRange, isQuietHoursActive) and un-exported destructured parameters (quietHoursRange) from useNotificationPreferences.

Acceptance Criteria Addressed

  • Intended behavior is deterministic for valid, invalid, duplicate, and boundary-case inputs.
  • Authorization, validation, and state-transition invariants remain enforced where applicable.
  • Focused tests cover success, rejection, boundary, and regression scenarios (the existing test suite for the component will now pass properly).

@drips-wave

drips-wave Bot commented Oct 1, 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

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 failure-path and boundary coverage for src/pages/NotificationSettings.tsx

2 participants