woocommerce/plugins/woocommerce-blocks/tests
Thomas Roberts a2772a1cad Add E2E and Unit (PHP and JS) tests for Filter by Stock block. (https://github.com/woocommerce/woocommerce-blocks/pull/4682)
* Add back end E2E tests for Filter by Stock

* Add unit/snapshot tests for Filter by stock block

* Refactor Filter by Stock block to load stock statuses in the block body

This is required to make the code easier to test, since the mocked settings were being applied immediately after the block was imported, which didn't give time to let the `allSettings` override take place in the unit tests.

* Add PHP Unit tests for test_custom_stock_counts of ProductQueryFilters

* Remove useMemo from stock filter block

This felt like an overoptimisation, it's very inexpensive to run this every render. The result is less complex code, so it's better this way imo.

* Move initial stock options and the values they are derived from into useState

* Add class name to block in editor
2021-09-15 09:20:31 +01:00
..
bin PHPUnit Tests running on wp-env (https://github.com/woocommerce/woocommerce-blocks/pull/4567) 2021-08-20 14:58:32 +01:00
e2e Add E2E and Unit (PHP and JS) tests for Filter by Stock block. (https://github.com/woocommerce/woocommerce-blocks/pull/4682) 2021-09-15 09:20:31 +01:00
js Add key to each `CartTotalItem` (https://github.com/woocommerce/woocommerce-blocks/pull/4240) 2021-05-25 12:49:13 +01:00
php Add E2E and Unit (PHP and JS) tests for Filter by Stock block. (https://github.com/woocommerce/woocommerce-blocks/pull/4682) 2021-09-15 09:20:31 +01:00
utils Fix e2e checkout tests and adjust jest setup (https://github.com/woocommerce/woocommerce-blocks/pull/4216) 2021-05-18 15:09:30 +02:00
bootstrap.php PHPUnit Tests running on wp-env (https://github.com/woocommerce/woocommerce-blocks/pull/4567) 2021-08-20 14:58:32 +01:00