-
Notifications
You must be signed in to change notification settings - Fork 13
#5501 - FT/PT Assessment Disabled Spouse Path #5690
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
base: main
Are you sure you want to change the base?
Changes from all commits
91ce0fa
4d1c38c
76a9317
45ddd22
cffcc1f
59397ca
bc1db36
05e501a
70f5c09
d82b375
0916e91
6566418
eb7991f
789250e
f2e571e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| import { DependantRelationship } from "@sims/test-utils"; | ||
| import { PROGRAM_YEAR } from "../../constants/program-year.constants"; | ||
| import { | ||
| createFakeConsolidatedFulltimeData, | ||
| executeFullTimeAssessmentForProgramYear, | ||
| ZeebeMockedClient, | ||
| } from "../../../test-utils"; | ||
| import { | ||
| createFakeStudentDependentEligible, | ||
| createFakeStudentDependentNotEligible, | ||
| DependentEligibility, | ||
| } from "../../../test-utils/factories"; | ||
|
|
||
| describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}-family-size.`, () => { | ||
dheepak-aot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| it("Should correctly calculate the family size count when one or more dependants provided in the application has relationship type 'spouse'.", async () => { | ||
| // Arrange | ||
| const assessmentConsolidatedData = | ||
dheepak-aot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| createFakeConsolidatedFulltimeData(PROGRAM_YEAR); | ||
| assessmentConsolidatedData.studentDataRelationshipStatus = "married"; | ||
| assessmentConsolidatedData.studentDataIsYourPartnerAbleToReport = true; | ||
| assessmentConsolidatedData.partner1CRAReportedIncome = 22999; | ||
| assessmentConsolidatedData.studentDataDependants = [ | ||
| createFakeStudentDependentEligible( | ||
| DependentEligibility.Eligible18To22YearsOldDeclaredOnTaxes, | ||
| ), | ||
| ]; | ||
| const [dependent] = assessmentConsolidatedData.studentDataDependants; | ||
dheepak-aot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| dependent.relationship = DependantRelationship.Spouse; | ||
| assessmentConsolidatedData.studentDataDependants = [dependent]; | ||
|
Comment on lines
+27
to
+29
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part of code can be removed now by using the factory options this way. assessmentConsolidatedData.studentDataDependants = [
createFakeStudentDependentEligible(
DependentEligibility.Eligible18To22YearsOldDeclaredOnTaxes,
{ relationship: DependantRelationship.Spouse },
),
]; |
||
|
|
||
| // Act | ||
| const calculatedAssessment = await executeFullTimeAssessmentForProgramYear( | ||
| PROGRAM_YEAR, | ||
| assessmentConsolidatedData, | ||
| ); | ||
|
|
||
| // Assert | ||
| expect( | ||
| calculatedAssessment.variables.calculatedDataTotalEligibleDependants, | ||
| ).toBe(1); | ||
| expect(calculatedAssessment.variables.calculatedDataFamilySize).toBe(2); | ||
dheepak-aot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }); | ||
|
|
||
| it( | ||
| "Should correctly calculate the family size count when student relationship status is married and one dependant is provided in the application with relationship type spouse " + | ||
| " and not declared on taxes for disability.", | ||
|
Comment on lines
+45
to
+46
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a space on both the lines, please use the space on one of the lines only. |
||
| async () => { | ||
| // Arrange | ||
| const assessmentConsolidatedData = | ||
| createFakeConsolidatedFulltimeData(PROGRAM_YEAR); | ||
| assessmentConsolidatedData.studentDataRelationshipStatus = "married"; | ||
| assessmentConsolidatedData.studentDataIsYourPartnerAbleToReport = true; | ||
| assessmentConsolidatedData.partner1CRAReportedIncome = 22999; | ||
| assessmentConsolidatedData.studentDataDependants = [ | ||
| createFakeStudentDependentNotEligible( | ||
| DependentEligibility.Eligible18To22YearsOldDeclaredOnTaxes, | ||
| ), | ||
| ]; | ||
| const [dependent] = assessmentConsolidatedData.studentDataDependants; | ||
| dependent.relationship = DependantRelationship.Spouse; | ||
|
Comment on lines
+58
to
+60
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| assessmentConsolidatedData.studentDataDependants = [dependent]; | ||
|
|
||
| // Act | ||
| const calculatedAssessment = | ||
| await executeFullTimeAssessmentForProgramYear( | ||
| PROGRAM_YEAR, | ||
| assessmentConsolidatedData, | ||
| ); | ||
|
|
||
| // Assert | ||
| expect( | ||
| calculatedAssessment.variables.calculatedDataTotalEligibleDependants, | ||
| ).toBe(0); | ||
| expect(calculatedAssessment.variables.calculatedDataFamilySize).toBe(2); | ||
| }, | ||
| ); | ||
|
|
||
| it( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same double space here. |
||
| "Should correctly calculate the family size count when student relationship status is married and one dependant is provided in the application with relationship type child " + | ||
| " and declared on taxes for disability.", | ||
| async () => { | ||
| // Arrange | ||
| const assessmentConsolidatedData = | ||
| createFakeConsolidatedFulltimeData(PROGRAM_YEAR); | ||
| assessmentConsolidatedData.studentDataRelationshipStatus = "married"; | ||
| assessmentConsolidatedData.studentDataIsYourPartnerAbleToReport = true; | ||
| assessmentConsolidatedData.partner1CRAReportedIncome = 22999; | ||
| assessmentConsolidatedData.studentDataDependants = [ | ||
| createFakeStudentDependentEligible( | ||
| DependentEligibility.EligibleOver22YearsOld, | ||
| ), | ||
| ]; | ||
|
|
||
| // Act | ||
| const calculatedAssessment = | ||
| await executeFullTimeAssessmentForProgramYear( | ||
| PROGRAM_YEAR, | ||
| assessmentConsolidatedData, | ||
| ); | ||
|
|
||
| // Assert | ||
| expect( | ||
| calculatedAssessment.variables.calculatedDataTotalEligibleDependants, | ||
| ).toBe(1); | ||
| expect(calculatedAssessment.variables.calculatedDataFamilySize).toBe(3); | ||
| }, | ||
| ); | ||
|
|
||
| afterAll(async () => { | ||
| // Closes the singleton instance created during test executions. | ||
| await ZeebeMockedClient.getMockedZeebeInstance().close(); | ||
| }); | ||
| }); | ||
Uh oh!
There was an error while loading. Please reload this page.