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-14390 No longer cancel pending enrollments on logout from cancel page #11211

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

shanechesnutt-ft
Copy link
Contributor

@shanechesnutt-ft shanechesnutt-ft commented Sep 6, 2024

changelog: Internal, In-person proofing, The "Exit Login.gov" button on the cancel page from the barcode step will no longer cancel user's pending enrollments.

🎫 Ticket

Link to the relevant ticket:
LG-14390

🛠 Summary of changes

The "Exit Login.gov" button on the cancel page from the barcode step will no longer cancel user's pending enrollments.

📜 Testing Plan

Scenario: Barcode Page: "exit login.gov" button from cancel page

  • Login through the oidc sinatra application selecting the Enhanced In-person Proofing level of service
  • Use an existing account or create an account
  • Follow the flow for creating an ID-IPP enrollment until reaching the barcode page
  • From the barcode page click on the "cancel your barcode" link at the bottom of the page
  • From the cancel page click on the "Exit Login.gov" button
  • Login from oidc sinatra application
  • Verify you still land on the barcode page

Scenario: During Identity Verification: "exit login.gov" button from cancel page

  • Login through the oidc sinatra application selecting the Enhanced In-person Proofing level of service
  • Use an existing account or create an account
  • Follow the flow for creating an ID-IPP enrollment
  • During the flow click on the "cancel" link before a barcode is created
  • From the cancel page click on the "Exit Login.gov" button
  • Login from oidc sinatra application
  • Verify you land on the welcome page /verify/welcome

@shanechesnutt-ft shanechesnutt-ft marked this pull request as ready for review September 6, 2024 20:50
return if !IdentityConfig.store.in_person_proofing_enabled
current_user.pending_in_person_enrollment&.update(status: :cancelled)
UspsInPersonProofing::EnrollmentHelper.
cancel_stale_establishing_enrollments_for_user(current_user)
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like you didn't need to check where the user came from (ie: Ready to Verify) after all because of this function. Before entering your password, the enrollment is establishing). Only after entering your password (before going to the PO) would the enrollment be pending. (All other's status- this function does not support ie: passed, failed, expired, and cancelled) so that is why you renamed it.

Also, method cancel_in_person_enrollment_if_exists is a dup - inside sessions_controller so further more I support this name change- each method is not exactly the same. Without testing it- I think the method in sessions_controller supports cancel your barcode. I will test on Monday to confirm.

after :build do |user|
create(:in_person_enrollment, :establishing, user: user)
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! 💯

@gina-yamada
Copy link
Contributor

gina-yamada commented Sep 6, 2024

Your code changes look good! I have not manually tested this. I will do so next week.

@gina-yamada gina-yamada self-requested a review September 9, 2024 13:54
Copy link
Contributor

@gina-yamada gina-yamada left a comment

Choose a reason for hiding this comment

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

Tested locally! Working as I'd expect

Copy link
Member

@jennyverdeyen jennyverdeyen left a comment

Choose a reason for hiding this comment

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

Successfully completed test plan steps, code looks good! LGTM!

changelog: Internal, In-person proofing, The "Exit Login.gov" button on
the cancel page from the barcode step will no longer cancel user's
pending enrollments.
@shanechesnutt-ft shanechesnutt-ft merged commit 985f922 into main Sep 9, 2024
2 checks passed
@shanechesnutt-ft shanechesnutt-ft deleted the sc/LG-14390 branch September 9, 2024 14:33
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.

3 participants