Skip to content

Commit

Permalink
feat: add local fixtures for CalFresh and selection templates
Browse files Browse the repository at this point in the history
the CalFresh objects were added to the fixtures in a way similar to how
they would be added to the database via the admin interface.

namely, they were added as object that have an incremented ID in their
respective tables.
  • Loading branch information
angela-tran committed Mar 15, 2024
1 parent 74e6f3a commit 816a324
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 2 deletions.
33 changes: 31 additions & 2 deletions benefits/core/migrations/local_fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@
"group_id": "group123"
}
},
{
"model": "core.eligibilitytype",
"pk": 7,
"fields": {
"name": "calfresh",
"label": "CalFreh",
"group_id": "group123"
}
},
{
"model": "core.eligibilityverifier",
"pk": 1,
Expand Down Expand Up @@ -237,6 +246,26 @@
"form_class": "benefits.eligibility.forms.SBMTDMobilityPass"
}
},
{
"model": "core.eligibilityverifier",
"pk": 7,
"fields": {
"name": "CalFresh oauth claims via Login.gov",
"active": true,
"api_url": null,
"api_auth_header": null,
"api_auth_key_secret_name": null,
"eligibility_type": 7,
"public_key": null,
"jwe_cek_enc": null,
"jwe_encryption_alg": null,
"jws_signing_alg": null,
"auth_provider": 1,
"selection_label_template": "eligibility/includes/selection-label--calfresh.html",
"start_template": "",
"form_class": null
}
},
{
"model": "core.paymentprocessor",
"pk": 1,
Expand Down Expand Up @@ -299,8 +328,8 @@
"eligibility_index_template": "eligibility/index--mst.html",
"enrollment_success_template": "enrollment/success--mst.html",
"help_template": "core/includes/help--mst.html",
"eligibility_types": [1, 2, 3],
"eligibility_verifiers": [1, 2, 3]
"eligibility_types": [1, 7, 2, 3],
"eligibility_verifiers": [1, 7, 2, 3]
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% extends "core/includes/modal.html" %}
{% load i18n %}
{% load static %}

{% block modal-content %}
<h2 class="me-4 me-md-0">{% translate "Learn more about the transit benefit for CalFresh Cardholders" %}</h2>
<div class="row">
<h3 class="pt-4">{% translate "How do I know if I'm eligible for the transit benefit for CalFresh Cardholders?" %}</h3>
<p class="pt-1">
{% blocktranslate trimmed %}
We verify your eligibility as a CalFresh Cardholder by confirming you have received funds in your
CalFresh account at any point in the last three months. This means you are eligible for a transit
benefit even if you did not receive funds in your CalFresh account this month or last month.
{% endblocktranslate %}
</p>

<h3 class="pt-4">{% translate "Will this transit benefit change my CalFresh account?" %}</h3>
<p class="pt-1">
{% blocktranslate trimmed %}
No. Your monthly CalFresh allotment will not change.
{% endblocktranslate %}
</p>
<h3 class="pt-4">{% translate "Do I need my Golden State Advantage card to enroll?" %}</h3>
<p class="pt-1">
{% blocktranslate trimmed %}
No, you do not need your physical EBT card to enroll. We use information from Login.gov and the California
Department of Social Services to enroll you in the benefit.
{% endblocktranslate %}
</p>
<h3 class="pt-4">{% translate "Can I use my Golden State Advantage card to pay for transit rides?" %}</h3>
<p class="pt-1">
{% blocktranslate trimmed %}
No. You can not use your EBT or P-EBT card to pay for public transportation. When you tap to ride, use your personal
contactless debit or credit card to pay for public transportation.
{% endblocktranslate %}
</p>

<p class="pt-4 d-block d-sm-none">
<a href="#" data-bs-dismiss="modal" aria-label="Close">{% translate "Go back" %}</a>
</p>
</div>
{% endblock modal-content %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends "eligibility/includes/selection-label.html" %}
{% load i18n %}

{% block label %}
{% translate "CalFresh Cardholder" %}
{% endblock label %}

{% block description %}
{% translate "You must have" %}
{% comment %} modal-trigger needs to be refactored to support translating the text {% endcomment %}
{% include "core/includes/modal-trigger.html" with modal="modal--calfresh" text="recently received CalFresh funds" period=True %}
{% include "eligibility/includes/modal--calfresh.html" with id="modal--calfresh" size="modal-lg" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}

{% translate "This transit benefit will remain active for one year. You will need to verify your identity with" %}
{% include "core/includes/modal-trigger.html" with classes="border-0 bg-transparent p-0 login" modal="modal--login-gov-veteran" login=True period=True %}
{% include "eligibility/includes/modal--login-gov-help.html" with id="modal--login-gov-calfresh" size="modal-lg" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}

{% endblock description %}

0 comments on commit 816a324

Please sign in to comment.