Skip to content

Commit

Permalink
Adding room rental screens, other cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sree-cfa committed Oct 13, 2023
1 parent 54d5cbd commit 348715e
Show file tree
Hide file tree
Showing 14 changed files with 140 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ public class LaDigitalAssister extends FlowInputs {

private String citizenshipNumber;

private String veteranInd;

private String veterans;

private String fosterInd;

private String fosters;
Expand All @@ -97,14 +101,14 @@ public class LaDigitalAssister extends FlowInputs {

private String fostersAgedOut;

private String veteranInd;

private String veterans;

private String homelessInd;

private String homeless;

private String roomRentalInd;

private String roomRentals;

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 HasRoomRental extends BasicCondition {

@Override
public Boolean run(Submission submission) {
return run(submission, "roomRentalInd", "true");
}
}
4 changes: 3 additions & 1 deletion src/main/resources/flows-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ flow:
nextScreens:
- name: householdFosterAgedOutWho
condition: FostersAgedOut
- name: householdRoomRental
- name: householdHomeless
householdFosterAgedOutWho:
nextScreens:
- name: householdHomeless
Expand All @@ -173,6 +173,8 @@ flow:
householdRoomRental:
nextScreens:
- name: householdRoomRentalWho
condition: HasRoomRental
- name: householdMeals
householdRoomRentalWho:
nextScreens:
- name: householdMeals
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,12 @@ 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?

# Room rental
household-room-rental.title=Room rental
household-room-rental.header=Does anyone in your household rent a room?
household-room-rental-who.title=Room rental who
household-room-rental-who.header=Who rents a room?

# Review contact info
review-contact-info.title=Review contact information
review-contact-info.header=Let's review your info
Expand All @@ -572,13 +578,6 @@ job-search.header=Is anyone in your household currently looking for a job?
job-search-who.title = Job search who
job-search-who.header=Who in your household is looking for a job?

# 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?
phone-number-nudge.p1=A caseworker may need to contact you by phone about your application. If you don't have a phone number, you can enter a friend or family member's phone number instead.
phone-number-nudge.add-phone-number=Add a phone number
phone-number-nudge.skip-phone-number=Continue without it

#Sensitive Questions
sensitive-questions.title=Sensitive Questions
sensitive-questions.header=Next, we have questions about situations that make it hard to work.
Expand Down Expand Up @@ -615,3 +614,4 @@ criminal-justice.header=Do any of these situations apply to anyone in your house
criminal-justice-content.l1=Have been convicted of breaking rules for SNAP, cash aid, or SSI programs
criminal-justice-content.l2=Have been convicted of a felony
criminal-justice-content.l3=Currently on probation or parole

24 changes: 24 additions & 0 deletions src/main/resources/templates/fragments/icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ <h1>Icons</h1>
</tr>
</thead>
<tbody>
<tr>
<td>householdFamilyIncome</td>
<td>
<svg th:fragment="householdFamilyIncome" width="100" height="75" viewBox="0 0 100 75" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.0555 0.00771481C56.8164 0.130754 62.9565 2.80303 69.0028 5.64798C75.708 8.80294 84.1708 10.9671 87.1176 17.4463C90.0629 23.9221 84.7845 30.9264 83.6667 37.89C82.5589 44.7915 84.3933 52.2104 80.5762 58.1979C76.4704 64.6382 69.9107 70.3604 62.0639 71.7754C54.3641 73.164 47.4747 67.7489 40.0037 65.5146C32.7411 63.3428 24.0792 63.9578 18.7631 58.8263C13.3823 53.6322 11.8853 45.7369 12.0067 38.4895C12.1182 31.8328 16.1326 26.1021 19.4101 20.1996C22.5153 14.6074 25.1342 8.57113 30.6306 4.94965C36.2364 1.25605 43.21 -0.116865 50.0555 0.00771481Z" fill="#9BCBEB"/>
<path d="M76.1111 33.5089V63.3549H57.2811H50.2849H47.6062H42.2225H23.4014V32.2828L49.7562 5L76.1111 33.5089Z" fill="white"/>
<path d="M18 37.8743L49.7562 5M49.7562 5L80.1467 37.8743M49.7562 5L23.4014 32.2828V63.3549H42.2225H47.6062H50.2849H57.2811H76.1111V33.5089L49.7562 5Z" stroke="#121111" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M58 35H40V63H58V35Z" fill="white" stroke="#121111" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M67.8196 8.72687H61.6516V17.8643L67.8196 24.5315V8.72687Z" fill="#FFF2FF" stroke="#121111" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M40.7486 52.9295C36.7524 52.9295 33.5073 56.1855 33.5073 60.2121V71H47.9824V60.2121C47.9899 56.1931 44.7524 52.9295 40.7486 52.9295Z" fill="#FFF7E3"/>
<path d="M40.7486 52.9295C43.7854 52.9295 46.2472 50.4536 46.2472 47.3995C46.2472 44.3454 43.7854 41.8696 40.7486 41.8696C37.7118 41.8696 35.2501 44.3454 35.2501 47.3995C35.2501 50.4536 37.7118 52.9295 40.7486 52.9295Z" fill="#FFF7E3"/>
<path d="M40.7486 52.9295C36.7524 52.9295 33.5073 56.1855 33.5073 60.2121V71H47.9824V60.2121C47.9899 56.1931 44.7524 52.9295 40.7486 52.9295ZM40.7486 52.9295C43.7854 52.9295 46.2472 50.4536 46.2472 47.3995C46.2472 44.3454 43.7854 41.8696 40.7486 41.8696C37.7118 41.8696 35.2501 44.3454 35.2501 47.3995C35.2501 50.4536 37.7118 52.9295 40.7486 52.9295Z" stroke="#121111" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M55.4039 52.9295C51.4077 52.9295 48.1626 56.1855 48.1626 60.2121V71H62.6377V60.2121C62.6452 56.193 59.4001 52.9295 55.4039 52.9295Z" fill="#FFF7E3"/>
<path d="M55.4039 52.9295C58.4407 52.9295 60.9025 50.4536 60.9025 47.3995C60.9025 44.3454 58.4407 41.8696 55.4039 41.8696C52.3671 41.8696 49.9054 44.3454 49.9054 47.3995C49.9054 50.4536 52.3671 52.9295 55.4039 52.9295Z" fill="#FFF7E3"/>
<path d="M55.4039 52.9295C51.4077 52.9295 48.1626 56.1855 48.1626 60.2121V71H62.6377V60.2121C62.6452 56.193 59.4001 52.9295 55.4039 52.9295ZM55.4039 52.9295C58.4407 52.9295 60.9025 50.4536 60.9025 47.3995C60.9025 44.3454 58.4407 41.8696 55.4039 41.8696C52.3671 41.8696 49.9054 44.3454 49.9054 47.3995C49.9054 50.4536 52.3671 52.9295 55.4039 52.9295Z" stroke="#121111" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M67.5023 59.834C65.0176 59.834 63 61.8459 63 64.334V70.9999H72V64.334C72.0047 61.8506 69.987 59.834 67.5023 59.834Z" fill="#FFF7E3"/>
<path d="M67.5023 59.834C69.3905 59.834 70.9211 58.3041 70.9211 56.417C70.9211 54.5298 69.3905 52.9999 67.5023 52.9999C65.6142 52.9999 64.0836 54.5298 64.0836 56.417C64.0836 58.3041 65.6142 59.834 67.5023 59.834Z" fill="#FFF7E3"/>
<path d="M67.5023 59.834C65.0176 59.834 63 61.8459 63 64.334V70.9999H72V64.334C72.0047 61.8506 69.987 59.834 67.5023 59.834ZM67.5023 59.834C69.3905 59.834 70.9211 58.3041 70.9211 56.417C70.9211 54.5298 69.3905 52.9999 67.5023 52.9999C65.6142 52.9999 64.0836 54.5298 64.0836 56.417C64.0836 58.3041 65.6142 59.834 67.5023 59.834Z" stroke="#121111" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M29.8548 33.8204C38.0589 33.8204 44.7096 27.3688 44.7096 19.4102C44.7096 11.4517 38.0589 5 29.8548 5C21.6507 5 15 11.4517 15 19.4102C15 27.3688 21.6507 33.8204 29.8548 33.8204Z" fill="#EEFFE6" stroke="#121111" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M34.4828 21.6989C34.4828 19.3134 32.6407 18.6268 30.6534 18.2394L29.6008 18.0458C28.04 17.7641 27.922 17.3504 27.922 16.7958C27.922 16.0739 28.6298 15.6514 29.8186 15.6514C31.2251 15.6514 31.5881 16.294 31.7333 16.7782L31.7514 16.8222C31.9238 17.2447 32.3413 17.5 32.8494 17.5C32.9855 17.5 33.1035 17.4824 33.1943 17.4648C33.7478 17.368 34.1289 16.963 34.1289 16.4877C34.1289 16.3732 34.1017 16.25 34.0563 16.1444C33.775 15.3169 32.9855 14.0141 30.7895 13.7148V12.2975C30.7895 11.1092 28.7659 11.1092 28.7659 12.2975V13.7236C26.4066 14.0581 25.5445 15.5282 25.5445 16.8046C25.5445 19.1285 27.314 19.7799 29.0473 20.1056L30.1906 20.3257C31.8149 20.625 32.1053 21.0123 32.1053 21.7166C32.1053 22.5704 31.3159 23.0898 29.9819 23.0898C28.2578 23.0898 27.9039 22.3768 27.6679 21.5845C27.5318 21.1444 27.0963 20.8627 26.5518 20.8627C26.4338 20.8627 26.3431 20.8803 26.2251 20.8979L26.1888 20.9067C25.6353 21.0299 25.2542 21.4261 25.2542 21.9014C25.2542 21.9894 25.2723 22.0687 25.2814 22.1303L25.2995 22.2007C25.5536 22.9754 26.1071 24.6655 28.8567 25.044V26.5317C28.8567 27.1215 29.3649 27.4384 29.873 27.4384C30.3812 27.4384 30.8894 27.1303 30.8894 26.5317V25.0704C33.0672 24.7887 34.4828 23.5123 34.4828 21.6989Z" fill="#121111"/>
</svg>

</td>
</tr>
<tr>
<td>personMilestone</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<div class="form-card__content">
</div>
<div class="form-card__footer">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='fosterInd',
ariaDescribe='header')"/>
ariaDescribe='header')}"/>
</div>
</th:block>
</th:block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<div class="form-card__content">
</div>
<div class="form-card__footer">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='fosterAgedOutInd',
ariaDescribe='header')"/>
ariaDescribe='header')}"/>
</div>
</th:block>
</th:block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<div class="form-card__content">
</div>
<div class="form-card__footer">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='homelessInd',
ariaDescribe='header')"/>
ariaDescribe='header')}"/>
</div>
</th:block>
</th:block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{household-prepare-food.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContent})}">
<th:block th:ref="formContent">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='buyPrepareMealsSeparateIndicator',
ariaDescribe='header')"/>
ariaDescribe='header')}"/>
</th:block>
</th:block>
</main>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{household-room-rental.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/cardHeader' :: cardHeader(header=#{}, subtext=#{})}"/>-->
<th:block th:replace="~{fragments/icons :: 'householdFamilyIncome'}"></th:block>
<th:block
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{household-room-rental.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">

</div>
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='roomRentalInd',
ariaDescribe='header')}"/>
</th:block>
</th:block>
</main>
</div>
</section>
</div>
<th:block th:replace="~{fragments/footer :: footer}" />
<th:block th:replace="~{fragments/footer :: footer}"/>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title='Scaffold')}"></head>
<head th:replace="~{fragments/head :: head(title=#{household-room-rental-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/cardHeader' :: cardHeader(header=#{}, subtext=#{})}"/>-->
<th:block th:replace="~{fragments/icons :: householdFamilyIncome}"></th:block>
<th:block
th:replace="~{'fragments/cardHeader' :: cardHeader(header=#{household-room-rental-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='roomRentals')}">
</th:block>
</div>
<div class="form-card__footer">

<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}" />
<th:block th:replace="~{fragments/footer :: footer}"/>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

</div>
<div class="form-card__footer">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='migrantOrSeasonalFarmWorkerInd',
ariaDescribe='header')"/>
ariaDescribe='header')}"/>
</div>
</th:block>
</th:block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
</ul>
</div>
<div class="form-card__footer">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='veteranInd',
ariaDescribe='header')"/>
ariaDescribe='header')}"/>
</div>
</th:block>
</th:block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,66 @@ void fullDigitalAssisterFlow() {

assertThat(testPage.getTitle()).isEqualTo("Citizenship");
testPage.clickButton("Yes");
assertThat(testPage.getTitle()).isEqualTo("Veteran");
testPage.goBack();
testPage.clickButton("No");

assertThat(testPage.getTitle()).isEqualTo("Non-citizen");
testPage.clickElementById("nonCitizens-you");
testPage.clickContinue();

assertThat(testPage.getTitle()).isEqualTo("Citizenship number");
testPage.selectFromDropdown("citizenshipNumber", "1 people");
testPage.clickContinue();

assertThat(testPage.getTitle()).isEqualTo("Veteran");
testPage.clickButton("No");
assertThat(testPage.getTitle()).isEqualTo("Foster");
testPage.goBack();
testPage.clickButton("Yes");

assertThat(testPage.getTitle()).isEqualTo("Veteran who");
testPage.clickElementById("veterans-you");
testPage.clickContinue();

assertThat(testPage.getTitle()).isEqualTo("Foster");
testPage.clickButton("No");
assertThat(testPage.getTitle()).isEqualTo("Foster aged out");
testPage.goBack();
testPage.clickButton("Yes");

assertThat(testPage.getTitle()).isEqualTo("Foster who");
testPage.clickElementById("fosters-you");
testPage.clickContinue();

assertThat(testPage.getTitle()).isEqualTo("Foster aged out");
testPage.clickButton("No");
assertThat(testPage.getTitle()).isEqualTo("Homeless");
testPage.goBack();
testPage.clickButton("Yes");

assertThat(testPage.getTitle()).isEqualTo("Foster aged out who");
testPage.clickElementById("fostersAgedOut-you");
testPage.clickContinue();

testPage.navigateToFlowScreen("laDigitalAssister/householdHomeless");
assertThat(testPage.getTitle()).isEqualTo("Homeless");
testPage.clickButton("No");
assertThat(testPage.getTitle()).isEqualTo("Room rental");
testPage.goBack();
testPage.clickButton("Yes");

assertThat(testPage.getTitle()).isEqualTo("Homelessness who");
testPage.clickElementById("homeless-you");
testPage.clickContinue();

assertThat(testPage.getTitle()).isEqualTo("Room rental");
testPage.clickButton("No");
assertThat(testPage.getTitle()).isEqualTo("Scaffold"); // Meals
testPage.goBack();
testPage.clickButton("Yes");

assertThat(testPage.getTitle()).isEqualTo("Room rental who");
testPage.clickElementById("roomRentals-you");
testPage.clickContinue();

// Sensitive Questions
Expand Down

0 comments on commit 348715e

Please sign in to comment.