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
Introduce grace period before asking guests to verify their email address #39191
Conversation
…rder pay/conf page). When the order confirmation (or payment) page is requested, we often want to ensure the visitor is associated with the order. However, this relies heavily on information stored in the user session and, depending on the payment gateway in use, this may not be dependable. Therefore, we've introduced a grace period during which no such verification will take place.
Test Results SummaryCommit SHA: 2343236
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Hi @rodelgc, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
|
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.
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.
Done with my review and left some comments. Thanks so much for making the necessary updates on the E2E tests @barryhughes! They tested well on localhost
. I requested some changes so that E2E changes you made would also work on permanent test sites.
Summary of tests I did for this PR:
- ✔️ Ran the
allows guest customer to place an order
test just by itself - ✔️ Ran
allows guest customer to place an order
twice in a row to ensure it's repeatable. I used the arguments--retries=0 --repeat-each=2 --workers=1
- ✔️ Ran all tests in
shopper/checkout.spec.js
⚠️ allows guest customer to place an order
test failed when I ran all tests inshopper/checkout.spec.js
against an external WooCommerce test site.
plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js
Outdated
Show resolved
Hide resolved
plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js
Outdated
Show resolved
Hide resolved
@rodelgc I'm taking over this PR since Barry is AFK. I've addressed your feedback, let me know what you think. |
Thanks a lot for making these updates @coreymckrill !
Interestingly, it was failing on the line 349 assertion
but looked good when I updated it to
(which you updated on a previous similar update in this PR) - so it certainly seem those locators are more stable.. @rodelgc - any idea if this was the location at which your test was failing originally? |
🤔 @nigeljamesstevenson Line 349 is in a separate test, |
Doh! 🤦♂️ My bad @coreymckrill ! - It was indeed the |
Since Nigel re-ran the tests and they are working, and we already have one approval here, I'm going to go ahead and merge. |
Actually, looks like I can't until @rodelgc confirms that requested changes were made. |
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.
Going to try another approval to get this out of "approval gridlock"
Narrator: the attempt didn't work.
Confirmed that tests pass locally and on a remote site and that changes have been made.
I did re-run the tests locally and against a Jurassic Ninja site and everything is good. So I've unblocked this. |
Thank you! |
…ress (#39191) * Add a grace period during which email verification is not required (order pay/conf page). When the order confirmation (or payment) page is requested, we often want to ensure the visitor is associated with the order. However, this relies heavily on information stored in the user session and, depending on the payment gateway in use, this may not be dependable. Therefore, we've introduced a grace period during which no such verification will take place. * Provide a mechanism for establishing server-side filters from our E2E tests. * Make our utilities for setting up filters from E2E available in the test env. * Update guest shopper workflow to account for order conf/payment access grace period. * Tidy verbiage. * Add changefile(s) from automation for the following project(s): woocommerce * Only activate the Filter Setter (e2e utility) during e2e tests. * Coding standard fixes for E2E utility plugin. * e2e: Update locators for headings to use getByRole, add await to clearFilters * e2e: Abstract the cookie domain to work on non-localhost test sites --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
* Introduce grace period before asking guests to verify their email address (#39191) * Add a grace period during which email verification is not required (order pay/conf page). When the order confirmation (or payment) page is requested, we often want to ensure the visitor is associated with the order. However, this relies heavily on information stored in the user session and, depending on the payment gateway in use, this may not be dependable. Therefore, we've introduced a grace period during which no such verification will take place. * Provide a mechanism for establishing server-side filters from our E2E tests. * Make our utilities for setting up filters from E2E available in the test env. * Update guest shopper workflow to account for order conf/payment access grace period. * Tidy verbiage. * Add changefile(s) from automation for the following project(s): woocommerce * Only activate the Filter Setter (e2e utility) during e2e tests. * Coding standard fixes for E2E utility plugin. * e2e: Update locators for headings to use getByRole, add await to clearFilters * e2e: Abstract the cookie domain to work on non-localhost test sites --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com> * Prep for cherry pick 39191 --------- Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com> Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
On the heels of #38983 and #39191, this changes the flow a bit so that the "thank you" message will always be shown when loading the "order received" URL. However, the verification requirement still prevents the details of the order being shown unless the customer is verified, either by confirming the email or by logging in. If unverified, the login/email form is shown on the thank you screen instead of the order details.
On the heels of #38983 and #39191, this changes the flow a bit so that the "thank you" message will always be shown when loading the "order received" URL. However, the verification requirement still prevents the details of the order being shown unless the customer is verified, either by confirming the email or by logging in. If unverified, the login/email form is shown on the thank you screen instead of the order details.
…ress (#39191) * Add a grace period during which email verification is not required (order pay/conf page). When the order confirmation (or payment) page is requested, we often want to ensure the visitor is associated with the order. However, this relies heavily on information stored in the user session and, depending on the payment gateway in use, this may not be dependable. Therefore, we've introduced a grace period during which no such verification will take place. * Provide a mechanism for establishing server-side filters from our E2E tests. * Make our utilities for setting up filters from E2E available in the test env. * Update guest shopper workflow to account for order conf/payment access grace period. * Tidy verbiage. * Add changefile(s) from automation for the following project(s): woocommerce * Only activate the Filter Setter (e2e utility) during e2e tests. * Coding standard fixes for E2E utility plugin. * e2e: Update locators for headings to use getByRole, add await to clearFilters * e2e: Abstract the cookie domain to work on non-localhost test sites --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
In our latest release, we introduced a change that requires shoppers to verify their email address before seeing the order confirmation page, or order payment page, but only if WooCommerce is unable to recognize them.
Naturally, the desire was to make this as friction-free as possible and, for example, shoppers should not have to verify their email address immediately after checking out ... unfortunately, depending on the payment gateway in use, that became possible.
Therefore, this change introduces a grace period during which email verification will not be required. Further, the grace period is filterable so can be removed (or extended) as desired.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Notes
10 * MINUTE_IN_SECONDS
with0
to simulate having waited 10 minutes. Or, if you don't like to touch core code, you could setup the following snippet in a suitable place (such aswp-content/mu-plugins/test-39191.php
) then remove after testing:Changelog entry
Significance
Type
Message
Adds a grace period during which email verification will not be needed before the order confirmation (or payment) page is rendered.
Comment