Description
Write a comprehensive integration test suite that covers the full notification lifecycle from dispatch through persistence, WebSocket delivery, and REST retrieval. This is the safety net that confirms all PBIs work correctly together as a system before the feature is considered shippable.
User Story
As a backend engineer preparing to ship the notification feature, I want a suite of integration tests that exercise the complete flow from emission to delivery, so that I can merge with confidence and catch any regressions introduced by future changes.
Acceptance Criteria
Definition of Done
Assumptions and Constraints
- Assumption: A test harness for spinning up a real (or in-memory) database and a mock WS hub already exists from the database migration feature work.
- Constraint: Integration tests must not require external services beyond the database. WS hub is tested with an in-process mock.
Dependencies
No response
Additional Notes
No response
Description
Write a comprehensive integration test suite that covers the full notification lifecycle from dispatch through persistence, WebSocket delivery, and REST retrieval. This is the safety net that confirms all PBIs work correctly together as a system before the feature is considered shippable.
User Story
As a backend engineer preparing to ship the notification feature, I want a suite of integration tests that exercise the complete flow from emission to delivery, so that I can merge with confidence and catch any regressions introduced by future changes.
Acceptance Criteria
target_users = [userA]→ verify userB has no row.alertand asuccesswith the samecorrelation_id→ verify the correlation filter returns both, in creation order.is_read = false→ mark as read → verifyis_read = true→ verify unread count decremented.navigateand oneapi_callaction → verify both are returned correctly via REST and WS.Definition of Done
Assumptions and Constraints
Dependencies
No response
Additional Notes
No response