-
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: error templates for in-person enrollment #2382
Conversation
f599067
to
c3292aa
Compare
d98a600
to
e880258
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
e880258
to
4073ec5
Compare
this ensures the usertools section has what it needs to show up
add more assertions for system error cases
add more assertions for server error cases. add missing assertion for success test.
e6af3db
to
8ef7dd1
Compare
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.
Looks good to me! I tested by simulating the errors and everything worked as expected 👍
Looking at this 👀 |
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.
I simulated all the errors locally and this looks great.
Minor suggestion, but non-blocking.
@@ -133,22 +136,38 @@ def enrollment(request): | |||
|
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.
commenting on the line just below the line I'm talking about, since it isn't available for comment
return TemplateResponse(request, "in_person/enrollment.html", context)
Minor suggestion, now that an in_person/templates/in_person/enrollment/
directory exists, maybe we should move this enrollment.html
template in there as index.html
.
Closes #2345
This PR implements the templates for in-person error pages and also adds the call to send a Sentry notification for those errors.
Testing locally
You can view the pages by going directly to the URLs:
in_person/enrollment/error
in_person/error
in_person/enrollment/error/reenrollment
in_person/enrollment/retry
If you want to test the actual view redirecting logic, you'll need to simulate the errors.
You can simulate errors by changing the returned
Status
and exception on this line:benefits/benefits/in_person/views.py
Line 78 in e6af3db
For re-enrollment errors, you also need the dates to be populated, so:
session.enrollment_expiry()
e.g.Don't forget that there are also the
onVerificationFailure
andonError
callback functions in the front-end that will redirect to error pages as well.Screenshots
Expand
System error
Server error
Re-enrollment error
User enrollment error