diff --git a/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java b/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java index 829493e81..ec62af7aa 100644 --- a/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java +++ b/src/main/java/org/ladocuploader/app/inputs/LaDigitalAssister.java @@ -71,6 +71,10 @@ public class LaDigitalAssister extends FlowInputs { private String citizenshipInd; + private String homelessInd; + + private String homeless; + private String householdSearchingForJob; private String jobSearch; diff --git a/src/main/java/org/ladocuploader/app/submission/conditions/IsHomeless.java b/src/main/java/org/ladocuploader/app/submission/conditions/IsHomeless.java new file mode 100644 index 000000000..b031d819b --- /dev/null +++ b/src/main/java/org/ladocuploader/app/submission/conditions/IsHomeless.java @@ -0,0 +1,13 @@ +package org.ladocuploader.app.submission.conditions; + +import formflow.library.data.Submission; +import org.springframework.stereotype.Component; + +@Component +public class IsHomeless extends BasicCondition { + + @Override + public Boolean run(Submission submission) { + return run(submission, "homelessInd", "true"); + } +} diff --git a/src/main/resources/flows-config.yaml b/src/main/resources/flows-config.yaml index 5fe47ea01..71fb983bc 100644 --- a/src/main/resources/flows-config.yaml +++ b/src/main/resources/flows-config.yaml @@ -150,6 +150,14 @@ flow: nextScreens: - name: householdFosterAgedOutWho householdFosterAgedOutWho: + nextScreens: + - name: householdHomeless + householdHomeless: + nextScreens: + - name: householdHomelessnessWho + condition: IsHomeless + - name: householdRoomRental + householdHomelessnessWho: nextScreens: - name: householdRoomRental householdRoomRental: diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index dd5e071fa..2bde62cf3 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -494,6 +494,12 @@ citizenship.l1=We might need to check this information with U.S. Citizenship and citizenship.l2=We will not use your Social Security Information to cooperate with Immigration Customs Enforcement (ICE). Participating in SNAP will not count against you if you apply for a green card or citizenship. citizenship.l3=Applying for or getting SNAP won't affect the immigration status of you or anyone in your home. +# Homelessness +homeless.title=Homeless +homeless.header=Is anyone in your household currently experiencing homelessness? +homeless-who.title=Homelessness who +homeless-who.header=Who in your household is currently experiencing homelessness? + # Phone number nudge phone-number-nudge.title=Phone number nudge phone-number-nudge.header=Are you sure you don't want to provide your phone number? diff --git a/src/main/resources/templates/laDigitalAssister/householdHomeless.html b/src/main/resources/templates/laDigitalAssister/householdHomeless.html new file mode 100644 index 000000000..95014b04a --- /dev/null +++ b/src/main/resources/templates/laDigitalAssister/householdHomeless.html @@ -0,0 +1,31 @@ + + + + +
+
+
+
+
+
+ + + + +
+
+ +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/laDigitalAssister/householdHomelessnessWho.html b/src/main/resources/templates/laDigitalAssister/householdHomelessnessWho.html new file mode 100644 index 000000000..123866082 --- /dev/null +++ b/src/main/resources/templates/laDigitalAssister/householdHomelessnessWho.html @@ -0,0 +1,34 @@ + + + + +
+
+
+
+
+
+ + + + +
+ + +
+ + +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/test/java/org/ladocuploader/app/journeys/LaDigitalAssisterFlowJourneyTest.java b/src/test/java/org/ladocuploader/app/journeys/LaDigitalAssisterFlowJourneyTest.java index e1f81938f..e30b98e45 100644 --- a/src/test/java/org/ladocuploader/app/journeys/LaDigitalAssisterFlowJourneyTest.java +++ b/src/test/java/org/ladocuploader/app/journeys/LaDigitalAssisterFlowJourneyTest.java @@ -114,6 +114,13 @@ void fullDigitalAssisterFlow() { assertThat(testPage.getTitle()).isEqualTo("Citizenship"); testPage.clickButton("Yes"); + testPage.navigateToFlowScreen("laDigitalAssister/householdHomeless"); + assertThat(testPage.getTitle()).isEqualTo("Homeless"); + testPage.clickButton("Yes"); + + assertThat(testPage.getTitle()).isEqualTo("Homelessness who"); + testPage.clickContinue(); + // Sensitive Questions testPage.navigateToFlowScreen("laDigitalAssister/sensitiveQuestions"); assertThat(testPage.getTitle()).isEqualTo("Sensitive Questions");