Skip to content

LG-11588: Don't tell users to get another letter when they can't#10534

Merged
matthinz merged 5 commits intomainfrom
matthinz/11588-dont-mock-users
May 1, 2024
Merged

LG-11588: Don't tell users to get another letter when they can't#10534
matthinz merged 5 commits intomainfrom
matthinz/11588-dont-mock-users

Conversation

@matthinz
Copy link
Contributor

@matthinz matthinz commented Apr 30, 2024

🎫 Ticket

Link to the relevant ticket:
LG-11588

🛠 Summary of changes

When users enter an incorrect verification code in the verify by mail code, the error message suggests that they "Please request another letter for a new code."

This PR updates that message to remove that suggestion if the user cannot currently request another GPO letter (either because their most recent request was too recent or they have requested the maximum number of letters). The message is unchanged for users who are still able to request letters.

This change involved adding new translation keys, using adapted versions of the text we already had:

Language Text
English Your verification code has expired. Please request another letter for a new code.
Spanish Tu código de verificación ha caducado. Vuelve a solicitar otra carta para recibir un nuevo código.
French Votre code de vérification a expiré. Veuillez solliciter une autre lettre afin d’obtenir un nouveau code.
Chinese 你的验证码已过期。请要求另外一封信来得到新代码。

📜 Testing Plan

First, configure your application.yml to test the "must wait 1 day" condition:

usps_confirmation_max_days: -1                             # Expire GPO codes by default
max_mail_events: 4                                         # Max total of 4 letter requests
minimum_wait_before_another_usps_letter_in_hours: 24       # Wait 1 day before you can request another letter
  1. Go through identity verification, requesting a new GPO code
  2. Enter the code, and verify you receive the error message "Your verification code has expired."

Now, configure your application.yml to test the "requested too many letters" condition:

usps_confirmation_max_days: -1                             # Expire GPO codes by default
max_mail_events: 1                                         # Max total of 1 letter requests
minimum_wait_before_another_usps_letter_in_hours: 0        # No wait before requesting another
  1. Go through identity verification, requesting a new GPO code
  2. Enter the code, and verify you receive the error message "Your verification code has expired."

Now configure your application.yml such that the user will not be prevented from requesting a new letter:

usps_confirmation_max_days: -1                             # Expire GPO codes by default
max_mail_events: 4                                         # Max total of 4 letter requests
minimum_wait_before_another_usps_letter_in_hours: 0        # No wait before requesting another
  1. Go through identity verification, requesting a new GPO code
  2. Enter the code, and verify you receive the error message "Your verification code has expired. Please request another letter for a new code."

👀 Screenshots

If relevant, include a screenshot or screen capture of the changes.

Before:

verify-by_mail-enter_code-en-BEFORE

After:

verify-by_mail-enter_code-en-AFTER

changelog: User-Facing Improvements, Identity verification, Don't tell users to request a new verify by mail letter when they can't.
@matthinz matthinz requested a review from a team April 30, 2024 21:39
Copy link
Contributor

@theabrad theabrad left a comment

Choose a reason for hiding this comment

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

LGTM. Tested all the scenarios locally. Worked as intended.

@matthinz matthinz merged commit cbf1b34 into main May 1, 2024
@matthinz matthinz deleted the matthinz/11588-dont-mock-users branch May 1, 2024 21:24
@jmdembe jmdembe mentioned this pull request May 7, 2024
samathad2023 pushed a commit that referenced this pull request May 11, 2024
)

* Don't tell users to get another letter when they can't

changelog: User-Facing Improvements, Identity verification, Don't tell users to request a new verify by mail letter when they can't.

* Initial crack at ZH translation

* Update expected error in feature test

* Update another feature test expected error
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.

2 participants