diff --git a/src/main/java/org/mdbenefits/app/inputs/MdBenefitsFlow.java b/src/main/java/org/mdbenefits/app/inputs/MdBenefitsFlow.java index 42a7a582..0c6c3573 100644 --- a/src/main/java/org/mdbenefits/app/inputs/MdBenefitsFlow.java +++ b/src/main/java/org/mdbenefits/app/inputs/MdBenefitsFlow.java @@ -79,6 +79,12 @@ public class MdBenefitsFlow extends FlowInputs { private String mailingAddressState; private String mailingAddressZipCode; + + // Verify Address + private String verifyAddress; + + // Select Address + private String selectAddress; //Contact Info private String phoneNumber; diff --git a/src/main/java/org/mdbenefits/app/submission/actions/ClearNoHomeAddressIfNotSelected.java b/src/main/java/org/mdbenefits/app/submission/actions/ClearNoHomeAddressIfNotSelected.java new file mode 100644 index 00000000..35b4034e --- /dev/null +++ b/src/main/java/org/mdbenefits/app/submission/actions/ClearNoHomeAddressIfNotSelected.java @@ -0,0 +1,32 @@ +package org.mdbenefits.app.submission.actions; + +import formflow.library.config.submission.Action; +import formflow.library.data.FormSubmission; +import formflow.library.data.Submission; +import lombok.extern.slf4j.Slf4j; +import org.mdbenefits.app.utils.HouseholdUtilities; +import org.springframework.stereotype.Component; + +/** + * + */ +@Component +@Slf4j +public class ClearNoHomeAddressIfNotSelected implements Action { + + + /** + * @param formSubmission the form data that was submitted when posting the screen this action corresponds to. + * @param submission the submission object that contains the input data submitted so far for the application. + * + * This action is used to clear the noHomeAddress field from the submission's input data if the screen is submitted with the + * checkbox unchecked. + */ + @Override + public void run(FormSubmission formSubmission, Submission submission) { + if (!formSubmission.getFormData().containsKey("noHomeAddress")) { + submission.getInputData().remove("noHomeAddress"); + } + } + +} diff --git a/src/main/java/org/mdbenefits/app/submission/actions/ClearSameAsHomeAddressIfNotSelected.java b/src/main/java/org/mdbenefits/app/submission/actions/ClearSameAsHomeAddressIfNotSelected.java new file mode 100644 index 00000000..b9f80475 --- /dev/null +++ b/src/main/java/org/mdbenefits/app/submission/actions/ClearSameAsHomeAddressIfNotSelected.java @@ -0,0 +1,30 @@ +package org.mdbenefits.app.submission.actions; + +import formflow.library.config.submission.Action; +import formflow.library.data.FormSubmission; +import formflow.library.data.Submission; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * + */ +@Component +@Slf4j +public class ClearSameAsHomeAddressIfNotSelected implements Action { + + /** + * @param formSubmission the form data that was submitted when posting the screen this action corresponds to. + * @param submission the submission object that contains the input data submitted so far for the application. + * + * This action is used to clear the sameAsHomeAddress field from the submission's input data if the screen is submitted with the + * checkbox unchecked. + */ + @Override + public void run(FormSubmission formSubmission, Submission submission) { + if (!formSubmission.getFormData().containsKey("sameAsHomeAddress")) { + submission.getInputData().remove("sameAsHomeAddress"); + } + } + +} diff --git a/src/main/java/org/mdbenefits/app/submission/actions/MailingAddressSetToHomeAddress.java b/src/main/java/org/mdbenefits/app/submission/actions/MailingAddressSetToHomeAddress.java deleted file mode 100644 index 56d52da6..00000000 --- a/src/main/java/org/mdbenefits/app/submission/actions/MailingAddressSetToHomeAddress.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.mdbenefits.app.submission.actions; - -import formflow.library.config.submission.Action; -import formflow.library.data.Submission; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * - */ -@Component -@Slf4j -public class MailingAddressSetToHomeAddress implements Action { - - @Override - public void run(Submission submission) { - Map inputData = submission.getInputData(); - - if (submission.getInputData().get("sameAsHomeAddress[]").toString().equals("[true]")) { - submission.getInputData().put("mailingAddressZipCode", inputData.get("homeAddressZipCode")); - submission.getInputData().put("mailingAddressState", inputData.get("homeAddressState")); - submission.getInputData().put("mailingAddressCity", inputData.get("homeAddressCity")); - submission.getInputData().put("mailingAddressStreetAddress1", inputData.get("homeAddressStreetAddress1")); - submission.getInputData().put("mailingAddressStreetAddress2", inputData.get("homeAddressStreetAddress2")); - } - } -} diff --git a/src/main/java/org/mdbenefits/app/submission/actions/ValidateHomeAddress.java b/src/main/java/org/mdbenefits/app/submission/actions/ValidateHomeAddress.java index 35acc2b3..483b5115 100644 --- a/src/main/java/org/mdbenefits/app/submission/actions/ValidateHomeAddress.java +++ b/src/main/java/org/mdbenefits/app/submission/actions/ValidateHomeAddress.java @@ -60,11 +60,6 @@ public Map> runValidation(FormSubmission formSubmission, Su } protected boolean homeAddressExpected(Map inputData) { - if (inputData.containsKey(NO_HOME_ADDRESS_INPUT_NAME + "[]")) { - ArrayList noHomeAddress = (ArrayList) inputData.get(NO_HOME_ADDRESS_INPUT_NAME + "[]"); - return noHomeAddress.isEmpty(); - } - return true; + return !inputData.containsKey("noHomeAddress"); } - } diff --git a/src/main/java/org/mdbenefits/app/submission/conditions/NoPermanentAddress.java b/src/main/java/org/mdbenefits/app/submission/conditions/NoPermanentAddress.java index 7d73c639..797dc6ab 100644 --- a/src/main/java/org/mdbenefits/app/submission/conditions/NoPermanentAddress.java +++ b/src/main/java/org/mdbenefits/app/submission/conditions/NoPermanentAddress.java @@ -10,11 +10,6 @@ public class NoPermanentAddress implements Condition { @Override public Boolean run(Submission submission) { - var inputData = submission.getInputData(); - if (inputData.containsKey("noHomeAddress[]")) { - List selections = (List) submission.getInputData().get("noHomeAddress[]"); - return !selections.isEmpty() && selections.get(0).equals("true"); - } - return false; + return submission.getInputData().containsKey("noHomeAddress") && submission.getInputData().get("noHomeAddress").equals("true"); } } diff --git a/src/main/java/org/mdbenefits/app/submission/conditions/SmartySuggestionFound.java b/src/main/java/org/mdbenefits/app/submission/conditions/SmartySuggestionFound.java new file mode 100644 index 00000000..b8b7dbd8 --- /dev/null +++ b/src/main/java/org/mdbenefits/app/submission/conditions/SmartySuggestionFound.java @@ -0,0 +1,17 @@ +package org.mdbenefits.app.submission.conditions; + +import formflow.library.config.submission.Condition; +import formflow.library.data.Submission; +import formflow.library.inputs.FieldNameMarkers; +import org.springframework.stereotype.Component; + +@Component +public class SmartySuggestionFound implements Condition { + + @Override + public Boolean run(Submission submission) { + return submission.getInputData().get(FieldNameMarkers.UNVALIDATED_FIELD_MARKER_VALIDATE_ADDRESS + "mailingAddress") + .equals("true") && submission.getInputData() + .containsKey("mailingAddressStreetAddress1" + FieldNameMarkers.UNVALIDATED_FIELD_MARKER_VALIDATED); + } +} diff --git a/src/main/java/org/mdbenefits/app/submission/conditions/SmartySuggestionNotFound.java b/src/main/java/org/mdbenefits/app/submission/conditions/SmartySuggestionNotFound.java new file mode 100644 index 00000000..2535590a --- /dev/null +++ b/src/main/java/org/mdbenefits/app/submission/conditions/SmartySuggestionNotFound.java @@ -0,0 +1,17 @@ +package org.mdbenefits.app.submission.conditions; + +import formflow.library.config.submission.Condition; +import formflow.library.data.Submission; +import formflow.library.inputs.FieldNameMarkers; +import org.springframework.stereotype.Component; + +@Component +public class SmartySuggestionNotFound implements Condition { + + @Override + public Boolean run(Submission submission) { + return submission.getInputData().get(FieldNameMarkers.UNVALIDATED_FIELD_MARKER_VALIDATE_ADDRESS + "mailingAddress") + .equals("true") && !submission.getInputData() + .containsKey("mailingAddressStreetAddress1" + FieldNameMarkers.UNVALIDATED_FIELD_MARKER_VALIDATED); + } +} diff --git a/src/main/resources/application-test.yaml b/src/main/resources/application-test.yaml index d0f76588..df305d56 100644 --- a/src/main/resources/application-test.yaml +++ b/src/main/resources/application-test.yaml @@ -9,6 +9,9 @@ form-flow: max-file-size: '1' # 1 MB file size limit address-validation: disabled: true + smarty: + auth-id: 'test-id' + auth-token: 'test-token' spring: messages: basename: messages, messages-form-flow diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index fcdc76df..8d333fca 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -32,12 +32,10 @@ form-flow: access_key: ${AWS_ACCESS_KEY} secret_key: ${AWS_SECRET_KEY} cmk: ${AWS_CMK} - address: - disabled: true + address-validation: smarty: - smarty_auth_id: ${SMARTY_AUTH_ID} - smarty_auth_token: ${SMARTY_AUTH_TOKEN} - smarty_url: "https://us-street.api.smartystreets.com/street-address" + auth-id: ${SMARTY_AUTH_ID} + auth-token: ${SMARTY_AUTH_TOKEN} email-client: mailgun: key: ${MAILGUN_KEY:'no-key-set'} diff --git a/src/main/resources/flows-config.yaml b/src/main/resources/flows-config.yaml index d677b07b..1b34a891 100644 --- a/src/main/resources/flows-config.yaml +++ b/src/main/resources/flows-config.yaml @@ -29,6 +29,7 @@ flow: - name: homeAddress homeAddress: crossFieldValidationAction: ValidateHomeAddress + onPostAction: ClearNoHomeAddressIfNotSelected nextScreens: - name: noPermanentAddress condition: NoPermanentAddress @@ -38,12 +39,25 @@ flow: - name: contactInfo mailingAddressNoAddress: crossFieldValidationAction: ValidateMailingAddress - beforeSaveAction: MailingAddressSetToHomeAddress nextScreens: + - name: selectAddress + condition: SmartySuggestionFound + - name: verifyAddress + condition: SmartySuggestionNotFound - name: contactInfo mailingAddress: crossFieldValidationAction: ValidateMailingAddress - beforeSaveAction: MailingAddressSetToHomeAddress + onPostAction: ClearSameAsHomeAddressIfNotSelected + nextScreens: + - name: selectAddress + condition: SmartySuggestionFound + - name: verifyAddress + condition: SmartySuggestionNotFound + - name: contactInfo + verifyAddress: + nextScreens: + - name: contactInfo + selectAddress: nextScreens: - name: contactInfo contactInfo: diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 3b8b796b..9577118c 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -360,6 +360,14 @@ where-to-send-mail.header=Do you have a mailing address to receive mail? where-to-send-mail.subtext=DCFS will need a place to send mail over the next 3 months. This could be a friend or family member\u2019s address or a PO Box. where-to-send-mail.add-address=Add a mailing address where-to-send-mail.continue-without=Continue without it + +# Verify Address +verify-address.title=Confirm your address +verify-address.notice=We couldn't find your address. To make sure you get mail from us, you may edit your address or keep going. + +# Select Address +select-address.notice=We updated the address you entered. If correct, please use the suggested address. + # Contact info contact-info.title=Contact info contact-info.header=How can we send you updates and reminders about your application in the future? diff --git a/src/main/resources/static/assets/js/index.js b/src/main/resources/static/assets/js/index.js index f0f5025f..823171a2 100644 --- a/src/main/resources/static/assets/js/index.js +++ b/src/main/resources/static/assets/js/index.js @@ -1,29 +1,37 @@ -document.addEventListener("DOMContentLoaded", function() { +document.addEventListener("DOMContentLoaded", setUpPage); +window.addEventListener("pageshow", setUpPage); + +function setUpPage() { var sameAsAddressBox = document.getElementById("sameAsHomeAddress-true-label"); + var noPermanentAddress = document.getElementById("noHomeAddress-true-label"); + var mailFields = document.getElementById("hidden-mailing-fields"); + var homeFields = document.getElementById("hidden-home-address-fields"); - if (sameAsAddressBox) { - sameAsAddressBox.addEventListener("click", function() { - var selectedClass = document.getElementsByClassName('is-selected') - var mailFields = document.getElementById("hidden-mailing-fields") - if(selectedClass.length > 0){ - mailFields.style.display="none"; - } else { - mailFields.style.display="block"; - } - }); + // Function to toggle mail fields display + function toggleMailFields() { + var selectedClass = document.getElementsByClassName('is-selected'); + if (mailFields) { + mailFields.style.display = selectedClass.length > 0 ? "none" : "block"; + } } - var noPermanentAddress = document.getElementById("noHomeAddress-true-label"); + // Function to toggle home fields display + function toggleHomeFields() { + var selectedClass = document.getElementsByClassName('is-selected'); + if (homeFields) { + homeFields.style.display = selectedClass.length > 0 ? "none" : "block"; + } + } + + if (sameAsAddressBox) { + sameAsAddressBox.addEventListener("click", toggleMailFields); + } if (noPermanentAddress) { - noPermanentAddress.addEventListener("click", function() { - var selectedClass = document.getElementsByClassName('is-selected') - var mailFields = document.getElementById("hidden-home-address-fields") - if(selectedClass.length > 0){ - mailFields.style.display="none"; - } else { - mailFields.style.display="block"; - } - }); + noPermanentAddress.addEventListener("click", toggleHomeFields); } -}); \ No newline at end of file + + // Check and apply on page load and on page show + toggleMailFields(); + toggleHomeFields(); +} diff --git a/src/main/resources/templates/fragments/inputs/singleCheckbox.html b/src/main/resources/templates/fragments/inputs/singleCheckbox.html new file mode 100644 index 00000000..37f65051 --- /dev/null +++ b/src/main/resources/templates/fragments/inputs/singleCheckbox.html @@ -0,0 +1,42 @@ + +
+ + +
+
\ No newline at end of file diff --git a/src/main/resources/templates/mdBenefitsFlow/homeAddress.html b/src/main/resources/templates/mdBenefitsFlow/homeAddress.html index 2b752c0a..4e0cad02 100644 --- a/src/main/resources/templates/mdBenefitsFlow/homeAddress.html +++ b/src/main/resources/templates/mdBenefitsFlow/homeAddress.html @@ -15,8 +15,8 @@ th:replace="~{fragments/form :: form(action=${formAction}, content=~{::homeAddress})}">
- diff --git a/src/main/resources/templates/mdBenefitsFlow/mailingAddress.html b/src/main/resources/templates/mdBenefitsFlow/mailingAddress.html index 502d1a7e..85e15347 100644 --- a/src/main/resources/templates/mdBenefitsFlow/mailingAddress.html +++ b/src/main/resources/templates/mdBenefitsFlow/mailingAddress.html @@ -12,18 +12,18 @@ - + th:replace="~{fragments/form :: form(action=${formAction}, content=~{::mailingAddress})}"> +
- @@ -41,5 +41,38 @@
+ - \ No newline at end of file + diff --git a/src/main/resources/templates/mdBenefitsFlow/mailingAddressNoAddress.html b/src/main/resources/templates/mdBenefitsFlow/mailingAddressNoAddress.html index 87098356..4a759c6f 100644 --- a/src/main/resources/templates/mdBenefitsFlow/mailingAddressNoAddress.html +++ b/src/main/resources/templates/mdBenefitsFlow/mailingAddressNoAddress.html @@ -18,7 +18,7 @@ diff --git a/src/main/resources/templates/mdBenefitsFlow/selectAddress.html b/src/main/resources/templates/mdBenefitsFlow/selectAddress.html new file mode 100644 index 00000000..56e104c4 --- /dev/null +++ b/src/main/resources/templates/mdBenefitsFlow/selectAddress.html @@ -0,0 +1,28 @@ + + + + +
+
+
+
+
+
+ + + + + +
+
+
+
+ + + diff --git a/src/main/resources/templates/mdBenefitsFlow/verifyAddress.html b/src/main/resources/templates/mdBenefitsFlow/verifyAddress.html new file mode 100644 index 00000000..42ef6383 --- /dev/null +++ b/src/main/resources/templates/mdBenefitsFlow/verifyAddress.html @@ -0,0 +1,31 @@ + + + + +
+
+
+
+
+
+ + + + + +
+
+
+
+ + + diff --git a/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java b/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java index 6cc0f40e..6c1dd293 100644 --- a/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java +++ b/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java @@ -2,8 +2,15 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; +import com.smartystreets.api.exceptions.SmartyException; +import formflow.library.address_validation.AddressValidationService; +import formflow.library.address_validation.ValidatedAddress; +import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.TimeUnit; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; @@ -12,11 +19,15 @@ import org.mdbenefits.app.data.enums.CitizenshipStatus; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; +import org.springframework.boot.test.mock.mockito.MockBean; @Slf4j public class MdBenefitsFlowJourneyTest extends AbstractBasePageTest { protected static final String RANGE_ERROR_MESSAGE = "Make sure to provide a value between 1 and 100."; + + @MockBean + private AddressValidationService addressValidationService; @Test void redirectToMyMDTHINKOnUnsupportedApplicationType() { @@ -496,9 +507,11 @@ void completeFlow() { testPage.enter("mailingAddressZipCode", "12455"); testPage.clickContinue(); - - assertThat(testPage.getTitle()).isEqualTo(message("contact-info.title")); - + + assertThat(testPage.getTitle()).isEqualTo(message("verify-address.title")); + + testPage.clickButton("Use this address"); + assertThat(testPage.getTitle()).isEqualTo(message("contact-info.title")); testPage.clickElementById("remindersMethod-By email-label"); testPage.enter("emailAddress", "mail@mail.com"); @@ -927,7 +940,77 @@ void completeFlow() { // Confirmation page assertThat(testPage.getTitle()).isEqualTo(message("confirmation.title")); } + + @Test + void testValidMailingAddress() throws SmartyException, IOException, InterruptedException { + ValidatedAddress validatedAddress = new ValidatedAddress("mailingAddressStreetAddress1_validated", "mailingAddressStreetAddress2_validated", "mailingAddressCity_validated", "mailingAddressState_validated", "mailingAddressZipCode_validated"); + when(addressValidationService.validate(any())).thenReturn(Map.of("mailingAddress", validatedAddress)); + testPage.navigateToFlowScreen("mdBenefitsFlow/mailingAddress"); + testPage.enter("mailingAddressStreetAddress1", "1445 34th Ave"); + testPage.enter("mailingAddressStreetAddress2", "Apt A"); + testPage.enter("mailingAddressCity", "Oakland"); + testPage.enter("mailingAddressZipCode", "94601"); + testPage.selectFromDropdown("mailingAddressState", "CA - California"); + testPage.clickContinue(); + assertThat(testPage.getTitle()).isEqualTo(message("verify-address.title")); + assertThat(driver.findElements(By.className("notice--warning")).get(0).getText()).isEqualTo(message("select-address.notice")); + } + @Test + void testInvalidMailingAddress() throws SmartyException, IOException, InterruptedException { + when(addressValidationService.validate(any())).thenReturn(Map.of()); + testPage.navigateToFlowScreen("mdBenefitsFlow/mailingAddress"); + testPage.enter("mailingAddressStreetAddress1", "1445 34th Ave"); + testPage.enter("mailingAddressStreetAddress2", "Apt A"); + testPage.enter("mailingAddressCity", "Oakland"); + testPage.enter("mailingAddressZipCode", "94601"); + testPage.selectFromDropdown("mailingAddressState", "CA - California"); + testPage.clickContinue(); + assertThat(testPage.getTitle()).isEqualTo(message("verify-address.title")); + assertThat(driver.findElements(By.className("notice--warning")).get(0).getText()).isEqualTo(message("verify-address.notice")); + } + + @Test + void testMailingAddressIsSameAsHomeAddress() throws SmartyException, IOException, InterruptedException { + ValidatedAddress validatedAddress = new ValidatedAddress("mailingAddressStreetAddress1_validated", "mailingAddressStreetAddress2", "mailingAddressCity", "mailingAddressState", "mailingAddressZipCode"); + when(addressValidationService.validate(any())).thenReturn(Map.of("mailingAddress", validatedAddress)); + testPage.navigateToFlowScreen("mdBenefitsFlow/homeAddress"); + testPage.enter("homeAddressStreetAddress1", "1445 34th Ave"); + testPage.enter("homeAddressStreetAddress2", "Apt A"); + testPage.enter("homeAddressCity", "Oakland"); + testPage.enter("homeAddressZipCode", "94601"); + testPage.selectFromDropdown("homeAddressState", "CA - California"); + testPage.clickContinue(); + testPage.clickElementById("sameAsHomeAddress-true"); + await().atMost(4, TimeUnit.SECONDS).until(() -> testPage.findElementById("mailingAddressStreetAddress1").getAttribute("value").equals("1445 34th Ave")); + assertThat(testPage.findElementById("mailingAddressStreetAddress1").getAttribute("value")).isEqualTo("1445 34th Ave"); + assertThat(testPage.findElementById("mailingAddressStreetAddress2").getAttribute("value")).isEqualTo("Apt A"); + assertThat(testPage.findElementById("mailingAddressCity").getAttribute("value")).isEqualTo("Oakland"); + assertThat(testPage.findElementById("mailingAddressZipCode").getAttribute("value")).isEqualTo("94601"); + assertThat(testPage.findElementById("mailingAddressState").getAttribute("value")).isEqualTo("CA"); + testPage.clickContinue(); + assertThat(testPage.getTitle()).isEqualTo(message("verify-address.title")); + assertThat(driver.findElements(By.className("notice--warning")).get(0).getText()).isEqualTo(message("select-address.notice")); + } + + @Test + void shouldValidateMailingAddressWhenNoHomeAddress() throws SmartyException, IOException, InterruptedException { + ValidatedAddress validatedAddress = new ValidatedAddress("mailingAddressStreetAddress1_validated", "mailingAddressStreetAddress2", "mailingAddressCity", "mailingAddressState", "mailingAddressZipCode"); + when(addressValidationService.validate(any())).thenReturn(Map.of("mailingAddress", validatedAddress)); + testPage.navigateToFlowScreen("mdBenefitsFlow/homeAddress"); + testPage.clickElementById("noHomeAddress-true"); + testPage.clickContinue(); + assertThat(testPage.getTitle()).isEqualTo(message("where-to-send-mail.title")); + testPage.clickButton("Add a mailing address"); + testPage.enter("mailingAddressStreetAddress1", "1445 34th Ave"); + testPage.enter("mailingAddressStreetAddress2", "Apt A"); + testPage.enter("mailingAddressCity", "Oakland"); + testPage.enter("mailingAddressZipCode", "94601"); + testPage.selectFromDropdown("mailingAddressState", "CA - California"); + testPage.clickContinue(); + assertThat(testPage.getTitle()).isEqualTo(message("verify-address.title")); + assertThat(driver.findElements(By.className("notice--warning")).get(0).getText()).isEqualTo(message("select-address.notice")); + } void loadUserPersonalData() { testPage.navigateToFlowScreen("mdBenefitsFlow/personalInfo"); diff --git a/src/test/java/org/mdbenefits/app/submission/actions/ValidateHomeAddressTest.java b/src/test/java/org/mdbenefits/app/submission/actions/ValidateHomeAddressTest.java index ba64cb9a..9667ec98 100644 --- a/src/test/java/org/mdbenefits/app/submission/actions/ValidateHomeAddressTest.java +++ b/src/test/java/org/mdbenefits/app/submission/actions/ValidateHomeAddressTest.java @@ -67,7 +67,7 @@ public void testAddressBlankDoesRaiseError() { @Test public void testAddressBlankDoesNotRaiseErrorWhenUnhoused() { FormSubmission form = new FormSubmission(Map.of( - "noHomeAddress[]", new ArrayList<>(List.of("true")), + "noHomeAddress", "true", ADDRESS_1_INPUT_NAME, BLANK_VALUE, CITY_INPUT_NAME, BLANK_VALUE, STATE_INPUT_NAME, BLANK_VALUE,