Commit Graph

3051 Commits

Author SHA1 Message Date
jonathansadowski 10f92ca091
Merge pull request #29043 from woocommerce/fix/25261
Fix price filtering when there are variations.
2021-02-05 12:19:42 -06:00
Nestor Soriano 3976abffd6 Fix price filtering when there are variations.
The price filtering query wasn't working properly when there are
variations with different prices: if at least one variation was
outside of the price range but other were inside, the product wasn't
being listed.
2021-02-05 16:34:42 +01:00
Ron Rennick 8fde150ba9 update built-in readme with shorthand script 2021-02-04 15:52:18 -04:00
Ron Rennick 371f2c31a6 update missed StoreOwner/CustomerFlows in docs, improve readability of some sections 2021-02-04 15:45:57 -04:00
Veljko ff71de8578 Fix spaces and split tests 2021-02-03 13:13:28 +01:00
Ron Rennick ba6debf83b add ts-ignore for interface 2021-02-01 22:02:15 -04:00
Ron Rennick 610e0d4f17 simplify imports/exports in api package 2021-02-01 19:41:18 -04:00
Ron Rennick 898051bd16 package lock maintenance 2021-02-01 13:03:13 -04:00
Veljko 2a3e661784 Fix flaky component for final test creation 2021-02-01 14:31:02 +01:00
Veljko V 6d6554ccbd
Merge branch 'master' into e2e-shopper-grouped-product 2021-02-01 12:25:03 +01:00
Ron Rennick becf1e8b33 Merge branch 'master' into package/utils/update/factory-dependency 2021-01-29 10:52:50 -04:00
Claudio Sanches 6701ce9c9d
Merge pull request #26983 from woocommerce/fix/25082
Use tax location from order while computing tax in discount.
2021-01-28 16:59:59 -03:00
Ron Rennick e1a9fa0dc6 Merge branch 'master' into packages/env/clean-up-console 2021-01-28 14:21:12 -04:00
Ron Rennick a252b3a3d8 use workaround for coupon already applied 2021-01-28 10:39:48 -04:00
Ron Rennick de759607d1 use correct coupon codes to total $0 2021-01-27 21:04:01 -04:00
Ron Rennick 1195e79c17 clear coupon code for entry 2021-01-27 20:34:56 -04:00
Ron Rennick d18dc96158 make cart coupon test more granular 2021-01-27 17:15:39 -04:00
zhongruige 1e36385fc8 Merge branch 'master' of github.com:woocommerce/woocommerce into add/e2e-merchant-product-views 2021-01-27 08:05:14 -07:00
Ron Rennick 694aff70cb Merge branch 'master' into packages/env/clean-up-console 2021-01-27 10:23:08 -04:00
Ron Rennick bb4e654cce
Return jest error for Travis (#28929)
* Return jest error for Travis

* fix onboarding flow for WCA 1.9.0
2021-01-26 21:59:40 +01:00
Ron Rennick f48ca7cade eliminate repeated missing resource messages in E2E 2021-01-26 11:42:51 -04:00
Ron Rennick d882433db4
Merge pull request #28661 from woocommerce/e2e-shopper-cart-apply-coupon
Add new e2e test shopper cart apply coupon
2021-01-25 13:34:23 -04:00
Christopher Allford 3ea6f8d5c5 @woocommerce/e2e-utils: updated fishery to 1.2
Now that my PR adding support for async creation has been merged we can
remove the AsyncFactory class we were using as a temporary workaround.
2021-01-25 09:33:46 -08:00
Ron Rennick 6134d0ffc8
Merge pull request #28867 from woocommerce/add/e2e-shopper-registered-checkout
E2E: add registered shopper checkout test
2021-01-25 12:52:48 -04:00
Ron Rennick 0eafe83be6 Merge branch 'master' into e2e-shopper-cart-apply-coupon 2021-01-25 12:24:19 -04:00
Ron Rennick 09dedb5520
bump version in E2E packages (#28823)
* bump version in core-tests, utils

* bump api package version, update changelog

* bump e2e-environment to 0.2.0
2021-01-22 14:22:33 +01:00
Leif Singer 7154b61283 move verifyOrder into merchant 2021-01-22 12:44:18 +01:00
Leif Singer 1bafa98a66 move registered customer checkout test to general checkout tests 2021-01-22 11:16:54 +01:00
Leif Singer 197a126aab E2E: add registered shopper checkout test 2021-01-22 11:16:53 +01:00
zhongruige 665cb0b8cf Added tests around product search and editing a product 2021-01-20 16:19:07 -07:00
Veljko 521f5d9610 Add new e2e test shopper grouped product 2021-01-19 18:20:04 +01:00
Ron Rennick 10880ae6e1
add admin user E2E config support (#28656)
* add admin user config support

* use merchant.login() is jest setup

* remove customer config from builtin readme

* fix missed merge change

Co-authored-by: Leif Singer <git@singer.sh>
2021-01-19 16:02:08 +01:00
Ron Rennick 8721b5d9d9
update core-tests, utils package readmes (#28715) 2021-01-19 14:00:59 +01:00
Claudio Sanches ea54d5ad5f
Merge pull request #28679 from woocommerce/fix/woocommerce-gutenberg-products-block-issues-3565
Show correct WooCommerce pages status if they are using blocks vs shortcode.
2021-01-18 19:26:34 -03:00
Roy Ho 4c548951f4
Merge pull request #28521 from woocommerce/fix/26475
Create additional download permissions on product save if needed
2021-01-18 06:51:57 -08:00
Roy Ho 56e67b1ef8
Merge pull request #28814 from woocommerce/fix/migration/27688
Add migration to fix incorrect product review count.
2021-01-18 06:48:46 -08:00
vedanshujain 2240d3a6e4 Fix typos. 2021-01-18 19:52:20 +05:30
vedanshujain 1758c2b58c Add tests for #28835 2021-01-18 17:26:19 +05:30
Veljko 00172c5085 Update util changelog 2021-01-15 18:30:05 +01:00
Veljko 0ae2110cd8 Update test to avoid conflict 2021-01-15 18:27:40 +01:00
Ron Rennick 85a03584df
Merge pull request #28665 from woocommerce/e2e-shopper-checkout-apply-coupon
Add new e2e test shopper checkout apply coupon
2021-01-15 13:27:28 -04:00
Ron Rennick 3950f61f8f fix merge conflict 2021-01-15 12:52:00 -04:00
Claudio Sanches e698ed72fd
Merge pull request #28801 from liquidweb/refactor/shipping-zone-read
Refactor the WC_Shipping_Zone_Data_Store::read() method
2021-01-15 12:58:36 -03:00
Veljko V cce8983f14
Update test case to avoid conflict with master 2021-01-15 16:41:26 +01:00
Ron Rennick 57d8a00682
Merge pull request #28684 from woocommerce/fix/28682
introduce evalAndClick() E2E utility function
2021-01-14 09:41:10 -04:00
vedanshujain 2dce182cf8 Add unit tests for review count methods. 2021-01-14 18:31:02 +05:30
Néstor Soriano b36a06ca08
Merge pull request #27844 from woocommerce/php8/use-custom-phpunit-7
[PHP 8] Use a custom version of PHPUnit 7 for PHP 8 compatibility
2021-01-14 11:46:01 +01:00
Nestor Soriano 8b0bd248d6 Attach hook for adjust_download_permissions from within init_hooks
The DownloadPermissionsAdjuster class hooks to adjust_download_permissions
from within its init method. However this method is executed only
if the class is resolved, otherwise the hooks doesn't get attached
and then the scheduled action is not serviced.

To solve this, the class is resolved from WooCommerce::init_hooks.
This requires a change in DownloadPermissionsAdjuster::init
to use wc_get_container()->get( LegacyProxy::class )->get_instance_of
instead of WC()->get_instance_of, since WC() can't be used from
WooCommerce::construct (which invokes init_hooks).
2021-01-14 11:40:11 +01:00
Veljko V d1150b25dc
Update changelog to include added parameter 2021-01-13 19:34:46 +01:00
Ron Rennick b477cb8d3a
only activate WooCommerce in E2E initialization (#28588)
* only activate WooCommerce in E2E initialization
* use project basename for default plugin path
2021-01-13 12:27:11 +01:00
Nestor Soriano 2ec002defa Add unit tests for DownloadPermissionsAdjuster::adjust_download_permissions 2021-01-13 12:11:15 +01:00
Steve Grunwell e32dd6c4d3 Add a new WC_Shipping_Zone_Data_Store_CPT_Test class to support the refactoring of WC_Shipping_Zone_Data_Store_CPT::read() 2021-01-12 18:26:00 +00:00
budzanowski a283433f4d Add block utils unit tests. 2021-01-12 14:41:55 +01:00
Nestor Soriano 2d83db8b66 Add tests for DownloadPermissionsAdjuster::maybe_schedule_adjust_download_permissions
Also replace direct invocations of functions with usages of the
LegacyProxy whenever needed, and code style ajustments.
2021-01-12 12:07:38 +01:00
Nestor Soriano afe7bdc6b3 Add a test for the added functionality of LegacyProxy. 2021-01-12 10:16:00 +01:00
Veljko V 760a879cb9 Fix white spaces issue 2021-01-11 16:45:31 +01:00
Veljko V 8b85a73977 Fix white spaces issue 2021-01-11 16:40:40 +01:00
Veljko V 633251009b Update test to include lower case method 2021-01-11 16:34:10 +01:00
Veljko V 2e8b6cb0f1 Update test to include lower case method 2021-01-11 16:31:47 +01:00
Veljko 5ceda17664 Update code to be more concise 2021-01-09 18:53:12 +01:00
Veljko 2cf971486e Update code to be more concise 2021-01-09 18:49:59 +01:00
Ron Rennick 20a6e3b2ed merge master 2021-01-08 15:55:59 -04:00
Roy Ho d4849c598c
Merge pull request #28692 from woocommerce/fix/28582
Add protective check to make sure WC()->session is initialized before  loading the data store.
2021-01-08 07:55:35 -08:00
Ron Rennick 5f7b71c543 update readme and package change log 2021-01-08 15:04:47 +01:00
Ron Rennick 96ab0d8d7f include package.json updates 2021-01-08 15:04:47 +01:00
Ron Rennick a7014d5496 introduce wc-e2e shorthand script 2021-01-08 15:03:12 +01:00
Ron Rennick 597ec5f9c3 WIP 2021-01-08 15:03:12 +01:00
Nestor Soriano 9d892f0678 Add a section about testing in PHP 8 in tests/README 2021-01-08 09:04:42 +01:00
Veljko 8111c4f410 Improve test case and components 2021-01-07 23:39:12 +01:00
Veljko cf0a4df04b Improve test case and components 2021-01-07 20:59:53 +01:00
Ron Rennick 6d402c96c8
Merge pull request #28017 from woocommerce/fix/25643
Fix E2E variable product test
2021-01-06 14:39:19 -04:00
Ron Rennick 7959ba3d16
Merge pull request #28045 from woocommerce/fix/28012
add support for custom E2E container name
2021-01-06 13:52:42 -04:00
Veljko V 79904279fa Update components and test to be more concise 2021-01-06 17:08:29 +01:00
vedanshujain b0cc43a188 More for individual fields in responses for V2 and V3 products and orders endpoints. 2021-01-06 16:04:56 +05:30
vedanshujain e546c237b7 Add tests for checking all fields are returned even requested individually. 2021-01-06 15:12:55 +05:30
vedanshujain 1fdc24daa9 Add unit test for verifying that all expected fields are present. 2021-01-06 14:19:26 +05:30
Veljko V a0049c10ff Fix test title to be more concise 2021-01-05 22:48:34 +01:00
Veljko V d3169dcf43 Remove unnecessary code 2021-01-05 22:24:03 +01:00
jonathansadowski 1e267980e8
Merge pull request #28723 from woocommerce/feature/issue-27208
Feature/issue 27208
2021-01-05 14:00:55 -06:00
Ron Rennick b3b73e069a merge upstream 2021-01-05 14:56:27 -04:00
Ron Rennick 35e490e631 restore accidental readme deletion 2021-01-05 14:52:29 -04:00
Nestor Soriano f4a1f12824 Fix code sniffer errors 2021-01-05 17:23:23 +01:00
roykho b25f01d2f3
Add unit tests 2021-01-05 08:14:39 -08:00
Nestor Soriano f284ae8af3 Fix end of line handling for PHP 8 in WC_Tests_Log_Handler_Email
In PHP 7 the mail function generates PHP-style end of lines (\n),
and that's what these unit tests were assuming; in PHP 8 however
the proper network-style end of lines (\r\n) are generated.
This commit fixes the tests to be compatible with both styles.
2021-01-05 16:04:30 +01:00
Leif Singer 62d5e9a0bc fix an overlooked merge conflict resolution issue 2021-01-05 15:06:51 +01:00
Ron Rennick 3076e1e50f disable setting variation fields in variable product test 2021-01-05 13:24:51 +01:00
Ron Rennick 120fc00f82 use waitAndClick, waitForSelector where applicable 2021-01-05 13:24:51 +01:00
Ron Rennick 7a03688006 variation test works to last uncommented step 2021-01-05 13:24:51 +01:00
Ron Rennick 923bf28d44 use checkbox object for checking/unchecking 2021-01-05 13:19:49 +01:00
Ron Rennick 0d2a5ac5e9 Fixes needed for variable product E2E test
- Jest/Puppeteer sometimes will not find an element on page load when that element is outside the initial viewport
- There were duplicate .variation_tab classes which confused Jest/Puppeteer
- Add function for opening and verifying new product page
- Update test sequence for changes in flow in markup and Jest/Puppeteer
2021-01-05 13:19:49 +01:00
Vedanshu Jain 7d4cf1b8bf
Merge pull request #28677 from woocommerce/fix/request-request-arg-api
Add protection around `func_get_arg` method for backward compatibility.
2021-01-05 17:45:31 +05:30
Veljko V f782bcdc86
Update changelog information 2021-01-04 15:28:09 +01:00
Veljko V cf8c114198
Update changelog information 2021-01-04 15:27:05 +01:00
Veljko V 57f3eccc95 Fix conflict with another tests
We're using dynamic coupon creation now. I updated other test to search for specific coupon name because in order edit page there's only lowercased coupon names, but we're using uppercased for two reasons at least.
2021-01-04 15:20:40 +01:00
Veljko V 2204867a20 Fix conflict with another tests
We're using dynamic coupon creation now. I updated other test to search for specific coupon name because in order edit page there's only lowercased coupon names, but we're using uppercased for two reasons at least.
2021-01-04 15:11:41 +01:00
vedanshujain 9e3cdd4ae7 Add tests for #28692 2020-12-30 19:29:22 +05:30
Ron Rennick 47c6d06a77 introduce evalAndClick() E2E utility function 2020-12-29 15:56:55 -04:00
zhongruige f472d3cc0f Cast to number for the comparison 2020-12-29 10:38:36 -07:00
zhongruige e3765dc650 Code review feedback 2020-12-29 09:10:22 -07:00
vedanshujain 818e24d5c5 Add protection around `func_get_arg` method for backward compatibility.
We are using func_get_arg method to receive argument in a backward compatible way since we cannot modify function signature to add more params even with default params. Earlier I was hoping to use DI to create another child class with modified signature and load it depending upon where we are executing from, however since we had to revert DI, we add this workaround to unblock #27735.
2020-12-28 14:10:22 +05:30
zhongruige aeb0f5861f Make sure the tests are backwards compatible 2020-12-27 15:18:31 -07:00
zhongruige 98ee48d1df Merge branch 'master' of https://github.com/woocommerce/woocommerce into add/e2e-simple-price-config-variable 2020-12-24 16:15:09 -07:00
Veljko V a5175c75d6 Fix problem in headless by adding uiUnblocked 2020-12-24 11:57:17 +01:00
Veljko V 121099afe7 Fix problem in headless by adding uiUnblocked 2020-12-24 11:53:45 +01:00
Veljko V 3c85972780 Updated changelogs to utils and core tests 2020-12-24 10:55:20 +01:00
Veljko V f4be2afa2a Updated changelogs to utils and core tests 2020-12-24 10:54:21 +01:00
Vedanshu Jain 9db6e2e49c
Merge pull request #28643 from woocommerce/feature/fix-build
Feature/fix build
2020-12-24 13:12:58 +05:30
Veljko V 314295c785 Update existing code to be more successful in headless 2020-12-23 17:24:34 +01:00
Veljko V e6ebfc5154 Update existing code to be headless compatible 2020-12-23 17:19:48 +01:00
Veljko V a033be3fde Add e2e test shopper checkout apply coupon 2020-12-23 16:51:25 +01:00
Veljko V 4b62b23580 Add new e2e test shopper cart apply coupon 2020-12-23 15:04:52 +01:00
zhongruige 0cdcb26f61 Addressing merge conflicts 2020-12-22 19:35:50 -07:00
Ron Rennick d4cae9ee25
Update e2e-utils, e2e-core-tests to merchant & shopper (#28133)
* migrate utils from CustomerFlow/StoreOwnerFlow to customer, merchant and shopper

* merge customer into shopper

- add shopper.gotoMyAccount flow

* update internal uses to merchant, shopper

* add *Flow deprecation messages

* update e2e-utils changelog

* update order filter, refund tests to merchant

* add a wait to refund test for ajax to complete

* update StoreOwnerFlow to merchant in new test

* move ajax wait to end of previous test
2020-12-22 14:59:16 +01:00
Vedanshu Jain 800c6a61b7
Merge pull request #28620 from woocommerce/fix/28505
Stock management regression fixes
2020-12-21 22:36:53 +05:30
Ron Rennick 65d421b8f7 restore expected plugin list count to 4 2020-12-21 12:30:50 -04:00
zhongruige 55a8fc3d11 Merge branch 'master' of https://github.com/woocommerce/woocommerce into add/e2e-simple-price-config-variable 2020-12-21 08:54:33 -07:00
Claudio Sanches 8568a9b9ff Fixed coding standards 2020-12-21 12:46:01 -03:00
Ron Rennick 6d8419e1d4 Merge branch 'master' into fix/28012 2020-12-21 10:59:38 -04:00
vedanshujain 5171108967 Better docs for test functions to specify expectations. 2020-12-21 15:51:07 +05:30
vedanshujain b4b03f3b46 Merge branch 'master' into fix/28505 2020-12-21 15:42:04 +05:30
vedanshujain 39c200bf2d Merge branch 'master' into fix/27673 2020-12-21 15:29:55 +05:30
Vedanshu Jain d2c5fc0750
Merge pull request #28635 from woocommerce/packages/core-tests/setup-shipping
use xpath to find onboarding set up shipping task
2020-12-21 01:05:46 +05:30
Ron Rennick 4774297e15 use xpath to find onboarding set up shipping task 2020-12-19 23:00:32 -04:00
Ron Rennick 6509addabf merge master 2020-12-18 13:40:49 -04:00
vedanshujain 84d60e5fcf Add unit tests for all status change ops.
This loops and tests stock changes through ALL supported WooCommerce statuses. Hopefully this will make our inventory tracking more robust.
2020-12-17 22:28:21 +05:30
zhongruige b23d5db546 Typo fix 2020-12-16 15:00:13 -07:00
vedanshujain 981d494d52 Add unit tests for #28592 2020-12-16 19:37:01 +05:30
vedanshujain 9ca52ee73b Fix unit test to use new coupon error messages.
This also removes some cart operations which are not needed anymore to since cart already has items that we were adding in those tests.
2020-12-16 16:21:33 +05:30
zhongruige 5131c922a2 Remove unneeded no-disabled-tests 2020-12-15 20:18:16 -07:00
zhongruige e178017e0a Added tests for the merchant order apply coupon flow 2020-12-15 20:14:02 -07:00
Tam Mullen 44d508e332
Merge pull request #28556 from woocommerce/add/e2e-merchant-orders-refund-order
Added new tests for the merchant order refund flow
2020-12-15 22:35:30 +00:00
roykho 9ffdfd3401
Check in package-lock 2020-12-15 14:21:05 -08:00
zhongruige d8018cf28e Add missing trailing semicolon 2020-12-15 06:33:55 -07:00
Rodrigo Primo 5842068cdf
Merge pull request #28587 from woocommerce/add/e2e-docker-image-delay
add 12 hour delay to pulling new docker tags
2020-12-15 09:17:12 -03:00
Ron Rennick 733157638b update package changelog 2020-12-14 10:54:29 -04:00
Ron Rennick ef61903822 add 12 hour delay to pulling new docker tags 2020-12-14 10:42:39 -04:00
zhongruige 88630e2a32 Add delete issued refund test 2020-12-13 16:07:16 -07:00
zhongruige 46164b032d Add config variable for simple product price and update tests to utilize it 2020-12-12 15:46:13 -07:00
zhongruige 9d95a21f48 Cleanup unused no-standalone-expect 2020-12-11 10:54:42 -07:00
zhongruige 88ddefbcb3 Dynamically pull the currency symbol instead of hard-coding it 2020-12-11 10:48:20 -07:00
zhongruige 4ca6114476 Swap out currency symbol 2020-12-11 09:47:03 -07:00
zhongruige 2caac87d03 Added new tests for the merchant order refund flow 2020-12-10 21:27:04 -07:00
zhongruige c07f31f22c
Merge branch 'master' into add/e2e-merchant-orders-filter-orders 2020-12-08 15:50:00 -07:00
zhongruige 1dfedf425c Code review feedback--setting the consts in the test itself 2020-12-08 15:09:23 -07:00
Ron Rennick a757ff2b53 update extension count to 3 2020-12-07 16:30:55 -04:00
Ron Rennick 80ded96120 merge master 2020-12-07 13:13:52 -04:00
zhongruige ae1ebfd031 Code review feedback--moving statuses to config values 2020-12-05 20:30:42 -07:00
Ron Rennick a47cb707b3 fix merge conflict 2020-12-04 14:52:38 -04:00
Ron Rennick 5a81d8de41 disable setting variation fields in variable product test 2020-12-03 15:09:55 -04:00
Ron Rennick 2718c85f78 Merge branch 'master' into fix/25643 2020-12-03 14:47:52 -04:00