Skip to content
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

LG-14175: Expire EIPP enrollments in job #11085

Merged
merged 6 commits into from
Aug 16, 2024

Conversation

eileen-nava
Copy link
Contributor

@eileen-nava eileen-nava commented Aug 14, 2024

🎫 Ticket

LG-14175: Expire EIPP Enrollments in the Job

Related to the first AC in the ticket, here is the slack conversation where David and I discussed that the error message for expired ID-IPP enrollments and for expired EIPP enrollments have the same message formats.

🛠 Summary of changes

  • This didn't require any actual changes to the GetUspsProofingResultsJob, because the check that expires ID-IPP enrollments also expires EIPP enrollments.
  • I added specs to ensure that EIPP enrollments are expired.
  • I made some of the naming for ID-IPP fixtures and specs more precise.

📜 Testing Plan

  • Come in from Sinatra. Pick Enhanced In-Person Proofing.
  • Create an Enhanced IPP enrollment
  • Once on the Verify view (/verify/in_person/ready_to_verify), open a new terminal and run: rails c
  • In rails console, grab the enrollment: e = InPersonEnrollment.last
    Run the below in rails console
e.days_to_due_date
=> 6
> e.update!(enrollment_established_at: e.created_at - 8.days)
e.reload
> e.days_to_due_date
=> -1
  • Wait for the GetUspsProofingResultsJob to run on the half hour
  • Confirm that the user would receive an email that says "The deadline to verify your identity in person has passed". (I included a screenshot of the email below.)
Email:

Screenshot 2024-08-15 at 16 00 25

  • Next, reload the enrollment, then check the enrollment status and confirm it is expired
e.reload
e.status 
==> “expired”

@eileen-nava eileen-nava requested review from a team and gina-yamada August 14, 2024 20:58
def request_proofing_results(_enrollment)
JSON.parse(Fixtures.request_passed_proofing_results_response)
def request_proofing_results(enrollment)
if enrollment.days_to_due_date.negative? && enrollment.enhanced_ipp?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to support manual testing. Feedback is welcome! Making the manual testing plan took me longer than anticipated.

@@ -1600,6 +1600,57 @@
enhanced_ipp_enrollment: true,
)
end

context 'when an enrollment expires' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are looking good! 👍🏻

@gina-yamada
Copy link
Contributor

gina-yamada commented Aug 15, 2024

I dug into this more. David showed the message in AWS. That is the response message we get from USPS. I confirmed you are correct, no change to expire EIPP enrollments is needed.

I actually received an email today that "The deadline to verify your identity in person has passed". I compared the email address I used and found the enrollment. It was for EIPP. The enrollment was created 7 days ago- so yes, EIPP enrollments are getting expired (currently in staging). I looked at another recently expired email and found the same outcome. The message is the same and EIPP enrollments are being expired in the job in staging.

Screenshot 2024-08-15 at 2 14 44 PM

Screenshot 2024-08-15 at 2 12 23 PM

Copy link
Contributor

@shanechesnutt-ft shanechesnutt-ft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me I will run the test plan and approve tomorrow

@@ -83,8 +83,12 @@ def self.request_passed_proofing_secondary_id_type_results_response_ial_2
)
end

def self.request_expired_proofing_results_response
load_response_fixture('request_expired_proofing_results_response.json')
def self.request_expired_enhanced_ipp_results_response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed- no more instances of request_expired_proofing_results_response found

Copy link
Contributor

@shanechesnutt-ft shanechesnutt-ft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran through the test plan and everything looks good to me!

@eileen-nava eileen-nava merged commit 12da96c into main Aug 16, 2024
2 checks passed
@eileen-nava eileen-nava deleted the em/14175-expire-eipp-enrollments-in-job branch August 16, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants