woocommerce/plugins/woocommerce-blocks/tests/e2e
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
..
config Fix e2e checkout tests and adjust jest setup (https://github.com/woocommerce/woocommerce-blocks/pull/4216) 2021-05-18 15:09:30 +02:00
fixtures Fix e2e tests: Remove paypal from fixture data (https://github.com/woocommerce/woocommerce-blocks/pull/4507) 2021-07-26 15:05:09 +01:00
specs 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.js Fix e2e tests: Remove paypal from fixture data (https://github.com/woocommerce/woocommerce-blocks/pull/4507) 2021-07-26 15:05:09 +01:00