-
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
#3774 - SFAS MSFAA Implementation #3817
Conversation
guru-aot
commented
Oct 22, 2024
- Refactored associateMSFAANumber in disbursement.schedule.service.ts as the Cognitive Complexity became 18 so changed for early return during creation or assigning of MSFAA.
- During Associate MSFAA, if valid MSFAA number is present for a student, then use it.
- Else check for previously signed application disbursement already sent with valid end date and MSFAA number is present, use that.
- Else check if SFAS individual MSFAA number is present and checked if the application end date is within validate date, then use the MSFAA and create in SIMS and activate it.
- Else If MSFAA is not found in SFAS application, then check if MSFAA number is present in pending state, waiting for signing.
- Else create MSFAA number and activate and assign it to the application.
- E2E Test cases created for the above scenarios.
- Removed a not useful check in the getCurrentValidMSFAANumber method, which has referenceApplication as not null.
- The Sonarcloud issue is related to Cognitive Complexity in test helper class, so ignored.
sources/packages/backend/libs/services/src/sfas/sfas-application.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/services/src/sfas/sfas-application.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/services/src/sfas/sfas-application.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/services/src/sfas/sfas-application.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/services/src/sfas/sfas-application.service.ts
Show resolved
Hide resolved
sources/packages/backend/libs/services/src/sfas/sfas-application.service.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/services/src/sfas/sfas-application.service.ts
Outdated
Show resolved
Hide resolved
.../src/controllers/disbursement/_tests_/e2e/disbursement.controller.associateMSFAA.e2e-spec.ts
Outdated
Show resolved
Hide resolved
.../src/controllers/disbursement/_tests_/e2e/disbursement.controller.associateMSFAA.e2e-spec.ts
Outdated
Show resolved
Hide resolved
.../src/controllers/disbursement/_tests_/e2e/disbursement.controller.associateMSFAA.e2e-spec.ts
Outdated
Show resolved
Hide resolved
* @param auditUserId audit used id. | ||
* @returns MSFAA number id. | ||
*/ | ||
private async getOrCreateMSFAANumber( |
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.
This method can be invoked with more precise parameters.
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.
Do the parameters need to have the firstDisbursement
?
Suggestion:
studentId: number,
applicationId: number,
offeringIntensity: OfferingIntensity,
studyStartDate: string,
auditUserId: number,
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 making the changes and for the effort on the E2E. Please take a look at the remaining comments.
msfaaNumber: disbursementSchedule.msfaaNumber.msfaaNumber, | ||
dateSigned: savedSFASPartTimeApplication.endDate, |
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.
We should validate if those values are the same as the SFAS, right?
Please use the savedSFASPartTimeApplication
for asserts.
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 making the changes, great work overall. 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.
Looks good to me 👍 Great work @guru-aot That's a lot of E2E tests to make sure the implementation is working.