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
[e2e] Check email for cancelled order #43985
Conversation
Hi , @woocommerce/solaris, @woocommerce/vortex 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: |
await expect( | ||
page.getByText( | ||
`[${ storeName }]: Order #${ cancelledOrderId } has been cancelled` | ||
) | ||
).toBeVisible(); |
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.
Hi @lanej0 👋 This same approach can be used in the test above, can receive new order email
. If this looks good to you and the team, I can also update other tests.
Test Results SummaryCommit SHA: e28b9d1
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. |
@woocommerce/solaris @woocommerce/vortex 👋 I would appreciate some 👀 on this one so it doesn't get stale. Thanks! |
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. However, I am not a fan of using API to trigger something like this; I would rather go to the existing order and edit it to change its status to from processing to canceled and then wait for the email.
At this stage, this seems enough, as other tests are also created the same way. 👍
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.
LGTM
Thank you @veljkho for bringing this up. This is a broader topic that we can discuss on a p2 with the team and we can make some decisions on how to approach this in the future |
Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes https://github.com/woocommerce/woocommerce-quality/issues/655
Using the similar approach as in checking new order emails, I added a test which cancels the order and checks if the email is received.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
pnpm test:e2e-pw ./tests/e2e-pw/tests/merchant/order-emails.spec.js -g "can receive cancelled order email" --headed
and verify is passed.Changelog entry
Significance
Type
Message
Add new "can receive cancelled order email" test
Comment