Commit Graph

2706 Commits

Author SHA1 Message Date
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
Claudio Sanches 98d5f52de2 Merge branch 'master' into add/woorelease-support 2020-08-19 12:10:15 -03:00
Ron Rennick dfdf4e9d18 update e2e config parsing to support no port 2020-08-19 09:57:14 -03:00
Christopher Allford 358db5dc3e Removed the internals of the Container pending package conflict resolution
Since reverting the PR at this point would be a mess I've gone ahead and removed the internals of the container. We should aim to keep the class since it's now part of our public API but it won't work as expected anymore. This is fine for now since we don't actually have anything in it!
2020-08-18 20:39:48 -07:00
Claudio Sanches 9773675b8d Merge branch 'master' into add/woorelease-support 2020-08-18 17:59:47 -03:00
Claudio Sanches e102ec3d83 Merge branch 'master' into fix/25133 2020-08-17 14:59:49 -03:00
Néstor Soriano f1ed7005f9
Merge pull request #26232 from woocommerce/update/e2e-test-utils
Update/e2e test utils
2020-08-17 15:26:13 +02:00
Claudio Sanches bb0c4406de
Merge pull request #27314 from woocommerce/add/unit-tests-27108
Added unit tests for #27244
2020-08-14 15:32:02 -03:00
Ron Rennick 45391c4b18 update unit test for account page being automatically created 2020-08-14 10:36:16 -03:00
Ron Rennick f0ad8a01be merge current master 2020-08-13 14:33:07 -03:00
Vedanshu Jain a887cd7369
Merge pull request #27318 from woocommerce/fix/27282
Change data-type from mixed to composite and date-time to string on the fly for REST API
2020-08-13 21:25:11 +05:30
vedanshujain 7fa6510c1a Add a explicit test for null as well 2020-08-13 16:52:16 +05:30
vedanshujain dd9b9cfae2 Add test for update in date-time field 2020-08-13 16:32:00 +05:30
vedanshujain 4294e06f7a Add test for variation v2 controller for complex meta object 2020-08-13 15:46:31 +05:30
vedanshujain 9f680aa120 Add test for null meta value as well 2020-08-13 14:17:28 +05:30
vedanshujain 826fdde721 Add unit tests for checking that updating complex meta is possible 2020-08-13 13:27:00 +05:30
Néstor Soriano 4c636b1d5c
Merge pull request #27303 from woocommerce/fix/travis-coding-standards-test
Fix coding standards test on Travis
2020-08-13 09:19:13 +02:00
Claudio Sanches 1839feae91 Added unit tests for #27244 2020-08-12 18:50:25 -03:00
Christopher Allford 7340c9af44
Merge pull request #27171 from woocommerce/fix/25543
Added the parent's SKU to product searches for variations
2020-08-12 12:58:00 -07:00
Claudio Sanches 1699b34295 Use npm run build:core 2020-08-12 16:53:06 -03:00
Christopher Allford 7071c6dc0c
Merge pull request #27228 from woocommerce/feature/container-injection-change
Dependency Injection should use method injection instead of constructor injection
2020-08-12 12:41:48 -07:00
Claudio Sanches 521ad8c3ff Update all dependencies of woocommerce-sniffs 2020-08-11 20:42:42 -03:00
Claudio Sanches 7fdf209713 Check if PHPCS is installed before trying to install a new copy 2020-08-11 20:08:28 -03:00
Claudio Sanches 29bc98816e
Merge pull request #27143 from woocommerce/fix/26876
Fix "Hide shipping costs until an address is entered"
2020-08-11 20:06:17 -03:00
Ron Rennick 4ba2e0267f remove unused local test-e2e.json 2020-08-11 09:53:34 -03:00
Tam Mullen 9ad9ff2df8 Fixing import path 2020-08-11 12:26:53 +01:00
Tam Mullen c8365213c3 Fixing import path. 2020-08-11 00:34:57 +01:00
Tam Mullen ed525087ac Addressing comments. 2020-08-10 21:27:20 +01:00
Tam Mullen b2262f1cf7 Updating exports for completeOnboardingWizard function. 2020-08-10 21:26:11 +01:00
Tam Mullen 2bc918d353 Updating e2e-utils formatting. 2020-08-10 21:26:10 +01:00
Tam Mullen cdaefa332e Updating e2e-utils formatting. 2020-08-10 21:26:10 +01:00
Tam Mullen 4544190462 Updating e2e-utils dependencies. 2020-08-10 21:26:10 +01:00
Tam Mullen ead4b93a7d Adding e2e-utils README 2020-08-10 21:26:10 +01:00
Tam Mullen da1916c663 Updating product test dependencies 2020-08-10 21:26:10 +01:00
Tam Mullen 43c55e2c6a Converting e2e-utils to package. 2020-08-10 21:26:10 +01:00
Ron Rennick 0b0595ab4c
Merge pull request #27048 from vallter2/postcode-bih
Add postcode validation for Bosnia and Herzegovina
2020-08-10 16:24:06 -03:00
Ron Rennick c14ce54752 fix e2e docker:ssh command to work in any repo 2020-08-10 14:54:10 -03:00
Christopher Allford 116e11565a
Merge pull request #27262 from woocommerce/fix/unit-tests-coding-standards
Fixed packages required to run code sniffer on unit tests
2020-08-10 06:57:05 -07:00
Christopher Allford 12397aec0e Added `_with` suffix to `StringUtil` methods for clarity 2020-08-07 16:45:35 -07:00
Christopher Allford 13a3b80cb6 Removed classes accidentally added back by merge from master 2020-08-07 16:45:09 -07:00
Christopher Allford eb65252ba8 Merge branch 'master' into feature/container-injection-change 2020-08-07 14:35:44 -07:00
Christopher Allford 081f0d9133 Settled on an injection method of `init`
1. Since our code style dictates that these be `final` methods, we shouldn't be concerned about overlap.
2. There is precedent for `init` methods as requirements before using class instances.
2020-08-07 14:28:29 -07:00
Claudio Sanches 02cf0dfaed
Merge pull request #27239 from woocommerce/fix/package-tag
Fix usage of "package" tag in file headers
2020-08-07 13:37:24 -03:00
Claudio Sanches 17f9883f00 Changed | to \ 2020-08-07 13:36:41 -03:00
Claudio Sanches 48732ee0dd Fixed package tag 2020-08-07 13:35:15 -03:00
Claudio Sanches 3fd42a0fd5 Fixed packages required to run code sniffer on unit tests 2020-08-07 13:28:41 -03:00
Ron Rennick 6aa52c8499 remove duplicate readme text 2020-08-07 13:04:36 -03:00