feat: implement E2E tests for notifications flow with database valida…#100
feat: implement E2E tests for notifications flow with database valida…#100raymondidahor-bot wants to merge 1 commit intoTrustUp-app:mainfrom
Conversation
Josue19-08
left a comment
There was a problem hiding this comment.
Hi @raymondidahor-bot, thank you for your contribution to the project! 🙌
A few things to fix before this can be merged:
-
Template not fully filled in — The bottom half of the PR body still has unfilled placeholders (
Closes #issue-number,<!-- Change 1 -->, empty checkboxes). Please replace them with your actual content. -
Production code changes in a testing PR — This PR modifies:
src/modules/notifications/notifications.service.ts(switching fromuser_wallettouser_idlookups across all three methods)supabase/migrations/20260125192000_create_notifications_table.sql(addingtitle,message,datacolumns; renamingread→is_read)src/jobs/loan-payment-reminder/loan-payment-reminder.service.ts
These production changes are out of scope for an E2E test PR and should be submitted in a separate PR so they can be reviewed independently.
-
Duplicate PR on the same issue — PR #99 also targets issue #79. Please coordinate with the maintainer on which PR will be merged.
-
Solve the conflicts in this PR .
Feel free to push the fixes and I'll take another look. Thanks again! 🚀
Close #79
E2E Tests for Notifications Flow
Description
This PR implements comprehensive end-to-end integration tests for the notifications system as specified in issue #79. The tests cover all notification endpoints including listing, filtering by unread status, pagination, marking individual/all notifications as read, validation errors, ownership validation, and complete flow verification. Tests use the actual test database for state validation and include proper cleanup of test data.
Changes Made
user_idfrom the users table instead of non-existentuser_walletcolumntitle,message,data,is_read,read_at) matching the service expectationstest/e2e/modules/notifications/notifications.e2e-spec.tscovering:Testing
Related Issues
Checklist
…tion
🔗 Related Issue
Closes #issue-number
🔖 Title
📝 Description
🔄 Changes Made
📸 Screenshots (if applicable)
🗒️ Additional Notes