-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat: CalFresh enrollment success with expiration #1988
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
b265454
to
531a793
Compare
531a793
to
4726c9a
Compare
I think we can actually merge this in, as it won't be activated for flows until we get back the expiration logic for enrollment (after #2052). And it doesn't have any conflicts with those changes, it just changed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test this locally, I:
- (temporarily) merged
dev
into my localfeat/calfresh-enrollment-success
branch so that I have the revert from Revert "Feat: enrollments can expire (#1989)" #2052 - edited my Courtesy Card eligibility type to support expiration
- ran through the full Courtesy Card flow
I then see the success screen:
The expiration date doesn't show because currently there isn't any code that sets the enrollment_expiry
session variable, and that's ok because this screen won't be accessible until after #2052 is reverted.
Hard-coding in an enrollment_expiry
to test date formatting
Just to test the date-formatting, I hard-coded a value in for expiry
in the session.enrollment_expiry
function:
# expiry = request.session.get(_ENROLLMENT_EXP)
expiry = datetime(2024, 12, 1).timestamp()
English:
@thekaveman Do you know how the date formatting gets set? I'm not sure why I'm getting an abbreviated month in English
We're using the DATE_FORMAT = "N j, Y" Broken down as (from the table here):
It looks like for
I think each language has its own default format string, so changing this one should only affect English. |
with the TIME_ZONE='America/Los_Angeles' setting, Django will display the expiration date in that time zone Django automatically formats the date according to the user's locale (e.g. 'en' or 'es') turned off djlint around this section because the different <p> tags in branches of the {% if %} block was throwing errors and causing weird formatting"
align with the 8-point grid and updated comps in Figma
4726c9a
to
cb42683
Compare
@angela-tran I rebased on I introduced custom date formats per locale and now we get the expected full-month formatting for both English and Spanish: |
Nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coverage report is flagging that the formats.py
files aren't tested... should we do something about that?
adding a few init files here to get test discovery to work with the new locale directories
Good call on this! I added tests for each in 9cdacdc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Just noticed the infra pipeline failure... looking into it |
|
Closes #1919
Todo
Questions sent to @srhhnry in Figma
feat/expiry-date
to de-dupe theTIME_ZONE
setting changeHow to test
Screenshot - English
Screenshot - Spanish