Skip to content

Testcases ehrs frontend

Pavani Nagireddi requested to merge testcases-pavani into develop

Overview

What does this MR do and why? This MR improves front‑end reliability by adding targeted unit tests for shared UI building blocks (dropdown menu) and for patient vitals presentation (VitalsByCampSection). These areas are frequently reused across screens, and regressions here would affect navigation and clinical data visibility. The new coverage ensures our UI wrappers behave consistently and that vitals are sorted and styled correctly for clinical review.

Changes Made

  • Added comprehensive unit tests for dropdown menu UI primitives to validate rendering, wrappers, and class logic
  • Added unit tests for VitalsByCampSection covering empty state, camp metadata, sorting behavior, and status‑based styling
  • Verified missing and invalid vitals are displayed safely with neutral UI cues

Technical Details

  • Dropdown tests render all exported primitives and validate class application, inset behavior, and sub‑content rendering paths
  • Vitals tests validate:
    • Most‑recent‑first sorting using camp_date
    • Conditional rendering of camp date/location
    • Status color classes for BP, RBS, HR, and Pulse (high/low/normal/missing)
    • Correct fallback rendering for missing height/weight
  • Ensures consistent UI behavior without altering production logic

Type of Change [x] 🧪 Test update

[ ] 🐛 Bug fix (non-breaking change that fixes an issue)

[ ] New feature (non-breaking change that adds functionality)

[ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)

[ ] 📝 Documentation update

[ ] 🎨 UI/UX improvement

[ ] ️ Refactor (no functional changes)

[ ] Performance improvement

[ ] 🔧 Configuration change

[ ] 🚨 Security fix

Edited by Pavani Nagireddi

Merge request reports

Loading