Skip to content

Commit

Permalink
Adding homeless screens
Browse files Browse the repository at this point in the history
  • Loading branch information
sree-cfa committed Oct 12, 2023
1 parent 42b9b69 commit ee44696
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public class LaDigitalAssister extends FlowInputs {

private String citizenshipInd;

private String homelessInd;

private String homeless;

private String householdSearchingForJob;

private String jobSearch;
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
}
}
8 changes: 8 additions & 0 deletions src/main/resources/flows-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,12 @@ citizenship.l1=We might need to check this information with U.S. Citizenship and
citizenship.l2=We will <b>not</b> 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?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title=#{homeless.title})}"></head>
<body>
<div class="page-wrapper">
<div th:replace="~{fragments/toolbar :: toolbar}"></div>
<section class="slab">
<div class="grid">
<div th:replace="~{fragments/goBack :: goBackLink}"></div>
<main id="content" role="main" class="form-card spacing-above-35">
<th:block th:replace="~{fragments/icons :: homeCare}"></th:block>
<th:block
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{homeless.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">
</div>
<div class="form-card__footer">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
inputName='homelessInd',
ariaDescribe='header')"/>
</div>
</th:block>
</th:block>
</main>
</div>
</section>
</div>
<th:block th:replace="~{fragments/footer :: footer}"/>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title=#{homeless-who.title})}"></head>
<body>
<div class="page-wrapper">
<div th:replace="~{fragments/toolbar :: toolbar}"></div>
<section class="slab">
<div class="grid">
<div th:replace="~{fragments/goBack :: goBackLink}"></div>
<main id="content" role="main" class="form-card spacing-above-35">
<th:block th:replace="~{fragments/icons :: homeCare}"></th:block>
<th:block
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{homeless-who.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">
<th:block th:replace="~{'fragments/inputs/householdCheckboxFieldset' ::
householdCheckboxFieldset(inputName='homeless')}">
</th:block>
</div>

<div class="form-card__footer">
<th:block th:replace="fragments/inputs/submitButton :: submitButton(
text=#{general.inputs.continue})" />
</div>
</th:block>
</th:block>
</main>
</div>
</section>
</div>
<th:block th:replace="~{fragments/footer :: footer}"/>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ee44696

Please sign in to comment.