Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit c9419cd

Browse files
committed
Add testing notes
1 parent abac25f commit c9419cd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/testing/releases/272.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[![Create Todo list](https://raw.githubusercontent.com/senadir/todo-my-markdown/master/public/github-button.svg?sanitize=true)](https://git-todo.netlify.app/create)
2+
3+
## Testing Notes and ZIP for testing
4+
5+
**Zip File for testing:**
6+
[woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-gutenberg-products-block/files/4932938/woocommerce-gutenberg-products-block.zip)
7+
8+
This release impacts the logic around draft order cleanup.
9+
10+
Variations of tests:
11+
12+
## When distributed as a package in WooCommerce Core.
13+
14+
Expected behaviour here is:
15+
16+
* [ ] `woocommerce_cleanup_draft_orders` action should not appear in the scheduled tasks for Action Scheduler (Tools->Scheduled Actions).
17+
18+
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:
19+
20+
```
21+
woocommerce_blocks_phase = 1
22+
```
23+
24+
(remember to remove tha file after testing!)
25+
26+
## When distributed as the feature plugin.
27+
28+
Expected behaviour is:
29+
30+
* [ ] `woocommerce_cleanup_draft_orders` action **should** appear in the scheduled tasks for Action Scheduler (Tools->Scheduled Actions).
31+
* [ ] Create a draft order (on the frontend load the checkout block with products in the cart and do not complete the order).
32+
* [ ] 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.
33+
* [ ] Modify the draft order date so that it's greater than 24 hours in the past from now.
34+
* [ ] Trigger the scheduled action again, this time the draft order you modified (and only that draft order) should be deleted.
35+
36+
There are phpunit tests covering behaviour as well (including catching errors).
37+

0 commit comments

Comments
 (0)