Skip to content
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

Adding parish page #456

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public class LaDigitalAssister extends FlowInputs {

MultipartFile uploadDocuments;

// Parish (WIC/ECE)
@NotEmpty(message="{error.missing-general}")
private String parish;

// Language
private String languageRead;
private String languageSpeak;
Expand Down
77 changes: 77 additions & 0 deletions src/main/java/org/ladocuploader/app/utils/Parish.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package org.ladocuploader.app.utils;

public enum Parish {
ACADIA("Acadia"),
ALLEN("Allen"),
ASCENSION("Ascension"),
ASSUMPTION("Assumption"),
AVOYELLES("Avoyelles"),
BEAUREGARD("Beauregard"),
BIENVILLE("Bienville"),
BOSSIER("Bossier"),
CADDO("Caddo"),
CALCASIEU("Calcasieu"),
CALDWELL("Caldwell"),
CAMERON("Cameron"),
CATAHOULA("Catahoula"),
CLAIBORNE("Claiborne"),
CONCORDIA("Concordia"),
DESOTO("DeSoto"),
EAST_BATON_ROUGE("East Baton Rouge"),
EAST_CARROLL("East Carroll"),
EAST_FELICIANA("East Feliciana"),
EVANGELINE("Evangeline"),
FRANKLIN("Franklin"),
GRANT("Grant"),
IBERIA("Iberia"),
IBERVILLE("Iberville"),
JACKSON("Jackson"),
JEFFERSON("Jefferson"),
JEFFERSON_DAVIS("Jefferson Davis"),
LAFAYETTE("Lafayette"),
LAFOURCHE("Lafourche"),
LASALLE("LaSalle"),
LINCOLN("Lincoln"),
LIVINGSTON("Livingston"),
MADISON("Madison"),
MOREHOUSE("Morehouse"),
NATCHITOCHES("Natchitoches"),
ORLEANS("Orleans"),
OUACHITA("Ouachita"),
PLAQUEMINES("Plaquemines"),
POINTE_COUPEE("Pointe Coupee"),
RAPIDES("Rapides"),
RED_RIVER("Red River"),
RICHLAND("Richland"),
SABINE("Sabine"),
ST_BERNARD("St. Bernard"),
ST_CHARLES("St. Charles"),
ST_HELENA("St. Helena"),
ST_JAMES("St. James"),
ST_JOHN("St. John"),
ST_LANDRY("St. Landry"),
ST_MARTIN("St. Martin"),
ST_MARY("St. Mary"),
ST_TAMMANY("St. Tammany"),
TANGIPAHOA("Tangipahoa"),
TENSAS("Tensas"),
TERREBONNE("Terrebonne"),
UNION("Union"),
VERMILION("Vermilion"),
VERNON("Vernon"),
WASHINGTON("Washington"),
WEBSTER("Webster"),
WEST_BATON_ROUGE("West Baton Rouge"),
WEST_CARROLL("West Carroll"),
WEST_FELICIANA("West Feliciana"),
WINN("Winn");
private final String displayName;

Parish(String displayName) {
this.displayName = displayName;
}

public String getDisplayName() {
return displayName;
}
}
3 changes: 3 additions & 0 deletions src/main/resources/flows-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ flow:
---
name: laDigitalAssister
flow:
parish:
nextScreens:
- name: howThisWorks
howThisWorks:
nextScreens:
- name: timeoutNotice
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,8 @@ confirmation-feedback.how-easy=How easy or difficult was it to complete the onli
looking-for-assistance=Looking for assistance with other programs?
already-started=Already started your application?
upload-requested-docs=Upload requested docs to DCFS

parish.title=Parish
parish.header=Which parish do you live in right now?
parish.subheader=Choose the parish where you live.
parish.select=Select your parish
Expand Down
40 changes: 40 additions & 0 deletions src/main/resources/templates/laDigitalAssister/parish.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title=#{parish.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 :: county}"></th:block>
<th:block
th:replace="~{fragments/cardHeader :: cardHeader(header=#{parish.header})}"/>
<th:block th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::formContents})}">
<th:block th:ref="formContents">
<th:block
th:replace="~{fragments/inputs/select :: select(helpText=#{parish.subheader}, ariaLabel=#{parish.select}, inputName='parish', content=~{::selectContent})}">
<th:block th:ref="selectContent">
<th:block
th:replace="~{fragments/inputs/selectOptionPlaceholder :: selectOptionPlaceholder(optionText=#{parish.select})}"/>
<th:block th:each="parishEnum : ${T(org.ladocuploader.app.utils.Parish).values()}">
<th:block
th:replace="~{fragments/inputs/selectOption :: selectOption(value=${parishEnum}, optionText=${parishEnum.getDisplayName()})}"/>
</th:block>
</th:block>
</th:block>

<div class="form-card__footer spacing-below-60">
<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 @@ -216,8 +216,16 @@ void socialSecurityFlow(){

@Test
void fullDigitalAssisterFlow() {
// Parish
testPage.navigateToFlowScreen("laDigitalAssister/parish");
testPage.clickContinue();
assertThat(testPage.hasErrorText(message("error.missing-general"))).isTrue();

testPage.selectFromDropdown("parish", "Orleans");
testPage.clickContinue();

// How this works
testPage.navigateToFlowScreen("laDigitalAssister/howThisWorks");
assertThat(testPage.getTitle()).isEqualTo("How this works");
testPage.clickContinue();

// Timeout notice
Expand Down Expand Up @@ -314,13 +322,12 @@ void fullDigitalAssisterFlow() {

testPage.clickButton("This looks correct");

// Household
assertThat(testPage.getTitle()).isEqualTo(message("multiple-person-household.title"));
testPage.clickButton("Yes");

assertThat(testPage.getTitle()).isEqualTo(message("household-signpost.title"));

testPage.clickContinue();
// Household

assertThat(testPage.getTitle()).isEqualTo(message("household-info.title"));
testPage.enter("householdMemberFirstName", "roomy");
Expand Down Expand Up @@ -579,7 +586,8 @@ void fullDigitalAssisterFlow() {
assertThat(testPage.getTitle()).isEqualTo(message("expenses-signpost.title"));
testPage.clickContinue();

assertThat(testPage.getTitle()).isEqualTo(message("home-expenses.title"));;
assertThat(testPage.getTitle()).isEqualTo(message("home-expenses.title"));
;
testPage.clickElementById("householdHomeExpenses-Rent-label");
testPage.clickContinue();

Expand Down