Commit Graph

2107 Commits

Author SHA1 Message Date
Peter Fabian 6410ef9156 Updated since tags for the upcoming version. 2020-01-31 18:03:54 +01:00
Peter Fabian a9a64fcee0
Merge pull request #25482 from woocommerce/fix/cart-e2e-test
Fix failing cart e2e test: fix setup wizard logic if new onboarding is presented
2020-01-30 12:51:56 +01:00
Julia Amosova 3dfc8f3dc5 Remove unnecessary 2nd setup wizard flow for the new onboarding 2020-01-30 11:29:28 +00:00
Julia Amosova 18d93e321a Update setup wizard test logic 2020-01-30 10:38:10 +00:00
Claudio Sanches 052fbfcb8c Test WC_Email::style_inline() 2020-01-29 17:07:18 -03:00
Christopher Allford 6ad091a9b7 Changed all of the constant accesses into corresponding Automattic\Jetpack\Constants usages 2020-01-28 21:21:29 -08:00
Christopher Allford bb09a8a4ea Prevented the COD payment gateway's "enable_for_methods" option loading outside of correct use-cases
Note: The tests fail in this commit because of the defines. Ran individually there are no problems, but I'm going to make another PR to merge in a package to make testing constants possible, and then come back to fix this after it gets merged.
2020-01-28 14:33:53 -08:00
Claudio Sanches b3ea0b17b4 Merge branch 'master' into refactor/eu-vat-brexit 2020-01-27 13:15:54 -03:00
Julia Amosova 0a5c866bc4 Remove taking screenshots sent to AWS on failed tests 2020-01-24 17:17:52 +00:00
Julia Amosova d4c8719d1f Remove the process of building legacy e2e test site 2020-01-24 17:05:18 +00:00
Julia Amosova eb92d35d96 Remove DB (used for the initial setup) that is no longer needed 2020-01-24 17:05:17 +00:00
Julia Amosova 2415cf1952 Fix setup wizard logic if new onboarding is presented 2020-01-24 14:37:27 +00:00
Julia Amosova 26ade8bb1f Add 1 second wait time between 2 UI blocks / AJAX calls 2020-01-22 16:52:35 +00:00
Rodrigo Primo 4e58f77575
Merge pull request #25322 from woocommerce/pr-25242
Prevent fatal error in set_current_gateway with no WC session
2020-01-17 09:54:03 -03:00
Rodrigo Primo 2668bf6025
Merge pull request #25314 from woocommerce/fix/24746
Removed the lowercase conversion of product search terms
2020-01-16 16:29:07 -03:00
Rodrigo Primo 8aad482bc1 Fix typo 2020-01-16 15:31:50 -03:00
Rodrigo Primo cb85c981ac Merge branch 'master' into pr-25242 2020-01-16 15:30:58 -03:00
Claudio Sanches bccb93fa3c
Merge pull request #25378 from woocommerce/fix/25361
Add license key support to MaxMind GeoLite2 database downloads
2020-01-15 20:51:14 -03:00
Rodrigo Primo 793dba81f1 Fix failing unit test
This commit fixes the unit test
WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_return_error_when_invalid_image_is_passed() which was failing due to a change in a WordPress core message with the following error:

```
2) WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_return_error_when_invalid_image_is_passed

Failed asserting that two strings are equal.

--- Expected

+++ Actual

@@ @@

-'Invalid image: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.'

+'Invalid image: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini file or by post_max_size being defined as smaller than upload_max_filesize in php.ini.'

/home/travis/build/woocommerce/woocommerce/tests/unit-tests/util/api-functions.php:89
```

(https://travis-ci.org/woocommerce/woocommerce/jobs/637353161#L402)

This test only fails when using WordPress nightly build (the yet to be
released WP 5.4).

To fix this problem, this commit adds an if statement to check for different error
messages depending on the WordPress version that is being used to run
the tests. In the future, we might want to refactor this test to remove
its dependency to a WordPress error message to make it more robust and
stable.
2020-01-15 11:17:49 -03:00
Claudio Sanches 992e13fb08 Updated implementation of geolite2 2020-01-14 16:24:07 -03:00
Christopher Allford 7a5083e47b Revert "Added a database option to allow for selecting different MaxMind databases"
This reverts commit d32c470cea.
2020-01-13 14:41:24 -08:00
Christopher Allford d32c470cea Added a database option to allow for selecting different MaxMind databases 2020-01-13 14:10:08 -08:00
Christopher Allford 6d3a3053c5 Moved the database file into the woocommerce_uploads folder 2020-01-13 08:53:43 -08:00
Christopher Allford 645affb7f3 Removed permanently failing unit test for deprecated GeoLite2 library integration 2020-01-13 08:17:11 -08:00
Christopher Allford 4f6aec61fd Added support for a randomized MaxMind database file prefix 2020-01-13 08:16:44 -08:00
vedanshujain f0f3b21a36 Added unit tests for setting current gateway 2020-01-13 14:18:59 +05:30
Claudio Sanches f253c87096 Fixed unit tests 2020-01-10 17:14:44 -03:00
Claudio Sanches 49aed6f6ca Remove alternatives for deprecated methods 2020-01-10 16:31:27 -03:00
Claudio Sanches 48547143f4 Fixed integration ID 2020-01-10 15:02:56 -03:00
Christopher Allford f5cbca5beb Added unit tests for the MaxMind integration class 2020-01-10 02:47:43 -08:00
Christopher Allford 19ded6609d Refactored the MaxMind database class to not use static methods in order to make testing the integration class easier 2020-01-10 02:09:51 -08:00
Christopher Allford bbbfc3bfab Moved the MaxMind geolocation lookup into the integration class 2020-01-09 23:46:25 -08:00
Christopher Allford f91ff82806 Moved the loading of the database class into the integration 2020-01-09 21:29:47 -08:00
Christopher Allford bf057927ae Moved the loading of integration classes into the WC_Autoloader 2020-01-09 15:46:01 -08:00
Christopher Allford 3e597e6f68 Replaced the Geolocation database fetching functionality with MaxMind integration 2020-01-09 00:31:51 -08:00
Christopher Allford f23c26a9f9 Fixed a permissions conflict caused by the dummy GeoLite2 archive's date
The test would fail if the web server had stored the data already!
2020-01-08 22:56:07 -08:00
Christopher Allford 95e59fc777 Made the database service class methods static for convenience \ 2020-01-08 21:59:04 -08:00
Christopher Allford 1eb49ef8b8 Added filterable support for fetching the database path
This replaces the corresponding geolocation class functionality. We are deprecating the woocommerce_geolocation_local_database_path filter in favor of the woocommerce_maxmind_geolocation_databse_path filter. Since we want the option to turn this into a feature plugin, it's wise to make sure nothing is too generic.
2020-01-08 21:48:05 -08:00
Christopher Allford 46d7f16b19 Added support for downloading and extracting the GeoLite2 database 2020-01-08 21:09:35 -08:00
Christopher Allford a477f9367d Added support for creating default integrations 2020-01-08 21:05:14 -08:00
Claudio Sanches 85a077b939 Coupon race condition prevention 2020-01-06 19:44:24 -03:00
Claudio Sanches 2ce4a60ff1
Remove old unit test 2020-01-06 19:37:47 -03:00
Vedanshu Jain d76c5b734c
Merge pull request #25300 from woocommerce/fix/25274-docker-mount-dir
E2E Tests: mount directory instead of copy.
2019-12-26 17:36:14 +05:30
vedanshujain 42dd1bf32b Add an address so that shipping can be calculated 2019-12-26 14:04:52 +05:30
vedanshujain 31726d1a37 Update version numbers 2019-12-26 13:55:43 +05:30
Christopher Allford ac22406763 Fixed the unit tests broken by the requirement that a valid address must be set to calculate shipping rates 2019-12-26 13:55:43 +05:30
Christopher Allford 027257f624 Changed the dummy postal code in the order helper to a valid one 2019-12-26 13:55:42 +05:30
Christopher Allford c54fa91145 Added unit tests for checking whether a package is shippable or not 2019-12-26 13:55:41 +05:30
Christopher Allford e800b40ad6 Made packages with incomplete destinations unshippable 2019-12-26 13:55:41 +05:30
Christopher Allford 874be93c14 Removed the lowercase conversion of product search terms
When searched in a case sensitive manner, the conversion to lowercase causes uppercase matches that would have been found to be lost. This change increases the tolerance of the OR search format while also removing this unintended side-effect.
2019-12-24 15:00:40 -08:00
Jeff Stieler 7c0511baaa Fix typo in docker service name. 2019-12-23 13:14:14 -05:00
Jeff Stieler 5c67310e48
Fix typo in test installation instructions. (#25298) 2019-12-23 11:32:54 -05:00
Rodrigo Primo 487f96d844 Fix WordPress.DateTime.CurrentTimeTimestamp vilations
This commit fixes all violations of the WordPress.DateTime.CurrentTimeTimestamp sniff automatically using phpcbf.
2019-12-20 14:23:05 -03:00
Rodrigo Primo 62d6b05b58 Fix Generic.Formatting.MultipleStatementAlignment violations
This commit fixes all violations of the Generic.Formatting.MultipleStatementAlignment sniff automatically using phpcbf.
2019-12-20 14:21:08 -03:00
Rodrigo Primo 94373f78ea Fix WordPress.Arrays.MultipleStatementAlignment errors automatically using phpcbf 2019-12-20 13:51:26 -03:00
Julia Amosova 8854d0d074 Update comments in `run-e2e-CI.sh` 2019-12-20 00:10:44 +00:00
Julia Amosova 9397565d22 Add max amount of time waiting for the Docker container to be built 2019-12-19 22:48:03 +00:00
vedanshujain ff2a8a58f2 Commented out flaky test 2019-12-17 19:13:19 +05:30
vedanshujain 9b7343d23b Applied coding standards 2019-12-17 19:13:19 +05:30
vedanshujain 53bfcea110 Use same filter for stocks and coupon for consistency. 2019-12-17 19:13:19 +05:30
vedanshujain 72545c44b7 Add support for `_held_for_checkout` records to improve performance.
This will also improve transactional stability and avoid race conditions by providing a way to lock usage counts.
2019-12-17 19:13:19 +05:30
Julia Amosova 1658dd3962 Make setup wizard test more stable 2019-12-15 22:55:39 +00:00
Julia Amosova f9a9fbc2c7 Pass jest exit code to npm 2019-12-15 22:34:35 +00:00
Julia Amosova 88fa2885fc Update jest version 2019-12-15 19:13:28 +00:00
Julia Amosova 4e134f8ec4 Testing Docker build on Travis 2019-12-15 17:54:33 +00:00
Julia Amosova c1b358929b Add page creation & check for Docker container status to run e2e tests 2019-12-15 16:44:40 +00:00
Julia Amosova 5645f5882a Add check for Docker container to be built on Travis when post is created 2019-12-15 16:04:06 +00:00
Julia Amosova 14afe36204 Add check for Docker container to be built on Travis 2019-12-15 15:32:26 +00:00
Julia Amosova 53dcdd77b3 Update Docker + Travis setup 2019-12-15 13:09:29 +00:00
Julia Amosova cff1272b7e Add check for new setup wizard flow & fix ship to different address click 2019-12-11 17:15:37 +00:00
Julia Amosova 90ddb08765 Merge branch 'new/puppeteer-screenshot-tester' into new/front-end-checkout-e2e-test 2019-12-11 14:54:39 +00:00
Julia Amosova 29671dd9ec Resolving conflict with master branch 2019-12-11 14:53:07 +00:00
Julia Amosova 900289c191 Update the way `ship to different address` checkbox is set 2019-12-11 12:27:41 +00:00
Julia Amosova 47ecd75479 Wait for Recommended section elements to be visible in the obw test 2019-12-11 12:18:31 +00:00
Julia Amosova c7d4989f01 Update clicks in obw and checkout tests & productIsInCheckout function 2019-12-11 12:02:44 +00:00
Claudio Sanches 2975b3a7b7 Rate limit feature 2019-12-11 01:38:19 -03:00
Claudio Sanches f7632de06e
Merge pull request #25164 from om4james/webhook-delete-cache
Delete cached webhook data when a webhook is deleted
2019-12-10 22:45:42 -03:00
Claudio Sanches 523c72f265 Fix WordPress nightly unit tests (#25198)
* Remove images after uploaded in WC_Tests_Product_Data

* Remove attachment after test

* Fixed image_id
2019-12-10 13:57:52 -03:00
Claudio Sanches 104f40c36e
Merge pull request #24281 from woocommerce/fix/24269
Handle multiple decimal points
2019-12-09 14:07:29 -03:00
Andrej Mernik d20d429e32 Add postcode validation for Slovenia (#25174)
Add postcode validation for Slovenia
2019-12-09 10:09:45 -03:00
Julia Amosova bf8ce8dcd7 Wait for the Recommended section to load in the setup wizard test 2019-12-09 09:51:13 +00:00
Julia Amosova 2477d07b48 Various improvements to e2e tests 2019-12-06 15:06:48 +00:00
Claudio Sanches b4af5f3c89 Updated regex to allow only one decimal point 2019-12-06 11:11:47 -03:00
Claudio Sanches e535a16b48 Fixed unit tests 2019-12-06 11:00:40 -03:00
James Collins 596ac29ba4 phpcs fixes 2019-12-06 10:34:59 +08:00
James Collins 7c5d06c309 Unit test to demonstrate the problem of duplicate webhook deliveries occurring 2019-12-06 09:41:33 +08:00
James Collins 0246b02a94 Merge branch 'master' into webhook-delete-cache 2019-12-06 08:57:54 +08:00
Claudio Sanches 8dbf7edb6f Fixed unit tests 2019-12-05 21:26:03 -03:00
Rodrigo Primo 27915dd696 Exception when WC_Product_Variation is instantiated with the wrong type
This commits changes WC_Product_Variation to raise an exception when the
class is instantiated with an ID that belongs to a post object that is
not a product variation.

This is necessary to avoid problems like the one described in #24956
where passing a variable product ID to WC_Product_Variation would result
in transparently modifying the variable product title and excerpt.
2019-12-05 15:45:48 -03:00
Claudio Sanches d7e2a98aaf
Merge pull request #24828 from woocommerce/fix/24695
Adds shared code between Orders and Cart calculation logic.
2019-12-05 12:39:50 -03:00
Peter Fabian 4dfa68b62d More PHPCS fixes. 2019-12-05 15:46:13 +01:00
Peter Fabian 9b398947dd Fixed the test by sleeping longer. 2019-12-05 15:17:34 +01:00
Peter Fabian 3ba3d5cf1b Made the fail messages unique. 2019-12-05 15:07:03 +01:00
Peter Fabian 7bfbe7a5f1 Removed incorrect comment. 2019-12-05 15:05:38 +01:00
Peter Fabian 0d3074a554 Added rate limiting to Add payment method. 2019-12-05 12:03:02 +01:00
Julia Amosova 62607a918c Resolving conflicts with migration branch 2019-12-04 21:02:34 +00:00
Rodrigo Primo 3af024fc5c
Merge pull request #25031 from woocommerce/feature/24956
Introduced wc_get_product_object() helper
2019-12-04 16:53:04 -03:00
Claudio Sanches e3b2d9f10c Merge branch 'master' into feature/inline-notices 2019-12-04 16:26:10 -03:00
Claudio Sanches 5fdb880831
Merge branch 'master' into feature/24956 2019-12-04 16:18:39 -03:00
Claudio Sanches 8033d5751e Changed wc_get_product_classname function name to wc_get_product_object 2019-12-04 16:15:16 -03:00