Skip to content

Commit

Permalink
[CCAP-685] Removing SDA15 feature flag (#1205)
Browse files Browse the repository at this point in the history
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
  • Loading branch information
cram-cfa and transifex-integration[bot] authored Feb 26, 2025
1 parent 90fffc9 commit 3b1625b
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 167 deletions.
3 changes: 1 addition & 2 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ CCMS_API_PASSWORD=
#######################################################################################
# Feature flags
#######################################################################################
ALLOW_PROVIDER_REGISTRATION_FLOW=true
ENABLE_SDA15_PROVIDERS=true
ALLOW_PROVIDER_REGISTRATION_FLOW=true
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ public class ValidateZipCode implements Action {
private final String INPUT_NAME = "applicationZipCode";
private static final String OUTPUT_NAME = "hasValidZipCode";

@Value("${il-gcc.enable-sda15-providers}")
boolean enableSDA15Providers;


@Override
public Map<String, List<String>> runValidation(FormSubmission formSubmission, Submission submission) {
Locale locale = LocaleContextHolder.getLocale();
Expand All @@ -41,7 +37,7 @@ public Map<String, List<String>> runValidation(FormSubmission formSubmission, Su
List.of(messageSource.getMessage("errors.provide-zip", null, locale)));
} else {
submission.getInputData()
.put(OUTPUT_NAME, String.valueOf(ZipcodeOption.isValidZipcodeOption(providedZipCode, enableSDA15Providers)));
.put(OUTPUT_NAME, String.valueOf(ZipcodeOption.isValidZipcodeOption(providedZipCode)));
}

return errorMessages;
Expand Down
29 changes: 12 additions & 17 deletions src/main/java/org/ilgcc/app/utils/CountyOptionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class CountyOptionUtils {
@Value("${il-gcc.enable-sda15-providers}")
boolean enableSDA15Providers;

private static List<CountyOption> countyOptions;

Expand All @@ -42,20 +39,18 @@ public void init() {
unsortedCountyOptions.add(MCHENRY);
unsortedCountyOptions.add(OGLE);
unsortedCountyOptions.add(WHITESIDE);
if (enableSDA15Providers) {
unsortedCountyOptions.add(MARION);
unsortedCountyOptions.add(JEFFERSON);
unsortedCountyOptions.add(EFFINGHAM);
unsortedCountyOptions.add(FAYETTE);
unsortedCountyOptions.add(CRAWFORD);
unsortedCountyOptions.add(WAYNE);
unsortedCountyOptions.add(RICHLAND);
unsortedCountyOptions.add(LAWRENCE);
unsortedCountyOptions.add(CLAY);
unsortedCountyOptions.add(WABASH);
unsortedCountyOptions.add(JASPER);
unsortedCountyOptions.add(EDWARDS);
}
unsortedCountyOptions.add(MARION);
unsortedCountyOptions.add(JEFFERSON);
unsortedCountyOptions.add(EFFINGHAM);
unsortedCountyOptions.add(FAYETTE);
unsortedCountyOptions.add(CRAWFORD);
unsortedCountyOptions.add(WAYNE);
unsortedCountyOptions.add(RICHLAND);
unsortedCountyOptions.add(LAWRENCE);
unsortedCountyOptions.add(CLAY);
unsortedCountyOptions.add(WABASH);
unsortedCountyOptions.add(JASPER);
unsortedCountyOptions.add(EDWARDS);
countyOptions = unsortedCountyOptions.stream().sorted(Comparator.comparing(CountyOption::getLabel)).toList();
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/ilgcc/app/utils/ZipcodeOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ public String getHelpText() {
return null;
}

public static Boolean isValidZipcodeOption(String zipcode, Boolean includeSDA15) {
public static Boolean isValidZipcodeOption(String zipcode) {
return Arrays.stream(ZipcodeOption.values()).filter(zip -> zip.active)
.filter(zip -> includeSDA15 ? zip.caseloadCode.equals("BB") || zip.caseloadCode.equals("QQ")
: zip.caseloadCode.equals("BB")).anyMatch(zip -> zip.value.equals(zipcode));
.filter(zip -> zip.caseloadCode.equals("BB") || zip.caseloadCode.equals("QQ")
).anyMatch(zip -> zip.value.equals(zipcode));
}

public static Optional<String> getCaseLoadCodeByZipCode(String zipcode) {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ il-gcc:
generate-short-links: ${GENERATE_SHORT_LINKS_FLAG:false}
enable-emails: ${ENABLE_EMAILS_FLAG:true}
allow-provider-registration-flow: ${ALLOW_PROVIDER_REGISTRATION_FLOW:false}
enable-sda15-providers: ${ENABLE_SDA15_PROVIDERS:false}
dts:
url: ${DOCUMENT_TRANSFER_SERVICE_URL}
consumer-id: ${DOCUMENT_TRANSFER_SERVICE_CONSUMER_ID}
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ errors.general-banner-warning=<strong>Sorry,</strong> You've either skipped a re
errors.general-title=Check your answers
#
index.title=Get help paying for child care.
index.notice-html-sda2=Currently, this site is available for families applying in 6 counties: Carroll, DeKalb, Lee, McHenry, Ogle, and Whiteside. Visit our <a data-mixpanel="faq-questions-oneline-application" href="/faq#questions-about-the-online-application" target="_blank" rel="noopener noreferrer">FAQs</a> to learn more.
index.notice-html-sda15=This site is available to families living in the following 18 counties in Illinois: Carroll, Clay, Crawford, DeKalb, Edwards, Effingham, Fayette, Jasper, Jefferson, Lawrence, Lee, Marion, McHenry, Ogle, Richland, Wabash, Wayne, Whiteside. Visit our <a data-mixpanel="faq-questions-oneline-application" href="/faq#questions-about-the-online-application" target="_blank" rel="noopener noreferrer">FAQs</a> to learn more.
index.apply-for-benefits=Apply for Child Care Assistance online in 20 minutes.
index.apply-now=Apply now
Expand Down Expand Up @@ -1089,8 +1088,6 @@ faq.questions-about-the-online-application.header=Questions about the online app
faq.questions-about-the-online-application.what-is-get-child-care-il-question=What is GetChildCareIL.org?
faq.questions-about-the-online-application.what-is-get-child-care-il-answer=It's a new website from the state of Illinois where families can apply for Child Care Assistance online. Families can use a smartphone, tablet, or computer to access this website.
faq.questions-about-the-online-application.who-can-use-the-online-application-question=Who can use the online application?
faq.questions-about-the-online-application.starting-in-january-2025=Currently, this site is available for families applying in 6 counties:<ul class="list--bulleted"><li>Carroll County</li><li>DeKalb County</li><li>Lee County</li><li>McHenry County</li><li>Ogle County</li><li>Whiteside County</li></ul>
faq.questions-about-the-online-application.the-online-application-2025=The online application will be available for more families and providers through 2025.
faq.questions-about-the-online-application.sda15-expansion.counties=Currently, this site is available for families applying in 18 counties: <ul class="list--bulleted"><li>Carroll County</li><li>Clay County</li><li>Crawford County</li><li>DeKalb County</li><li>Edwards County</li><li>Effingham County</li><li>Fayette County</li><li>Jasper County</li><li>Jefferson County</li><li>Lawrence County</li><li>Lee County</li><li>Marion County</li><li>McHenry County</li><li>Ogle County</li><li>Richland County</li><li>Wabash County</li><li>Wayne County</li><li>Whiteside County</li></ul> <p>The online application will be available for more families and providers through 2025.</p>
faq.questions-about-the-online-application.what-can-i-do=I need help with child care now. What can I do?
faq.questions-about-the-online-application.what-can-i-do.please-contact=Contact your local Child Care Resource and Referral Agency or (CCR&R) directly. This is the agency that will process your Child Care Assistance application.
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ errors.general-banner-warning=<strong>Lo sentimos,</strong> ha omitido una pregu
errors.general-title=Revise sus respuestas
#
index.title=Reciba ayuda para pagar el cuidado de niños.
index.notice-html-sda2=Actualmente, este sitio está disponible para familias que solicitan apoyo en 6 condados: Carroll, DeKalb, Lee, McHenry, Ogle y Whiteside. Visite <a data-mixpanel="faq-questions-oneline-application" href="/faq#questions-about-the-online-application" target="_blank" rel="noopener noreferrer">nuestras preguntas frecuentes</a> para obtener más información.
index.notice-html-sda15=Este sitio está disponible para familias que viven en los siguientes 18 condados en Illinois: Carroll, Clay, Crawford, DeKalb, Edwards, Effingham, Fayette, Jasper, Jefferson, Lawrence, Lee, Marion, McHenry, Ogle, Richland, Wabash, Wayne y Whiteside. Visite <a data-mixpanel="faq-questions-oneline-application" href="/faq#questions-about-the-online-application" target="_blank" rel="noopener noreferrer">nuestras preguntas frecuentes</a> para obtener más información.
index.apply-for-benefits=Termine una solicitud en menos de 20 minutos.
index.apply-now=Aplique ahora
Expand Down Expand Up @@ -1089,8 +1088,6 @@ faq.questions-about-the-online-application.header=Preguntas sobre la solicitud e
faq.questions-about-the-online-application.what-is-get-child-care-il-question=¿Qué es GetChildCareIL.org?
faq.questions-about-the-online-application.what-is-get-child-care-il-answer=Es un nuevo sitio web del estado de Illinois donde las familias pueden solicitar asistencia para el cuidado de niños en línea. Las familias pueden usar un teléfono inteligente, una tableta o una computadora para acceder a este sitio web.
faq.questions-about-the-online-application.who-can-use-the-online-application-question=¿Quién puede usar la solicitud en línea?
faq.questions-about-the-online-application.starting-in-january-2025=Actualmente, este sitio está disponible para familias que solicitan apoyo en 6 condados:<ul class="list--bulleted"><li>Condado de Carroll</li><li>Condado de DeKalb</li><li>Condado de Lee</li><li>Condado de McHenry</li><li>Condado de Ogle</li><li>Condado de Whiteside</li></ul>
faq.questions-about-the-online-application.the-online-application-2025=La solicitud en línea estará disponible para más familias y proveedores a lo largo de 2025.
faq.questions-about-the-online-application.sda15-expansion.counties=Actualmente, este sitio está disponible para familias que solicitan apoyo en 18 condados: <ul class="list--bulleted"><li>Condado de Carroll</li><li>Condado de Clay</li><li>Condado de Crawford</li><li>Condado de DeKalb</li><li>Condado de Edwards</li><li>Condado de Effingham</li><li>Condado de Fayette</li><li>Condado de Jasper</li><li>Condado de Jefferson</li><li>Condado de Lawrence</li><li>Condado de Lee</li><li>Condado de Marion</li><li>Condado de McHenry</li><li>Condado de Ogle</li><li>Condado de Richland</li><li>Condado de Wabash</li><li>Condado de Wayne</li><li>Condado de Whiteside</li></ul>p>La solicitud en línea estará disponible para más familias y proveedores a lo largo de 2025.</p>
faq.questions-about-the-online-application.what-can-i-do=Necesito cuidado para niños ya. ¿Qué puedo hacer?
faq.questions-about-the-online-application.what-can-i-do.please-contact=Por favor, comuníquese directamente con su Agencia Local de Recursos y Referencias de Cuidado de niños (CCR&R). Esta es la agencia que procesa su solicitud de cuidado de niños.
Expand Down
8 changes: 1 addition & 7 deletions src/main/resources/templates/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,7 @@ <h2 th:id="questions-about-the-online-application" class="h2" th:text="#{faq.que
<h3 class="h3" th:text="#{faq.questions-about-the-online-application.what-is-get-child-care-il-question}"></h3>
<p th:text="#{faq.questions-about-the-online-application.what-is-get-child-care-il-answer}"></p>
<h3 class="h3" th:text="#{faq.questions-about-the-online-application.who-can-use-the-online-application-question}"></h3>
<th:block th:unless="${@environment.getProperty('il-gcc.enable-sda15-providers') == 'true'}">
<p th:utext="#{faq.questions-about-the-online-application.starting-in-january-2025}"></p>
<p th:text="#{faq.questions-about-the-online-application.the-online-application-2025}"></p>
</th:block>
<th:block th:if="${@environment.getProperty('il-gcc.enable-sda15-providers') == 'true'}">
<p th:utext="#{faq.questions-about-the-online-application.sda15-expansion.counties}"></p>
</th:block>
<p th:utext="#{faq.questions-about-the-online-application.sda15-expansion.counties}"></p>

<h3 class="h3" th:text="#{faq.questions-about-the-online-application.what-can-i-do}"></h3>
<p th:text="#{faq.questions-about-the-online-application.what-can-i-do.please-contact}"></p>
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<section class="slab slab--light-purple slab--hero">
<div class="grid">
<div class="notice--warning spacing-below-35">
<p th:unless="${@environment.getProperty('il-gcc.enable-sda15-providers') == 'true'}" th:utext="'<span aria-hidden=true>🌱 </span>' + ${#messages.msg('index.notice-html-sda2')}"></p>
<p th:if="${@environment.getProperty('il-gcc.enable-sda15-providers') == 'true'}" th:utext="'<span aria-hidden=true>🌱 </span>' + ${#messages.msg('index.notice-html-sda15')}"></p>
<p th:utext="'<span aria-hidden=true>🌱 </span>' + ${#messages.msg('index.notice-html-sda15')}"></p>
</div>
<div class="tracking-home-language-links width-one-half">
<h1 class="spacing-below-35 spacing-above-5" th:text="#{index.title}"></h1>
Expand Down
18 changes: 0 additions & 18 deletions src/test/java/org/ilgcc/app/submission/actions/CountyUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,16 @@

import static org.assertj.core.api.Assertions.assertThat;

import formflow.library.data.FormSubmission;
import formflow.library.data.Submission;
import jakarta.annotation.Resource;
import java.util.Map;
import org.ilgcc.app.IlGCCApplication;
import org.ilgcc.app.utils.CountyOptionUtils;
import org.ilgcc.app.utils.SubmissionTestBuilder;
import org.ilgcc.app.utils.ZipcodeOption;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.support.TestPropertySourceUtils;
import org.springframework.util.Assert;

@SpringBootTest(
classes = IlGCCApplication.class
)

@TestPropertySource(properties = {"il-gcc.enable-sda15-providers=true"})
@ActiveProfiles("test")
public class CountyUtilTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.MessageSource;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;

@SpringBootTest(
classes = IlGCCApplication.class
)
@TestPropertySource(properties = {"il-gcc.enable-sda15-providers=false"})
@ActiveProfiles("test")
class ValidateZipCodeTest {

Expand All @@ -45,50 +43,51 @@ public void inactiveZipCodeReturnsFalse() {
}

@Test
public void sda15ZipCodeReturnsFalse() {
public void activeZipCodeReturnsTrue() {
Submission submission = new SubmissionTestBuilder()
.build();

Map<String, Object> formData = Map.of(
"applicationZipCode", ZipcodeOption.zip_62811.getValue()
"applicationZipCode", ZipcodeOption.zip_60051.getValue()
);

FormSubmission formSubmission = new FormSubmission(formData);

action.runValidation(formSubmission, submission);

assertThat(submission.getInputData().get("hasValidZipCode")).isEqualTo("false");
assertThat(submission.getInputData().get("hasValidZipCode")).isEqualTo("true");
}

@Test
public void activeZipCodeReturnsTrue() {
public void outofStateZipCodeReturnsFalse() {
Submission submission = new SubmissionTestBuilder()
.build();

Map<String, Object> formData = Map.of(
"applicationZipCode", ZipcodeOption.zip_60051.getValue()
"applicationZipCode", "94114"
);

FormSubmission formSubmission = new FormSubmission(formData);

action.runValidation(formSubmission, submission);

assertThat(submission.getInputData().get("hasValidZipCode")).isEqualTo("true");
assertThat(submission.getInputData().get("hasValidZipCode")).isEqualTo("false");
}

@Test
public void outofStateZipCodeReturnsFalse() {
public void sda15ZipCodeReturnsTrue() {
Submission submission = new SubmissionTestBuilder()
.build();

Map<String, Object> formData = Map.of(
"applicationZipCode", "94114"
"applicationZipCode", ZipcodeOption.zip_62811.getValue()
);

FormSubmission formSubmission = new FormSubmission(formData);


action.runValidation(formSubmission, submission);

assertThat(submission.getInputData().get("hasValidZipCode")).isEqualTo("false");
assertThat(submission.getInputData().get("hasValidZipCode")).isEqualTo("true");
}
}

This file was deleted.

0 comments on commit 3b1625b

Please sign in to comment.