Skip to content

add comprehensive unit tests for NotificationContext and PatientRegistrationPage

Damanagari Sathwika requested to merge test/notification-context into develop

Added comprehensive unit test cases:

  • NotificationContext.tsx
  • PatientRegistrationPage.tsx

NotificationContext

  • Added tests for Provider rendering
  • Covered showNotification and hide/clear logic
  • Tested default context behavior
  • Covered hook usage validation
  • Tested error case when used outside Provider (if applicable)

PatientRegistrationPage

  • Covered successful registration flow
  • Covered mutation error handling
  • Covered loading and disabled states
  • Covered edit mode behavior
  • Covered conditional rendering branches
  • Covered edge API response scenarios
  • Mocked navigation behavior
  • Covered alternate UI paths and fallback rendering

Before WhatsApp_Image_2026-02-27_at_5.52.59_PM

After Screenshot_from_2026-02-27_17-55-07

Edited by Damanagari Sathwika

Merge request reports

Loading