Skip to content
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

Merged
merged 34 commits into from
Oct 25, 2024

Conversation

guru-aot
Copy link
Collaborator

  • 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.

@guru-aot guru-aot changed the title #3774-SFA msfaa implementation #3774-SFAS MSFAA Implementation Oct 22, 2024
@guru-aot guru-aot marked this pull request as ready for review October 22, 2024 21:29
@guru-aot guru-aot self-assigned this Oct 22, 2024
@andrewsignori-aot andrewsignori-aot changed the title #3774-SFAS MSFAA Implementation #3774 - SFAS MSFAA Implementation Oct 22, 2024
* @param auditUserId audit used id.
* @returns MSFAA number id.
*/
private async getOrCreateMSFAANumber(
Copy link
Collaborator

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.

Copy link
Collaborator

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,

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a 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.

Comment on lines 252 to 253
msfaaNumber: disbursementSchedule.msfaaNumber.msfaaNumber,
dateSigned: savedSFASPartTimeApplication.endDate,
Copy link
Collaborator

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.

Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot left a 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 👍

Copy link

Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.52% ( 3670 / 16295 )
Methods: 10.15% ( 206 / 2029 )
Lines: 25.9% ( 3186 / 12301 )
Branches: 14.15% ( 278 / 1965 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.43% ( 583 / 891 )
Methods: 59.26% ( 64 / 108 )
Lines: 68.54% ( 464 / 677 )
Branches: 51.89% ( 55 / 106 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 83.87% ( 1175 / 1401 )
Methods: 84.29% ( 118 / 140 )
Lines: 84.78% ( 997 / 1176 )
Branches: 70.59% ( 60 / 85 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 66.01% ( 5571 / 8439 )
Methods: 63.3% ( 683 / 1079 )
Lines: 70.12% ( 4401 / 6276 )
Branches: 44.93% ( 487 / 1084 )

Copy link
Collaborator

@lewischen-aot lewischen-aot left a 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.

@guru-aot guru-aot added this pull request to the merge queue Oct 25, 2024
Merged via the queue into main with commit fc34165 Oct 25, 2024
20 checks passed
@guru-aot guru-aot deleted the feature/#3774-SFAS_MSFAA_Implementation branch October 25, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants