-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Product Collection: add E2E tests to Editor filters - by tag and by stock status #43548
Product Collection: add E2E tests to Editor filters - by tag and by stock status #43548
Conversation
Test Results SummaryCommit SHA: e332281
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 @Aljullu, 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.
LGTM, nice to see so much test coverage for the Product Collection block. I left one comment about the simple_product_id
variable name, I might be overthinking it, so feel free to ignore if you don't agree.
@@ -30,6 +30,10 @@ product_id=$(wp post list --post_type=product --field=ID --name="Cap" --format=i | |||
crossell_id=$(wp post list --post_type=product --field=ID --name="Beanie" --format=ids) | |||
wp post meta update $crossell_id _crosssell_ids "$product_id" | |||
|
|||
# Set a product out of stock | |||
simple_product_id=$(wp post list --post_type=product --field=ID --name="T-Shirt with Logo" --format=ids) |
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.
Nit: not a big deal, but what do you think about either naming this variable based on what we are testing (out_of_stock_product
) or its real name (tshirt_with_logo_product
)? I worry that we currently have post_id
, product_id
and now simple_product_id
in the same file and they don't seem very descriptive names.
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.
Good call. I decided to rename ALL of the product variables to follow the same convention, basically PRODUCT_NAME_product_id
in the same way as categories are names at the top of a file.
I decided NOT to use "functional" names (e.g. out_of_stock_product
) because some of the products are used in multiple places and also the comments are well describing the purpose.
Changes in: e332281
…tock status (#43548) * Add test to check Product Collection filtering by tags * Set single product out of stock and unskip the test for stock status * Add changelog * Use more specific selector * Update variables holding products in products.sh to keep the same convention
Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes #42284
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Note: no need to test when testing the release.
Changelog entry
Significance
Type
Message
Comment