Skip to content

Commit

Permalink
CCM Task 171068: Fix existing tests:
Browse files Browse the repository at this point in the history
nationOfResidenceNavigatesToCorrectNextPage
  • Loading branch information
BisekJM committed Jan 10, 2025
1 parent 0363992 commit fbd2ac1
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 42 deletions.
20 changes: 1 addition & 19 deletions src/main/resources/pages-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6106,31 +6106,13 @@ workflow:
nextPages:
- pageName: applyForTribalTANF
condition: *isEligibleForTribalTANFonNationOfResidencePage?
- pageName: applyForTribalTANF
condition:
pageName: selectTheTribe
name: selectedTribeRLN
input: selectedTribe
value: Red Lake Nation
- pageName: applyForTribalTANF
condition:
logicalOperator: AND
name: livesInBeltrami_AND_isFederallyRecognizedTribeOutsideMN
conditions:
- pageName: selectTheTribe
name: selectedTribeFederallyRecognizedTribeOutsideMN
input: selectedTribe
value: Federally recognized tribe outside of MN
- pageName: identifyCounty
name: identifyCountyBeltrami
input: county
value: Beltrami
- pageName: applyForMFIP
datasources:
- groupName: household
pageName: householdMemberInfo
optional: "true"
- pageName: addHouseholdMembers
- pageName: tribalNationMember
- pageName: selectTheTribe
- pageName: identifyCounty
- pageName: pregnant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void tribesThatSeeMfipAndMustLiveInNationBoundaries(String nationName, String co
"Mille Lacs Band of Ojibwe,Mille Lacs",
"Mille Lacs Band of Ojibwe,Pine"
})
void shouldAddTribalTanfAndRouteCAFToMilleLacsAndCCAPToCounty(//TODO emj fix this test
void shouldAddTribalTanfAndRouteCAFToMilleLacsAndCCAPToCounty(
String tribalNation, String county)
throws Exception {
fillOutPersonalInfo();
Expand Down Expand Up @@ -499,46 +499,96 @@ void nationOfResidenceOptions() throws Exception {
"Prairie Island", "Red Lake Nation", "Shakopee Mdewakanton", "Upper Sioux", "White Earth Nation");
}


/**
* This test verifies: When the applicant is:
* 1) An urban tribe member AND the county is an urban county
* 2) OR the applicant is a member of Mille Lacs Band of Ojibwe AND the county is an MLB rural county
* 3) OR the applicant lives alone AND is pregnant
* 4) OR the applicant is a member of Red Lake Nation
* This test verifies correct next page flow from the nationOfResidence page.
* When the household includes someone who is pregnant and/or a child under age 18
* AND
* 1) a household member is a member of the Mille Lacs Band of Ojibwe
* AND the household lives in one of (Aitkin, Benton, Chisago, Crow Wing, Kanabec, Mille Lacs, Morrison, Pine) counties
* 2) OR a household member is a member of any of (Leech Lake, White Earth, Bois Forte, Grand Portage, Fond du Lac,
* Mille Lacs Band of Ojibwe) AND the household lives in one of (Anoka, Hennepin, Ramsey)
* 3) OR a household member is a member of any Tribal Nation other than Leech Lake AND the household lives in Beltrami County
* 4) OR they indicate they live within the boundaries of Red Lake Nation
* AND the county of residence is Beltrami or Clearwater County (member of any Tribal Nation)
* THEN the next page is applyForTribalTANF
* 5) OTHERWISE the next page is applyForMFIP
*
* @throws Exception
*/
@ParameterizedTest
@CsvSource(value = {
// Test cases when the household includes someone who is pregnant and/or a child under age 18
// case 1
"Aitkin, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Benton, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Chisago, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Crow Wing, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Kanabec, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Morrison, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Mille Lacs, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Pine, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
// case 2
"Anoka, Bois Forte, true, apply for Tribal TANF",
"Hennepin, Fond Du Lac, true, apply for Tribal TANF",
"Ramsey, Grand Portage, true, apply for Tribal TANF",
"Anoka, Leech Lake, true, apply for Tribal TANF",
"Hennepin, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Ramsey, White Earth Nation, true, apply for Tribal TANF",
// case 3
"Beltrami, Bois Forte, true, apply for Tribal TANF",
"Beltrami, Fond Du Lac, true, apply for Tribal TANF",
"Beltrami, Grand Portage, true, apply for Tribal TANF",
"Beltrami, Mille Lacs Band of Ojibwe, true, apply for Tribal TANF",
"Beltrami, White Earth Nation, true, apply for Tribal TANF",
"Beltrami, Lower Sioux, true, apply for Tribal TANF",
"Beltrami, Upper Sioux, true, apply for Tribal TANF",
"Beltrami, Prairie Island, true, apply for Tribal TANF",
"Beltrami, Shakopee Mdewakanton, true, apply for Tribal TANF",
// case 4
"Beltrami, Red Lake Nation, true, apply for Tribal TANF",
"Clearwater, Red Lake Nation, true, apply for Tribal TANF",
// case 5
"Clay, Shakopee Mdewakanton, true, apply for MFIP",
// Repeat test cases for household that DOES NOT include someone who is pregnant and/or a child under age 18
// case 1
"Anoka, Bois Forte, false, apply for Tribal TANF", "Hennepin, Fond Du Lac, false, apply for Tribal TANF",
"Ramsey, Grand Portage, false, apply for Tribal TANF", "Anoka, Leech Lake, false, apply for Tribal TANF",
"Hennepin, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Ramsey, White Earth Nation, false, apply for Tribal TANF",
"Aitkin, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Benton, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Chisago, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Crow Wing, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Kanabec, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Morrison, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Mille Lacs, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Pine, Mille Lacs Band of Ojibwe, false, apply for MFIP",
// case 2
"Aitkin, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Benton, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Chisago, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Crow Wing, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Kanabec, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Morrison, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Mille Lacs, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Pine, Mille Lacs Band of Ojibwe, false, apply for Tribal TANF",
"Anoka, Bois Forte, false, apply for MFIP",
"Hennepin, Fond Du Lac, false, apply for MFIP",
"Ramsey, Grand Portage, false, apply for MFIP",
"Anoka, Leech Lake, false, apply for MFIP",
"Hennepin, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Ramsey, White Earth Nation, false, apply for MFIP",
// case 3
"Norman, Prairie Island, true, apply for Tribal TANF",
// case 4
"Norman, Red Lake Nation, false, apply for Tribal TANF",
"Beltrami, Bois Forte, false, apply for MFIP",
"Beltrami, Fond Du Lac, false, apply for MFIP",
"Beltrami, Grand Portage, false, apply for MFIP",
"Beltrami, Mille Lacs Band of Ojibwe, false, apply for MFIP",
"Beltrami, White Earth Nation, false, apply for MFIP",
"Beltrami, Lower Sioux, false, apply for MFIP",
"Beltrami, Upper Sioux, false, apply for MFIP",
"Beltrami, Prairie Island, false, apply for MFIP",
"Beltrami, Shakopee Mdewakanton, false, apply for MFIP",
// case 4
"Beltrami, Red Lake Nation, false, apply for MFIP",
"Clearwater, Red Lake Nation, false, apply for MFIP",
// case 5
"Clay, Shakopee Mdewakanton, false, apply for MFIP" })
void nationOfResidenceNavigatesToCorrectNextPage(String county, String tribe, String liveAloneAndPregnant,
void nationOfResidenceNavigatesToCorrectNextPage(String county, String tribe, String pregnantOrChildUnderAge18,
String nextPageTitle) throws Exception {
postExpectingRedirect("identifyCountyBeforeApplying", "county", county, "prepareToApply");
postExpectingRedirect("choosePrograms", "programs", "SNAP", "expeditedNotice");

FormPage nextPage;
if (Boolean.valueOf(liveAloneAndPregnant)) {
if (Boolean.valueOf(pregnantOrChildUnderAge18)) {
// addHouseholdMember
nextPage = postAndFollowRedirect("addHouseholdMembers", "addHouseholdMembers", "false");
assertThat(nextPage.getTitle()).isEqualTo("Intro: Personal Details");
Expand Down

0 comments on commit fbd2ac1

Please sign in to comment.