Task 1: Internal Notification System Foundation
Demo Steps
Login as different roles to demonstrate notification delivery and isolation.
Test Cases
| ID | Scenario | Expected Result | Status |
|---|---|---|---|
| T1-01 | Trigger event employee_created | All HR users get internal notification | |
| T1-02 | Trigger event kpi_reviewer_assigned | Assigned reviewer gets internal notification | |
| T1-03 | Trigger event kpi_manager_review_submitted | Evaluation owner (employee) gets internal notification | |
| T1-04 | Trigger event kpi_dispute_escalated | All HR users get internal notification | |
| T1-05 | Open notifications list | User sees only own notifications (not others) | |
| T1-06 | Mark single notification as read | Item is_read=true, unread count decreases | |
| T1-07 | Mark all notifications as read | All unread become read, unread count becomes 0 | |
| T1-08 | Unauthenticated request to notifications APIs | Returns 401 |
Demo Walkthrough
- Login as Admin → Create a new employee → Switch to HR login → Verify notification appeared
- Show notification bell → Click to open dropdown → Click one notification → Verify it marks as read
- Click "Mark All as Read" → Verify unread count becomes 0
- Open browser incognito → Hit
/api/notificationswithout login → Show 401 response