-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#3594 - Email to Student - 2nd Disbursement has passed, still pending (Part 3) #4310
#3594 - Email to Student - 2nd Disbursement has passed, still pending (Part 3) #4310
Conversation
notificationMessage: await db.notificationMessage.findOne({ | ||
where: { | ||
id: NotificationMessageType.StudentSecondDisbursementNotification, | ||
}, | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there is no need to execute the db.notificationMessage.findOne
to get the notification from DB since its ID is known. Can you please try the below?
const notification = createFakeNotification(
{
user: student.user,
notificationMessage: { id: NotificationMessageType.StudentSecondDisbursementNotification } as NotificationMessage,
},
{
initialValue: {
metadata: { assessmentId: application.currentAssessment.id },
},
},
);
"when a notification is already sent for the second disbursement still pending.", | ||
async () => { | ||
// Arrange | ||
const student = await saveFakeStudent(db.dataSource); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker, but the student creation will be executed by the saveFakeApplicationDisbursements
in case one student is not provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nic work, just a minor comment.
If possible, it would be good to have a scenario where we have two COEs approved with a pending disbursement.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the extra E2E, nice work, looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @lewischen-aot
As the final part of the story, this PR has the following changes: