Veljko
6b15fe98e5
Revert back index reorder changes
2021-01-28 19:45:39 +01: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
Veljko
6a64a39b39
Reorder test in index to avoid flakyness
2021-01-28 12:10:50 +01:00
Veljko
bfa9cc1788
Reorder test in index and update readme
...
I added also missing for other pull requests that were merged already
2021-01-28 11:12:56 +01: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
Veljko
57a798c0e9
Merge branch 'master' into e2e-shopper-pay-order
2021-01-27 17:38:03 +01: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
2acfa416c7
Merge branch 'master' into e2e/api/poc-delete-products
2021-01-27 10:25:01 -04: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
Ron Rennick
baa4bb5da1
merge master
2021-01-19 17:00:10 -04: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
10b639510b
use api to delete products before e2e tests
2021-01-19 09:49:18 -04: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
Veljko
c7f89fa8df
Fix changelog conflict
2021-01-18 14:50:58 +01:00
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
Veljko V
22d7497d6a
Fix code to be according to standards
2021-01-14 19:13:16 +01:00
Veljko V
cbda8b17bb
Update changelog for core tests
2021-01-14 17:30:58 +01:00
Veljko V
d569717808
Update scenario of shopper paying his order
2021-01-14 17:19:06 +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
Veljko V
50d601355c
Update scenario shopper can pay his order
2021-01-14 14:22:39 +01:00
vedanshujain
2dce182cf8
Add unit tests for review count methods.
2021-01-14 18:31:02 +05:30
Veljko V
98823ba8d0
Add new e2e test case customer can pay for his order
2021-01-14 13:45:12 +01:00
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
Ron Rennick
53fd108b1b
implement peer dependencies in e2e packages
2020-12-03 11:55:02 -04:00
Ron Rennick
60556ea288
update package changelogs
2020-12-01 19:19:10 -04:00
Ron Rennick
a21f9e24a4
add config to package.json in utils, core tests
2020-12-01 18:03:50 -04:00
zhongruige
a37fbff4f5
Merge branch 'master' of https://github.com/woocommerce/woocommerce into add/e2e-merchant-orders-filter-orders
2020-11-27 15:18:12 -07:00
zhongruige
7e286e30f2
Added order filter tests; created helper functions for the tests; updated READMEs and CHANGELOG to reflect changes
2020-11-27 14:49:20 -07:00
Tam Mullen
0877fd5233
Merge pull request #28041 from woocommerce/packages/e2e/custom-initialization
...
add support for custom container initialization script
2020-11-27 20:13:02 +00:00
Ron Rennick
0e29912b14
merge master
2020-11-25 21:29:19 -04:00
Ron Rennick
810fd41973
Merge branch 'master' into fix/25643
2020-11-20 15:01:08 -04:00
Ron Rennick
089bb87314
clarify which WordPress nightly
2020-11-20 14:48:18 -04:00
Néstor Soriano
e7584104a1
Merge pull request #28147 from woocommerce/use-mozart-to-renamespace-dependencies
...
Use Mozart instead of a script to renamespace packages
2020-11-20 09:16:25 +01:00
Ron Rennick
a5a109ccbe
Merge pull request #28217 from woocommerce/fix/27786
...
remove old setup wizard test
2020-11-19 13:56:33 -04:00
Christopher Allford
c9f413d297
Created dummy `woocommerce/woocommerce-lib` package to contain dependencies
...
In order to avoid problems posed by potentially including the unconverted dependencies in the root autoloader, this package will hold all dependencies that require conflict avoidance.
2020-11-18 13:54:20 -08:00
Nestor Soriano
556ea1ecfa
Merge branch 'master' into use-mozart-to-renamespace-dependencies
2020-11-18 09:05:11 +01:00
Vedanshu Jain
ae163eb28b
Merge pull request #27734 from woocommerce/enhancement/optimize-wc-order
...
Optimize function `wc_get_orders` by priming caches beforehand
2020-11-14 12:37:44 +05:30
Rodrigo Primo
4240f9924a
Merge pull request #28048 from woocommerce/fix/27807
...
Remove dynamic build dependencies
2020-11-13 15:34:35 -03:00
Vedanshu Jain
13f429e80d
Merge pull request #28102 from woocommerce/fix/28100
...
Exclude user table columns as well while setting metadata props
2020-11-13 13:50:02 +05:30
Christopher Allford
03f65478f2
Merge pull request #28249 from woocommerce/add/composer-2
...
Update Composer to v2 (includes woocommerce-blocks 3.8.0 and woocommerce-admin 1.7.0)
2020-11-12 21:16:51 -08:00
Christopher Allford
3275c5abd1
Fixed broken code coverage
2020-11-12 14:46:39 -08:00
Christopher Allford
a95b384f08
Corrected code coverage path
2020-11-12 14:30:55 -08:00
Christopher Allford
30d2e278b9
Replaced the deprecated `WC_Admin_Note` class
2020-11-12 13:26:30 -08:00
Christopher Allford
7a26fc30dd
Fixed failing E2E test
2020-11-12 12:52:53 -08:00
vedanshujain
13f2dd6be9
Add unit tests towards issue #28100
2020-11-13 01:02:16 +05:30
vedanshujain
a2231c4387
Add unit test
2020-11-12 22:58:05 +05:30
vedanshujain
04fe12b5fb
Add proper params because otherwise this query will not set caches.
2020-11-12 15:10:16 +05:30
Christopher Allford
05ebdf9677
Adjusted Travis' PHPUnit to use the vendor binary instead of a global install
2020-11-11 23:42:14 -08:00
vedanshujain
fdceac9866
Delete refund cache for parent order when its deleted.
2020-11-12 10:01:15 +05:30
roykho
4ec270b93d
Add unit tests for the fix
2020-11-11 15:28:06 -06:00
Roy Ho
e0204e04e4
Merge pull request #28241 from woocommerce/fix/27566
...
Add shipping, tax and fee lines to refund response for better information in refund REST API.
2020-11-11 08:11:56 -08:00
Tam Mullen
04c9e2f12f
Merge pull request #28191 from woocommerce/packages/core-tests/functional-permlainks-test
...
add permalinks working test
2020-11-11 14:58:01 +00:00
Tam Mullen
8f46eec95a
Merge pull request #28198 from woocommerce/add/package-changelogs
...
add/update e2e package change logs
2020-11-11 14:12:52 +00:00
vedanshujain
62ae94d93e
Add shipping, tax and fee lines to refund response for better information.
2020-11-11 18:47:48 +05:30
Christopher Allford
72e93f11b2
Update CHANGELOG.md
...
Updated the `@woocommerce/api` changelog
2020-11-10 16:32:11 -08:00
Christopher Allford
93d6b261c6
Merge pull request #28129 from woocommerce/add/lerna-hoist
...
add lerna hoist, use consistent package versions
2020-11-10 16:13:58 -08:00
Ron Rennick
ac89e09c9e
remove duplicate package dependency entries
2020-11-10 16:29:22 -04:00
Christopher Allford
11c7e3bff6
Fixed issues that caused the factory creation to fail for SimpleProduct types
2020-11-09 12:02:01 -08:00
Ron Rennick
7282e0bca6
merge master
2020-11-09 14:30:01 -04:00
Ron Rennick
76d8b16659
remove old setup wizard test
2020-11-09 13:31:19 -04:00
Christopher Allford
d205d6551e
Added all of the update parameters for simple products
2020-11-06 14:01:03 -08:00
Christopher Allford
a646c712d8
Generalized the various restXXX functions
...
Since it looks like almost all of these are going to be virtually identical, it makes sense to have common functions that we can use instead of having to write all of the boilerplate unnecessarily.
2020-11-06 13:24:02 -08:00
Christopher Allford
29c9976354
Added "list", "read", "update", and "delete" actions for simple products
2020-11-06 11:11:58 -08:00
Christopher Allford
45b57d46b9
Added transformers for all of the product sub-data
2020-11-06 10:44:57 -08:00
Christopher Allford
b4a2316386
Added array support to property type and model transformer transformations
2020-11-06 10:01:12 -08:00
Christopher Allford
5e35d68789
Added a new transformation for nesting transformers
2020-11-05 22:49:37 -08:00
Christopher Allford
fb5f393acb
Made abstract product sale dates easier to work with
2020-11-05 22:20:42 -08:00
Christopher Allford
681e568fbe
Expanded on a shared transformer to encapsulate abstract product transformations
2020-11-05 21:43:45 -08:00
Christopher Allford
7fcbc69235
Added a transformer to convert between data types
2020-11-05 19:25:45 -08:00
Christopher Allford
7287eb024c
Reversed the execution of transformers for "toModel" so that things like key changes will happen first
2020-11-05 16:29:04 -08:00
Christopher Allford
d060108afe
Added a custom transformation for models to implement specific logic.
2020-11-05 14:14:47 -08:00
Christopher Allford
4f08e102c4
Simplified the transformer usage in repositories
2020-11-05 13:57:56 -08:00
Ron Rennick
9feecc1376
add/update e2e package changelogs
2020-11-05 16:57:04 -04:00
Christopher Allford
46df060c0e
Revised the ModelTransformer so that it can support more complicated transformations.
2020-11-05 12:37:40 -08:00
Nestor Soriano
8bb0f196e6
Change the strategy for moving packages
...
Since the Mozart package requires PHP 7.2, and we need to support 7.0
and 7.1, the moving step has been removed from the composer install
stage. Instead, now it has to be triggered manually via
`composer run move-vendor-namespaces`, and the moved package must be
added to source control. See the updated src/Internal/Vendor/REAMDE.md
for details.
2020-11-05 17:19:14 +01:00
Christopher Allford
67f57abe26
Added type-safe transformation functions for converting between API representations and model representation
2020-11-04 16:33:34 -08:00
Christopher Allford
f438ddc80a
Added virtually all of the data returned by the REST API to the SimpleProduct model
...
There's still a few things missing but I think this is a much better start than where we were before.
2020-11-04 14:55:58 -08:00
Ron Rennick
d0fd8acd44
add permalinks working test
2020-11-04 14:56:48 -04:00
Christopher Allford
72d09026a6
Renamed the prettyPermalinks method to better clarify its intent
2020-11-04 10:28:10 -08:00
Christopher Allford
b9ba2e880d
Added support for installations not using pretty permalinks
2020-11-03 17:04:41 -08:00
Christopher Allford
39367de732
Fixed a bug with OAuth signature generation when using query parameters
2020-11-03 17:02:12 -08:00
Roy Ho
2d6d53ed6f
Merge pull request #28127 from woocommerce/fix/duplicate-puppeteer-dependency
...
remove puppeteer dependency from main package
2020-10-30 10:34:11 -07:00
Nestor Soriano
96fce186e7
Use Mozart instead of a script to renamespace packages.
...
A custom fork of the coenjacobs/mozart package is now used to change
the namespace of the appropriate packages (only league/container
for now) instead of the previously used prefix-vendor-namespaces script.
The packages are now moved to the src/Internal/Vendor namespace instead
of being modified in-place in the vendor directory. The namespaces
are thus now prefixed with Automattic\WooCommerce\Internal\Vendor
(previously it was just Automattic\WooCommerce\Vendor).
2020-10-30 12:28:26 +01:00
Rodrigo Primo
683c8cbcd7
Merge pull request #28116 from woocommerce/fix/flaky-coupon-test
...
fix flaky e2e coupon test
2020-10-29 18:04:59 -03:00
Ron Rennick
bc2845fe3a
merge master
2020-10-29 14:27:55 -03:00
Tam Mullen
20d973975e
Merge pull request #27916 from woocommerce/add/core-tests-readme
...
add readme to core tests package
2020-10-29 17:13:40 +00:00
Ron Rennick
d30648f55f
use waitAndClick, waitForSelector where applicable
2020-10-29 12:24:50 -03:00
Ron Rennick
55313e7006
Merge branch 'master' into fix/25643
2020-10-29 10:29:16 -03:00
Ron Rennick
8830de1fa4
use delete focus selector available on order edit
2020-10-29 09:17:35 -03:00
Ron Rennick
0424bfe847
fix typo in setup instructions URL
2020-10-29 08:44:10 -03:00
Ron Rennick
21ebe3af05
remove puppeteer dependency from e2e-environment
2020-10-29 08:41:24 -03:00
Ron Rennick
ef2e226feb
use focus instead of scrollTo
2020-10-28 19:15:17 -03:00
Ron Rennick
9851c26d31
Merge branch 'master' into fix/flaky-coupon-test
2020-10-28 18:48:13 -03:00
Ron Rennick
7cb68e055c
add lerna hoist, use consistent package versions
2020-10-28 14:21:02 -03:00
Ron Rennick
038058af1e
update product new test with correct parameters
2020-10-28 13:44:33 -03:00
Tam Mullen
a0233fad93
Merge pull request #27978 from woocommerce/docs/e2e-environment-0.1.6
...
update e2e-environment readme
2020-10-28 12:51:13 +00:00
Tam Mullen
8e5bd336de
Merge pull request #27994 from woocommerce/fix/27979
...
expand e2e-utils readme, simplify exports
2020-10-28 12:50:57 +00:00
Néstor Soriano
604958c4a8
Merge pull request #28103 from woocommerce/fix/issue-27756
...
Fix/issue 27756
2020-10-28 10:06:55 +01:00
Ron Rennick
1794026773
fix flaky e2e coupon test
2020-10-27 16:44:42 -03:00
roykho
996d206ce5
Add unit test for #27756
2020-10-26 12:32:15 -07:00
Shiki
30854efc1b
Replace assertStringContainsString with strpos
...
This is to make the PHP 7.0 CI pass.
2020-10-26 13:28:04 -03:00
Shiki
ba3e107cb8
Orders V2 API: Add test for parent_name
2020-10-26 13:28:04 -03:00
Shiki
94ecfcab34
Orders API: Add parent_name to schema
2020-10-26 13:28:04 -03:00
Shiki
c6f82b96a1
Orders API: Add unit test for parent_name line_item property
2020-10-26 13:28:04 -03:00
Shiki
a05316878e
Orders API Tests: Fix failing tests because of the new property
2020-10-26 13:28:04 -03:00
Shiki
3a1b125e3a
Fix coding style
2020-10-26 13:28:04 -03:00
Ron Rennick
9d47a1c072
simplify e2e-environment exports
2020-10-21 16:17:10 -03:00
Ron Rennick
e91a09f302
remove remaining webalias fragments
2020-10-21 15:47:09 -03:00
Ron Rennick
5e2e01e7b8
add Nightly message to log, bump Travis
2020-10-21 13:25:23 -03:00
Ron Rennick
7ebfdbeb0e
add support for custom container initialization script
2020-10-21 10:53:48 -03:00
Ron Rennick
7a5cad3f99
variation test works to last uncommented step
2020-10-20 19:43:07 -03:00
Ron Rennick
bf410cc44e
use checkbox object for checking/unchecking
2020-10-20 17:21:34 -03:00
Ron Rennick
894dceee95
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
2020-10-20 11:25:36 -03:00
Claudio Sanches
f7e9c1bfb7
Merge pull request #27995 from rodrigoprimo/fix/phpcs-travis
...
Fix the Travis build job that runs PHPCS
2020-10-20 10:14:39 -03:00
Claudio Sanches
139df7bdaa
Merge pull request #27986 from woocommerce/php8/fixes-in-dependency-injection-container
...
[PHP 8] Fixes in the dependency injection engine for PHP 8 compatibility
2020-10-19 20:22:35 -03:00
Ron Rennick
503e898307
use direct exports
2020-10-19 11:32:28 -03:00
Rodrigo Primo
17471f8f66
Stop installing PHPCS globally in the Travis build job
...
PHPCS is already installed as a project dependency (we run `composer
install` for each build job) so there is no need to install it as a
global package in `tests/bin/phpcs.sh`.
2020-10-16 16:37:05 -03:00
Rodrigo Primo
eaef2409bd
Use phpcs installed locally instead of globally
...
This is an attempt to fix the PHPCS Travis build job that started
failing with the following error:
```
Running Code Sniffer.
tests/bin/phpcs.sh: line 14: phpcs: command not found
The command "bash tests/bin/phpcs.sh" exited with 127.
```
(https://travis-ci.org/github/woocommerce/woocommerce/jobs/736440739#L508 )
2020-10-16 16:36:57 -03:00
Ron Rennick
3b1481bb01
expand e2e-utils readme, simplify exports
2020-10-16 16:25:23 -03:00
Julia Amosova
ff67a7c1ce
Add note about test locations in WC Core and other projects.
2020-10-16 11:27:00 -04:00
Julia Amosova
bd5b65426f
Update README with more details on how to write e2e tests.
2020-10-16 11:20:33 -04:00
Julia Amosova
8c094daceb
Add guide for writing e2e tests in README
2020-10-16 11:20:24 -04:00
Nestor Soriano
042e2cd0bb
Fixes in the dependency injection engine for PHP 8 compatibility
...
- One dummy class used for tests had a 'final private' method, this
is not allowed in PHP 8 and so the method is now just 'private'.
- The AbstractServiceProvider class was using
ReflectionParameter::getClass. This is deprecated in PHP8 and thus
that usage has been replaced with an utility method that uses
the recommended replacement.
2020-10-16 11:31:26 +02:00
Rodrigo Primo
7599517e91
Merge pull request #27965 from woocommerce/fix/27874
...
switch to api package, bump utils package version
2020-10-15 15:05:43 -03:00
Ron Rennick
dd6d460fec
update e2e-environment readme
2020-10-15 14:53:21 -03:00
Ron Rennick
c3f934ad21
add e2e-environment package changelog
2020-10-15 14:14:22 -03:00
Ron Rennick
5815e5cf48
Merge pull request #27914 from woocommerce/fix/e2e-container-check
...
Only attempt to run E2E tests if testing host is ready
2020-10-15 13:44:55 -03:00
Ron Rennick
f0e6e1761c
Merge pull request #27913 from woocommerce/fix/27820
...
add test:e2e-debug command
2020-10-15 13:44:32 -03:00
Ron Rennick
0a7c0dc7fc
Merge pull request #27790 from woocommerce/fix/27787
...
Expose automattic/puppeteer-utils in e2e-environment
2020-10-15 09:52:52 -03:00
Néstor Soriano
e4a109f0d1
Merge pull request #27763 from woocommerce/fix/27445
...
Remove protection as we already diff and update only if needed.
2020-10-15 10:01:34 +02:00
Mahmoud Saeed
ad0eff11de
Add unit test for WC_Tax::get_tax_rate_classes()
2020-10-15 07:34:20 +02:00
Ron Rennick
f945a0e16c
switch to api package, bump utils package version
2020-10-14 15:13:08 -03:00
Ron Rennick
514e6cc308
document disabling puppeteer download
2020-10-14 13:59:37 -03:00
Vedanshu Jain
ae610d3f5f
Merge pull request #27492 from woocommerce/fix/api/229
...
Add User-friendly Attribute Names and Values to Order Line Items Metadata
2020-10-14 22:02:19 +05:30
vedanshujain
a332b399d3
Use variable instead of magic constants.
2020-10-14 18:50:44 +05:30
vedanshujain
c01f32a390
Use default value if formatted value is not available
2020-10-14 14:51:19 +05:30
vedanshujain
8e12de5d3c
Merge branch 'fix/api/229-unit-test' of https://github.com/shiki/woocommerce into fix/api/229
2020-10-14 13:53:03 +05:30
Julia Amosova
03078c5a9d
Implement `waitAndClick` in the setup e2e test.
2020-10-13 16:25:28 -04:00
Ron Rennick
13bcd43bfe
expose automattic/puppeteer-utils in e2e-environment
2020-10-13 16:16:32 -04:00
Ron Rennick
24713a45c3
restore shipping setup test
2020-10-13 16:15:07 -03:00
Shiki
1be78d1ebf
Use different terms to avoid clash with the similar V2 test
...
I suppose I could have deleted the attribute and term first but I think
this is better and shorter. Maybe.
2020-10-13 22:32:32 +05:30
Shiki
a9bf6b71ac
OrdersV2: Add test for line items meta_data
...
This currently fails because it's not implemented yet.
2020-10-13 22:32:32 +05:30
Shiki
871a9e0b8f
Add line items meta_data schema test for Orders V2 and V3
...
This currently fails because the expected meta_data properties are only
available in V3.
2020-10-13 22:32:32 +05:30
Shiki
c5fd3ed21c
WC_Tests_API_Orders: Add test data for site-level attributes
2020-10-13 22:32:31 +05:30
Shiki
62f1705690
WC_Tests_API_Orders: Rearrange order variable for clarity
2020-10-13 22:32:31 +05:30
Shiki
c16ec9bf54
WC_Tests_API_Orders: Rename first_meta_data to size_*
2020-10-13 22:32:31 +05:30
Shiki
a0d9b49e43
Add unit test for an Order's line item meta data.
2020-10-13 22:32:31 +05:30
Rodrigo Primo
5f5e739d7a
Update e2e test documentation to fix invalid example
...
This commit just updates the e2e test documentation to use a test file that exists in the section on how to run individual tests
2020-10-10 10:33:41 -03:00
Ron Rennick
903b86677c
add readme to core tests package
2020-10-09 10:31:45 -03:00
Ron Rennick
62acca06e1
don't run tests if testing host not ready
2020-10-09 05:14:57 -03:00
Ron Rennick
7f57906959
add test:e2e-debug command
2020-10-09 05:00:03 -03:00
Néstor Soriano
c15488d840
Merge pull request #27830 from woocommerce/php8/fix-round-function-with-non-numeric-argument
2020-10-09 08:01:44 +02:00
Christopher Allford
f9ef91adc1
Merge pull request #27836 from woocommerce/packages/api/add/repository-listing
...
@woocommerce/api: Added list() repository operation and classes for managing store settings
2020-10-08 13:20:12 -07:00
Christopher Allford
1d0cbc8187
Merge branch 'master' into packages/api/add/repository-listing
2020-10-08 11:48:22 -07:00
Ron Rennick
31001036c9
Merge branch 'master' into fix/25962
2020-10-08 15:30:25 -03:00
Néstor Soriano
e4b78cedbf
Merge pull request #27748 from woocommerce/remove-leftovers-from-improved-filtering-by-attribute-for-variations
...
Remove leftovers from the reverted improved filtering mechanism for variations
2020-10-08 15:45:09 +02:00
Néstor Soriano
ab529835fa
Merge pull request #27840 from woocommerce/php8/fix-required-parameters-after-optional
...
[PHP 8] Convert optional-before-required parameters into required parameters
2020-10-08 14:22:52 +02:00
Nestor Soriano
ac0641d02a
Fix a couple of incompatibilities with NumberUtils::round
...
- Passing a string that represents a number but has spaces (e.g. ' 1 ')
now works as expected (the number is properly interpreted)
- Passing the boolean true now returns 1, not 0
- Passing an object throws an error, instead of returning 0
2020-10-08 13:13:53 +02:00
Nestor Soriano
b71f876cba
Reintroduce the dependency injection related code.
...
After the League's Container package has been reintroduced, all the
code that implements the dependency injection mechanism in woocommerce
can be brought back as well.
2020-10-08 09:28:05 +02:00
Néstor Soriano
3e6861189e
Merge pull request #27848 from woocommerce/php8/remove-useless-test-assertion
...
[PHP 8] Remove a useless test assertion that fails in PHP 8
2020-10-08 09:06:39 +02:00
Ron Rennick
3a980a1241
merge current master
2020-10-07 03:17:38 -03:00
Ron Rennick
84fdfb6769
merge master
2020-10-07 03:05:04 -03:00
Julia Amosova
aac4db94b2
Merge pull request #27679 from woocommerce/packages/e2e/config-functions
...
add eslint & babel config functions to e2e-environment
2020-10-06 14:15:56 -04:00
Ron Rennick
df60bfb054
Merge pull request #27276 from woocommerce/fix/docker-ssh
...
Fix e2e docker:ssh command to work in any repo
2020-10-05 09:51:56 -03:00
Ron Rennick
610e787a86
package lock maintenance
2020-10-05 09:31:48 -03:00
Ron Rennick
5139c73029
allow running named test files that don't match test spec pattern
2020-10-05 09:16:27 -03:00
Christopher Allford
3558a9a025
Fixed a bug caused by differences in the URL when creating signatures on the client and server
2020-10-02 16:34:07 -07:00
Christopher Allford
6b5ff6d494
Fixed a bug that would cause Axios errors to be consumed by interceptors
2020-10-02 15:37:09 -07:00
Christopher Allford
b74adf215a
Adjusted the error mechanism to better follow the standard practice of rejecting HTTP errors
2020-10-02 14:10:24 -07:00
Nestor Soriano
ed33a607a7
Remove a useless test assertion that fails in PHP 8
...
The assertion is useless (the constant is already tested a few Lines
above), and it was failing in PHP 8 because 'auto' < 2 is evaluated
as false, while it's evaluated to true in PHP 7.
2020-10-02 15:27:26 +02:00
Nestor Soriano
7485b9165f
Convert optional-before-required arguments to required.
...
In PHP 8 required parameters after optional parameters in
function/method signatures trigger a deprecation notice. These type
of parameters are pointless since a value needs to always be
provided for them anyway, so they are actually de-facto required.
This commit converts all these not-so-optional parameters into
truly required parameters by removing their default values.
2020-10-02 09:45:09 +02:00
Christopher Allford
54b876fc75
Adjusted the typing of the ModelRepository and related interfaces to better distinguish between parent & child models
2020-10-01 18:06:34 -07:00
Christopher Allford
8f5ff436a2
Added support for flat parents to simplify calls with them
2020-10-01 17:48:37 -07:00
Christopher Allford
a01da2da93
Updated the lock files
2020-10-01 16:04:03 -07:00
Christopher Allford
e6efbdde34
Merge branch 'master' into packages/api/add/repository-listing
2020-10-01 15:58:48 -07:00
Christopher Allford
8ee89eb85d
Documentation fixes
2020-10-01 15:53:30 -07:00
Christopher Allford
cfa20570c1
Added appropriate HTTP errors to REST repository methods
2020-10-01 15:37:58 -07:00
Christopher Allford
f8574bed56
Added a utility service for updating settings
2020-10-01 15:23:46 -07:00
Christopher Allford
f0ad6e4fc2
Added aliases to make repository types easier to read
2020-10-01 15:00:27 -07:00
Christopher Allford
787040db4c
Adjusted the ModelRepository to make repository methods more type-safe
2020-10-01 14:31:55 -07:00
Christopher Allford
f2dda16c40
Updated lock files
2020-10-01 14:28:14 -07:00
Ron Rennick
c17b6b5ad0
Update expected industry count
2020-10-01 14:46:04 -03:00
Ron Rennick
4af90518da
lock file maintenance
2020-10-01 14:21:40 -03:00
Ron Rennick
8910357437
add missing test stubs
2020-10-01 10:25:22 -03:00
Nestor Soriano
52eed70f04
Add a 'NumberUtil' class with a 'round' method.
...
There's a number of places in the WooCommerce codebase where the
built-in function 'round' is executed passing a non-numeric value
(not a number and not a string that can be parsed as a number),
for example round(''). In PHP 7 this yields a value of 0, but in
PHP 8 this throws an error.
This commit adds a 'NumberUtil' class with a static 'round' method,
this method checks if the passed value is numeric and if so it just
executes the built-in function, otherwise it returns 0. And all the
calls to 'round' in the codebase are replaced with 'NumberUtil::round'.
2020-10-01 11:08:51 +02:00
Nestor Soriano
b1e81d02da
Fix code style/sniffer errors in a few files.
2020-10-01 11:08:51 +02:00
Christopher Allford
f6cbab8d07
Added missing static helpers for fetching repositories
2020-09-30 13:16:46 -07:00
Christopher Allford
fccf1fb66e
Added settings and group repositories with some basic functionality
2020-09-30 13:11:31 -07:00
Ron Rennick
be15429c30
restore ability to run individual tests
2020-09-30 17:05:02 -03:00
Ron Rennick
72219b2323
move merchant tests to package
2020-09-30 14:41:31 -03:00
Christopher Allford
4c2637c479
Added a `list` operation to the repository
2020-09-30 07:59:10 -07:00
Christopher Allford
f571324a09
Added better type-safety when distinguishing between resources that are children and those that are not
2020-09-29 18:40:50 -07:00
Ron Rennick
76f591251a
move front end tests to package
2020-09-29 17:00:34 -03:00
Ron Rennick
27e79f465f
split activation, onboarding, setup tests into separate files
2020-09-29 16:16:43 -03:00
Christopher Allford
8c5548d06e
Added @template JSDoc tag to API package for better IDE support
2020-09-29 12:00:09 -07:00
Ron Rennick
1abbe3f273
initial core test package files, move setup tests to package
2020-09-29 15:22:20 -03:00
Ron Rennick
fd60f7052a
Merge branch 'master' into fix/e2e-url-no-port
2020-09-28 16:15:22 -03:00
Christopher Allford
ef93f22321
Moved the product model for consistency with other model types
2020-09-25 14:08:19 -07:00
Christopher Allford
789773c65c
Fixed E2E test
2020-09-25 14:05:11 -07:00
Christopher Allford
44c7428358
Updated package lock files and fixed test error
2020-09-25 13:49:54 -07:00
Christopher Allford
760b0e4cdb
Merge branch 'master' into packages/factories-to-api-refactor
2020-09-25 13:19:36 -07:00
Christopher Allford
c09d91f6ce
Finished adding appropriate documentation to the API package
2020-09-25 11:11:17 -07:00
Ron Rennick
6b7d67e587
update onboarding flow for 4.6
2020-09-25 12:06:45 -03:00
vedanshujain
d51dd26816
Add unit tests.
2020-09-25 19:41:20 +05:30
Christopher Allford
ca0ea88e52
Updated the JSDoc and type-safety of repositories to better document the implemented operations
2020-09-24 14:22:38 -07:00
Ron Rennick
2ab59149ad
revert testing change to default.json
2020-09-24 12:27:35 -03:00
Julia Amosova
dcd0c46ab5
Merge pull request #27714 from woocommerce/fix/headless-flag-e2e-dev-mode
...
Add missing headless flag for running e2e tests in dev mode + README updates
2020-09-23 17:05:45 -04:00
Ron Rennick
bde41799af
merge master
2020-09-23 17:20:43 -03:00
Ron Rennick
a80dc37684
merge master
2020-09-23 16:26:17 -03:00
Ron Rennick
3fbdf46192
always remove the trailing slash from the base URL
2020-09-23 16:22:15 -03:00
Nestor Soriano
a94ea7f51f
Remove logic for storage of attribute terms for variations
...
A mechanism for improved filtering by attribute for variations was
introduced some time ago. This mechanism implied maintaining term
relationships for variations, where the terms were the attributes
that defined the variation.
The mechanism was reverted because it was complex and presented many
issues, but the code that created those term relationships was kept.
This pull request removes that code and the associated unit tests.
2020-09-22 16:31:06 +02:00
Christopher Allford
a7175c5ad4
Adjusted create method signature to better replicate TypeScript behavior
2020-09-21 13:44:45 -07:00
Christopher Allford
1674c05b66
Fixed the package.json files array to exclude development content
2020-09-21 13:33:57 -07:00
Christopher Allford
5297b27c79
Moved the factories from the @woocommerce/api package into the @woocommerce/e2e-utils package
2020-09-21 13:14:26 -07:00
Christopher Allford
b962c10cee
Updated the readme for the API package
2020-09-21 12:32:44 -07:00
Christopher Allford
fba5a46243
Integrated the API package into the utils package again to generate simple products
2020-09-21 11:22:43 -07:00
Christopher Allford
8e7ef263a2
Adjusted the package exports to be easier to consume
2020-09-21 11:21:35 -07:00
Julia Amosova
12d546b280
Add `PUPPETEER_SLOWMO` to global process.env to enable it.
2020-09-20 15:34:47 -04:00
Julia Amosova
c78051c7a5
Place back `scrollIntoView` to OBW e2e test.
2020-09-18 19:15:53 -04:00
Julia Amosova
ff8e5bbc8b
Remove `scrollIntoView` from OBW e2e test as it is not needed.
2020-09-18 18:33:21 -04:00
Christopher Allford
27d8892b28
Merge branch 'master' into packages/factories-to-api-refactor
2020-09-18 14:45:39 -07:00
Christopher Allford
bf70a3ea74
Updated lock files
2020-09-18 14:43:00 -07:00
Christopher Allford
d22ed6547e
Merge branch 'master' into package/e2e-environment/better-container-detection
2020-09-18 14:32:11 -07:00
Christopher Allford
866ab47dda
Adjusted the exports for clarity of use
2020-09-18 14:26:00 -07:00
Julia Amosova
6a93c8dd68
Added note to README on how to use `PUPPETEER_SLOWMO` variable.
2020-09-18 16:53:48 -04:00
Christopher Allford
b3b92e2d4d
Separated the construction of factories & repositories from the models for simplicity
2020-09-18 13:53:10 -07:00
Julia Amosova
30c904db68
Added `headless` & `slowMo` flags back to Puppeteer config.
2020-09-18 16:39:45 -04:00
Julia Amosova
38f14747fa
Update commands that need to be run to build e2e test env.
2020-09-18 16:05:36 -04:00
Julia Amosova
68c06683e7
Add note regarding re-initializing test container when `docker:down/up`.
2020-09-18 15:26:50 -04:00
Julia Amosova
24b987a409
Add link to `Test Variables` section when mentioning changing the port.
2020-09-18 15:22:25 -04:00
Julia Amosova
6a562f8dfa
Correct type: from `MariaDV` to `MariaDB` throughout e2e README.
2020-09-18 15:17:59 -04:00
Julia Amosova
085d7d884f
Add `Install NVM` section to README's Table of Contents.
2020-09-18 14:52:46 -04:00
Julia Amosova
2455a82f36
Add to README how to run tests using custom WP, PHP and MariaDV versions.
2020-09-18 14:48:26 -04:00
Julia Amosova
d66e7ef3b3
Update README with more accurate details on how to run e2e tests.
2020-09-18 14:30:54 -04:00
Julia Amosova
98edbef9a9
Add missing headless flag for running e2e tests in dev mode.
2020-09-18 13:43:44 -04:00
Ron Rennick
9915a5b142
merge master
2020-09-18 12:53:28 -03:00
Rodrigo Primo
197e8d274c
Merge pull request #27616 from woocommerce/fix/26960
...
Paypal gateway: protect code against a fatal error if WooCommerce is unable to communicate with PayPal
2020-09-18 09:34:57 -03:00
vedanshujain
140dafb704
Add unit tests for when PayPal API will return error
2020-09-18 17:12:33 +05:30
Claudio Sanches
29b8b0d60d
Merge pull request #27701 from woocommerce/fix/rest-api-package-tag
...
Fixed usage of package tag in REST API and templates
2020-09-17 18:45:14 -03:00
Christopher Allford
a9ee9806a4
Implemented the factory & repository for simple products
2020-09-17 13:31:39 -07:00
Claudio Sanches
7fae819928
Fixed package tag
2020-09-17 14:34:36 -03:00
Christopher Allford
6c230ca7b3
Centralized the CRUD actions into a single kind of repository that can be easily used in every adapter case
2020-09-17 09:43:43 -07:00
Claudio Sanches
3377c60c5e
Merge pull request #27433 from woocommerce/fix/remove-relative-include-paths
...
Change relative include paths to absolute include paths
2020-09-17 13:15:40 -03:00
Claudio Sanches
70c7adfeb7
Fixed usage of package tag in REST API and templates
2020-09-17 11:56:08 -03:00
Claudio Sanches
ed1a59b39b
Merge pull request #27416 from woocommerce/fix/27415
...
Fixed country list sorting
2020-09-17 10:35:43 -03:00
Christopher Allford
3a7c96b7cd
Revised the base tsconfig to match Gutenberg more closely
2020-09-16 15:14:53 -07:00
Christopher Allford
011974ec09
Merge branch 'master' into packages/factories-to-api-refactor
2020-09-16 11:51:49 -07:00
Christopher Allford
f5e130c190
Merge pull request #27667 from woocommerce/fix/standardize-nvm-usage
...
Standardize usage of NVM
2020-09-16 11:40:48 -07:00
Christopher Allford
38afb8c2ff
Merge branch 'master' into packages/factories-to-api-refactor
2020-09-15 14:49:22 -07:00
Ron Rennick
87ea5dbffc
add eslint, babel config functions
2020-09-15 14:08:19 -03:00
Ron Rennick
7c509d8ddb
use tabs for indentation
2020-09-15 10:10:59 -03:00
Ron Rennick
0bf505ab12
Merge pull request #27645 from woocommerce/update/e2e-utils-for-package
...
prep e2e-utils package for publish
2020-09-14 14:40:19 -03:00
Christopher Allford
a77a1cc77c
Refreshed all lock files and removed "woocommerce" dependency from "e2e-environment"
2020-09-14 10:00:32 -07:00
Ron Rennick
be8ba23801
merge master
2020-09-11 15:32:10 -03:00
Ron Rennick
cd80e67717
merge master
2020-09-11 14:35:27 -03:00
Christopher Allford
2e7f1056e0
Replaced the environment dependency version resolution to use the Docker HTTP API
...
Since it's possible that the latest git tag isn't a Docker page we should get the latest version directly from Docker instead. This commit adds support for the `/v2/repositories/library/<image>/tags` endpoint and figures out the latest version from the response.
2020-09-10 14:26:44 -07:00
Christopher Allford
07bbf56ace
Removed unnecessary `woocommerce` dependency from E2E package
2020-09-10 13:05:31 -07:00
Ron Rennick
238fe43a61
prep e2e-utils package for publish
2020-09-10 16:10:48 -03:00
Claudio Sanches
b5d8d94bc8
Use reference in wc_asort_by_locale
2020-09-10 16:02:39 -03:00
Ron Rennick
0d3889a360
Merge pull request #27113 from woocommerce/add/e2e-feedback-blockers
...
Incorporate blocking issues feedback on initial e2e environment package
2020-09-10 15:56:09 -03:00
Ron Rennick
1c07d5ec5a
restore looking up tags from git, add npm install to travis e2e script
2020-09-10 14:54:35 -03:00
jonathansadowski
2bcdbacc98
Merge pull request #27625 from woocommerce/revert-improved-filtering-for-variations
...
Revert improved filtering for variations
2020-09-10 12:42:15 -05:00
Ron Rennick
bff1e799f4
use better test for creating ready page
2020-09-10 13:23:18 -03:00
Christopher Allford
14c46fa4c2
Merge branch 'master' into add/e2e-feedback-blockers
2020-09-09 14:47:51 -07:00
Christopher Allford
d0e6110e93
Fixed a failing E2E test
2020-09-09 14:47:44 -07:00
Christopher Allford
aabc8ccd6b
Updated all of the package-lock files using Node v10
2020-09-09 14:47:35 -07:00
Ron Rennick
25cbfd2452
run grunt directly in travis e2e
2020-09-09 17:00:06 -03:00
Christopher Allford
ae697f9fe2
Prevented zero from being considered empty when validating posted variation attributes
2020-09-09 11:29:31 -07:00
Christopher Allford
63e4dcf4a2
Created a transformer class to use in model repositories
...
Since models need to support both read & write transformations we can make dealing with this a bit easier in its own class now.
2020-09-09 10:00:30 -07:00
Nestor Soriano
70a1cb2f1f
Revert improved filtering for variations.
...
This commit reverts the functionality introduced in PR #26260
(later refined by #27175 , #27190 , #27508 ) in which filtering by
attribute using the layered nav widget was improved to handle the
cases of variations out of stock. The revert is a response to the
numerous problems reported by users in Woo 4.4 and 4.5
Not all the code has been reverted, only the code that resulted in
visible functionality changes. Thus, the code that generates
term relationships for variations is still in place to keep database
consistency and to keep the reverting changes to the minimum needed.
2020-09-09 17:36:26 +02:00
jonathansadowski
d00083f1ec
Merge pull request #27628 from woocommerce/fix/27624
...
Check for state and postcode fields only if required
2020-09-09 09:41:57 -05:00
vedanshujain
6a2ea0e27a
Add unit test for show_shipping for different countries.
2020-09-09 19:53:21 +05:30
Ron Rennick
21e099d48f
merge master
2020-09-09 11:17:20 -03:00
Claudio Sanches
e0f08cc65a
Use global phpcs
2020-09-08 16:53:13 -03:00
Claudio Sanches
f748a71a8e
Install globally
2020-09-08 15:56:06 -03:00
Claudio Sanches
aa57d2f676
Update sniffs installation
2020-09-08 15:11:42 -03:00
jonathansadowski
168698cd91
Merge pull request #27589 from woocommerce/enhance-query-for-filtering-attributes-with-any-value
...
Enhance the query for "Any" variations in filter by attribute widget
2020-09-08 11:58:54 -05:00
Christopher Allford
39c5bc6b74
Refactored the factory to use a repository instead of an adapter so that we can expose more API functionality
2020-09-07 16:00:27 -07:00
Christopher Allford
a875ecb083
Refactored the HTTP layer to be more API-agnostic
...
Since we're going to be adding more services and CRUD actions it makes sense for our HTTP services to be less tied to the specific REST API implementation.
2020-09-04 11:27:34 -07:00
Julia Amosova
e224cd4b1b
Update how disablement of the extensions download is handled in OBW test
2020-09-04 11:47:02 -04:00
Nestor Soriano
43642f7835
Enhance the query for "Any" variations in filter by attribute widget.
...
The new query fixes a bug where variations were being counted twice:
if a product was included in both the queries then it would be counted
differently and added; e.g. when a product had two variations,
one with "Any" attribute and other with a attribute that has a value.
The new query also optimizes performance, so that filter conditions
can be improved and better indexes can be used.
2020-09-04 11:29:50 +02:00
Julia Amosova
4ca4f37969
Update recommended business features checkbox selector in OBW test
2020-09-03 16:23:19 -04:00
Christopher Allford
c75f0f8886
Renamed the `@woocommerce/factories` package to `@woocommerce/api`
...
With the plan now to add more CRUD actions the scope of the package has transformed into a more general API package than one just for factories.
2020-09-03 12:28:17 -07:00
Julia Amosova
552545c0ac
Update number of industries in the loop from 10 to 9
2020-09-03 13:17:47 -04:00
jonathansadowski
ecb25d7dc8
Merge pull request #27572 from woocommerce/update/bump-wc-admin-to-1.5.0-rc.4
...
Bump WooCommerce Admin to 1.5.0-rc.4; WooCommerce to 4.5.0-rc.3
2020-09-02 19:21:52 -05:00
Christopher Allford
c898e1de03
Fixed failing E2E test
2020-09-02 16:14:25 -07:00
Christopher Allford
f5771ebd0a
Fixed failing E2E test
2020-09-02 16:13:20 -07:00
Christopher Allford
b9d314e1ae
Fixed another E2E test
2020-09-02 15:47:15 -07:00
Christopher Allford
dde64b964f
Updated lock files & fixed failing E2E test
2020-09-02 14:50:08 -07:00
Christopher Allford
d3162b2f1d
Updated package-lock.json files
2020-09-02 14:39:49 -07:00
Christopher Allford
aee44c2935
Merge remote-tracking branch 'origin/master' into add/e2e-feedback-blockers
2020-09-02 12:47:40 -07:00
Christopher Allford
16cf8c81be
Revised the default environment variables to pull the version from the latest docker image
2020-09-02 12:47:27 -07:00
jonathansadowski
53c22ba4e4
Merge pull request #27508 from woocommerce/fix/27419
...
Fix filter by attribute widget now working for "Any..." attributes
2020-09-02 13:32:54 -05:00
Shiki
d6600d8338
Version3/orders.php: Re-add assertion for `meta_data`
2020-09-01 14:29:38 -06:00
Shiki
5651befdd9
Version3/orders.php: Remove assertion for `meta_data`
...
The new meta_data output will include keys like `display_key` and
`display_value`. The assertion will be re-added in a later commit.
2020-09-01 14:22:38 -06:00
Shiki
64bd1e0fd5
Fix formatting errors in orders.php
2020-09-01 14:21:14 -06:00
Nestor Soriano
07b62dabbd
Improve the query to retrieve "Any..."-attributed variations in filtering widget
...
The new query doesn't need empty attribute entries in the meta table,
therefore the code that generates them and the migration to backfill
the missing existing ones have been removed.
2020-09-01 16:47:41 +02:00
Nestor Soriano
3a583feab1
Change filter by attributes widget to count products, not variations.
...
Right now the filter by attributes widget counts available variations
(for variation products). This is confusing since the counter shows
numbers that are higher than the actual count of products displayed.
This commit changes the query used by the widget so that instead
of counting variations it returns the parent product ids, and then
counts the distinct values. This also covers the case of products
where some of the variations have concrete values and some have
"Any..." values.
2020-08-31 12:22:33 +02:00
Ron Rennick
0b85ee58f8
update package-lock.json
2020-08-28 11:06:25 -03:00
Ron Rennick
17ee223e71
update package-lock.json
2020-08-28 11:03:28 -03:00
Ron Rennick
8fe3bcb90e
rebase to current master
2020-08-28 10:59:43 -03:00
Claudio Sanches
085b4b53fa
Merge pull request #27487 from woocommerce/update/choice-of-words
...
Improve choice of words
2020-08-27 19:30:54 -03:00
Nestor Soriano
1113201f8b
Update meta 'attribute_' values when variation attributes are added or removed.
...
When a new variation attribute is added, the corresponding 'attribute_'
meta entries are added for all variations with an empty value;
and when an existing variation attribute is removed, the existing
'attribute_' meta entries are deleted for all variations.
This is necessary for the filter by attribute widget to work properly
when variations exist with a value of "Any..." for attributes.
2020-08-27 16:10:41 +02:00
Nestor Soriano
a75da34a45
Fix filter by attribute widget now working for "Any..." attributes
...
When a variation product has an attribute with a value of "Any...",
and there's a filter by attribute widget for that attribute, then
that product won't be included in the counts displayed in the widget
(and if the count ends up being zero, the attribute won't be shown
in the widget).
This happens before since Woo 4.4, this widget works by looking at
entries in the term relationships table for varitions too
(used to do so for simple products and for "main" variable products
only), see PR #26260 ; but there are no such entries for
"Any..." attributes.
This commit fixes that by extending the SQL query used by the widget
to look for variations that have empty attribute values in the meta
table too.
2020-08-27 10:59:15 +02:00
Claudio Sanches
c4ccc38780
Fixed use __DIR__ for relative paths
2020-08-26 18:46:44 -03:00
Shiki
ecb2936f9e
Use different terms to avoid clash with the similar V2 test
...
I suppose I could have deleted the attribute and term first but I think
this is better and shorter. Maybe.
2020-08-26 23:51:36 +05:30
Shiki
face3fe27e
OrdersV2: Add test for line items meta_data
...
This currently fails because it's not implemented yet.
2020-08-26 23:51:36 +05:30
Shiki
ad00eb3a98
Add line items meta_data schema test for Orders V2 and V3
...
This currently fails because the expected meta_data properties are only
available in V3.
2020-08-26 23:51:36 +05:30
Shiki
2a01aa968f
WC_Tests_API_Orders: Add test data for site-level attributes
2020-08-26 23:51:36 +05:30
Shiki
dc2a4d1ccc
WC_Tests_API_Orders: Rearrange order variable for clarity
2020-08-26 23:51:36 +05:30
Shiki
00a5c3101e
WC_Tests_API_Orders: Rename first_meta_data to size_*
2020-08-26 23:51:36 +05:30
Shiki
d681a8c7a4
Add unit test for an Order's line item meta data.
2020-08-26 23:51:36 +05:30
Claudio Sanches
5240682f38
Improve choice of words
2020-08-25 18:03:03 -03:00
Claudio Sanches
a133e56ebd
Fixed unit tests
2020-08-25 16:13:49 -03:00
Ron Rennick
81dae70033
phpcs fixes
2020-08-25 15:41:31 -03:00
Ron Rennick
de79f1a3cd
update unit tests for included Paypal gate name change
2020-08-25 15:36:50 -03:00
Ron Rennick
074b2b86c6
update package-lock.json
2020-08-21 13:39:33 -03:00
Ron Rennick
7a14368982
add small tweaks/checks for edge cases
2020-08-21 13:25:30 -03:00
Tam Mullen
b41bd5139d
Updating e2e test for OBW changes
2020-08-21 16:03:02 +01:00
Ron Rennick
51afe3207a
Merge pull request #27023 from HikeMike/add/hidden-form-field
...
"Hidden" field type added to woocommerce_form_field() #26468
2020-08-20 11:48:26 -03:00
Claudio Sanches
47aaac8600
Introduced wc_asort_by_locale() function
2020-08-19 20:22:18 -03:00
Claudio Sanches
b5221ab479
Added unit tests for changes in wc_ascii_uasort_comparison
2020-08-19 19:00:18 -03:00