woocommerce/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/272.md

39 lines
2.0 KiB
Markdown
Raw Normal View History

# Testing Notes and ZIP for testing
2020-07-16 18:12:22 +00:00
**Zip File for testing:**
[woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-gutenberg-products-block/files/4932938/woocommerce-gutenberg-products-block.zip)
**Note**: This zip file has 2.7.1 as the version showing in WordPress but it is actually 2.7.2.
This release impacts the logic around draft order cleanup.
Variations of tests:
## When distributed as a package in WooCommerce Core
2020-07-16 18:12:22 +00:00
Expected behaviour here is:
- [ ] `woocommerce_cleanup_draft_orders` action should not appear in the scheduled tasks for Action Scheduler (Tools->Scheduled Actions).
2020-07-16 18:12:22 +00:00
These actions only appear when the feature flag is on for the install. If you are not testing the package inclusion in WooCommerce core, you can simulate this by adding a `blocks.ini` file to the same directory as where this plugin is activated and include in the file the following code:
```text
2020-07-16 18:12:22 +00:00
woocommerce_blocks_phase = 1
```
(remember to remove the file after testing!)
2020-07-16 18:12:22 +00:00
## When distributed as the feature plugin
2020-07-16 18:12:22 +00:00
Expected behaviour is:
- [ ] `woocommerce_cleanup_draft_orders` action **should** appear in the scheduled tasks for Action Scheduler (Tools->Scheduled Actions).
- [ ] Create a draft order (on the frontend load the checkout block with products in the cart and do not complete the order).
- [ ] Trigger the scheduled action for `woocommerce_cleanup_draft_orders` and verify the just created draft order and none of the other orders on your test site have been deleted.
- [ ] Modify the draft order date so that it's greater than 24 hours in the past from now (you need to modify the `post_modified_gmt` field)
- [ ] Trigger the scheduled action again, this time the draft order you modified (and only that draft order) should be deleted.
2020-07-16 18:12:22 +00:00
There are PHPUnit tests covering behaviour as well (including catching errors).
2020-07-16 18:12:22 +00:00
[![Create Todo list](https://raw.githubusercontent.com/senadir/todo-my-markdown/master/public/github-button.svg?sanitize=true)](https://git-todo.netlify.app/create)