Commit Graph

1582 Commits

Author SHA1 Message Date
Claudiu Lodromanean 9e3da78c73
Merge pull request #20853 from woocommerce/reduce-test-suite-execution-time
Reduce WC_Tests_REST_System_Status tests execution time
2018-07-24 10:46:26 -07:00
Claudiu Lodromanean a0b4a8df03
Merge pull request #20611 from woocommerce/fix/20349
Allow filtering variations by attributes in API.
2018-07-24 10:25:36 -07:00
Gerhard Potgieter 7143b67189 Include setting category to product export test 2018-07-23 12:26:58 +02:00
Gerhard Potgieter 8aba169654 Switch travis codecoverage from xdebug to phpdbg (#20857)
This commit changes the travis codecoverage from using xdebug to phpdbg, phpdbg seems much faster and gives similar results.

Reason for switching is we have been running into constant timeouts on our codecoverage due to the 50min job limit on travis, which means our codecoverage has not been updated in a couple of months.

* Remove xdebug as it slows tests down, switch to using phpdbg for code coverage.

* Update parameters for phpdbg

* It is qrr not qqr

* Include vendor/bin path when using phpdbg

* Use PHP 7.1 to run phpdbg

* Update phpunit dire

* Include $HOME in phpdbg call to phpunit

* Set no memory limit to avoid out of memory errors.

* Assign timeout group to test_request_url test for paypal and do not execute that on coverage as it causes a memeory timeout. Test needs optimization to run for code coverage.

* @covers usage for methods should be prefixed with ::
2018-07-20 09:34:43 -03:00
Rodrigo Primo f47c9e7842 Reduce WC_Tests_REST_System_Status tests execution time
This commit changes WC_Tests_REST_System_Status tests to use artificial HTTP responses instead of performing external HTTP requests. With this change execution time for these tests droped from 22s to 3s.
2018-07-19 14:22:29 -03:00
Rodrigo Primo 1860cd1933 Change WC_Unit_Test_Case to extend WP_HTTP_TestCase instead of WP_UnitTestCase
This commits changes WC_Unit_Test_Case parent class to WP_HTTP_TestCase (which extends WP_UnitTestCase). This way all WC core test classes can benefit from the functionality provided by WP_HTTP_TestCase if needed. This is necessary because otherwise test classes can use the functionality provided by WC_Unit_Test_Case or WP_HTTP_TestCase. This change should not affect test classes that don't explicitly call one of the WP_HTTP_TestCase features.
2018-07-19 14:17:06 -03:00
Rodrigo Primo 1d13dd4dd4 Use an artificial HTTP response for wc_do_oembeds() test
Doing this to speed up the test as an HTTP request to an external server is slow and also because it should fix this test that has been failing on Travis only for an unknown reason.
2018-07-19 10:35:32 -03:00
Rodrigo Primo fb9aa71b33 Undoing DB changes on tearDown() is not necessary
WP test suite starts a transaction when the test starts and roll it back when the test finishes. So it is not necessary to undo database changes using tearDown().
2018-07-19 10:35:19 -03:00
Gerhard Potgieter 847d5b680d Add unit test for test_wc_get_attachment_image_attributes 2018-07-19 12:04:36 +02:00
Peter Fabian a26530f84a
Merge pull request #20846 from woocommerce/fix/e2e-tests
Enable SCRIPT_DEBUG on e2e tests
2018-07-19 11:18:38 +02:00
Gerhard Potgieter c3993accd4 Set SCRIPT_DEBUG to true for e2e tests since we never commit minified js during dev, only once we do a release do we minify scripts. 2018-07-19 09:06:11 +02:00
Rodrigo Primo 34ec2e87c0 Add wp-http-testcase directly to the repository
This commit adds the composer package jdgrimes/wp-http-testcase directly to this repository instead of via composer. Doing this because I couldn't find a way to make this package work on Travis build jobs running older versions of PHP and I don't think it is worth investing much time on it.
2018-07-18 18:19:39 -03:00
Rodrigo Primo 0e785d4614 Make WC_Tests_Product_CSV_Importer::test_import() faster
This commit changes the WC_Tests_Product_CSV_Importer class to use artificial HTTP responses instead of performing real HTTP requests to a external server to get the images of the imported products. On my local machine, this change reduced the test execution time from 3257ms to 831ms.

As a consequence of this change, this commit also fixes WC_Tests_Product_CSV_Importer::test_import() in all Travis builds. This test has been failing for a few weeks on Travis but not on our local environments. After some debugging, I found out that the test was failing on Travis because of the following error when `wp_safe_remote_get()` was called to get images for the imported products:

```
Error getting remote image http://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_1_front.jpg. Error: cURL error 35: gnutls_handshake() failed: Handshake failed.
```

Apparently, the PHP binary that is used by Travis is unable to handle the TLS handshake (see https://github.com/travis-ci/travis-ci/issues/6339) and the test probably started failing when demo.woothemes.com (which is used to download the images for the imported products) switched from HTTP to HTTPS.
2018-07-18 17:16:26 -03:00
Gerhard Potgieter 1f46caaa4c Test some edge cases where CC name could be empty or contain a non standard value. 2018-07-16 13:02:24 +02:00
Gerhard Potgieter 370c200076 Make wc_array_cartesian test use predefined array for testing against instead of relying on product attributes. 2018-07-16 12:59:01 +02:00
Gerhard Potgieter 9e495478f4 Add unit test for wc_decimal_to_fraction 2018-07-11 15:17:00 +02:00
Gerhard Potgieter a28253739f Add wc_get_permalink_structure unit test 2018-07-11 15:10:55 +02:00
Gerhard Potgieter 0c01b6c3bb Add wc_get_credit_card_type_label unit test 2018-07-11 15:05:18 +02:00
Gerhard Potgieter 1d5605c9dc Add wc_array_cartesian unit test 2018-07-11 14:59:05 +02:00
Gerhard Potgieter 2f7e42bb2f Add wc_get_theme_support unit test 2018-07-11 14:38:33 +02:00
Gerhard Potgieter eb533d0263 Update test_get_woocommerce_currencies to test for both cached and uncached currencies, gives us more code coverage 2018-07-11 14:25:42 +02:00
Gerhard Potgieter a6e7ae15f9 Add unit test for testing wc_get_user_agent 2018-07-11 14:11:31 +02:00
Peter Fabian 28cb32e54b PHPCS fixes. 2018-07-09 18:30:10 +02:00
Peter Fabian 7443a2f906 Switched variation creation to CRUD methods for unit test. 2018-07-09 18:27:56 +02:00
Peter Fabian 3af9c1e95b Merge branch 'master' into fix/20349
# Conflicts:
#	tests/framework/helpers/class-wc-helper-product.php
#	tests/unit-tests/api/products.php
2018-07-09 18:18:06 +02:00
Peter Fabian 4a42e2a7fc Added unit tests for query params for variations REST API endpoint. 2018-07-09 17:12:23 +02:00
Peter Fabian 55d7ea4ac5 Improved unit tests for products REST API endpoint. 2018-07-09 17:11:50 +02:00
Gerhard Potgieter bc3c780b92 PHPCS fixes 2018-07-09 13:04:16 +02:00
Gerhard Potgieter 1fdcf2a238 Fix log file deletion functionality. 2018-07-09 13:01:23 +02:00
Peter Fabian 6c70064a82 Added test products API for product tag and attributes query parameters. 2018-07-06 16:57:40 +02:00
Peter Fabian e769029af6 Make create_attribute function for PHPUNIT more versatile by removing hardcoding. 2018-07-06 16:08:32 +02:00
Peter Fabian 1091eb5feb PHPCS corrections. 2018-07-06 16:01:49 +02:00
Peter Fabian fe77b9e54f Fixed the variation product helper in unit tests.
Previously, the variable product had 2 variations, but one of them had a term assigned ('large') that wasn't assigned to the parent product. Normally, when variable product is created, parent has all the terms assigned to its children assigned.
2018-07-06 16:00:59 +02:00
Peter Fabian 9c420125a3 Added tests for API query parameters for products endpoint. 2018-07-06 12:58:57 +02:00
Claudiu Lodromanean 2a3cedddcd
Merge pull request #20520 from woocommerce/feature/product-custom-tables-supporting-changes
Product custom tables supporting changes
2018-06-27 08:57:50 -07:00
Gerhard Potgieter 2df62edec1 Improve the replacement for wc_format_phone_number a bit more, seems like we allow spaces and plus signs, remove non visible unicode with seperate preg_replace 2018-06-27 09:37:44 +02:00
Peter Fabian 8fd4777fb4 Fixed PHPCS whitespace. 2018-06-25 10:57:52 +02:00
Peter Fabian 6ba409b772 Added category related unit tests for products API. 2018-06-23 13:54:36 +02:00
Peter Fabian 97983a2d45 Fixed missing terms in unit tests.
in teardown method, terms are deleted, so e.g. Uncategorized product_cat was only avaialble if test was run individually, not in the whole batch. Should now be fixed.
2018-06-23 13:50:31 +02:00
Rodrigo Primo b6e73f528b Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-06-15 14:56:31 -03:00
Claudiu Lodromanean c203ff16d9
Merge pull request #20482 from woocommerce/fix/20452
Avoid price setting when synced with children
2018-06-15 09:05:13 -07:00
Mike Jolley 9a550c4a35 Update to correct type in unit test 2018-06-14 16:34:36 +01:00
Claudiu Lodromanean 73dbec001a
Merge pull request #20456 from JPry/custom_coupon_item_limit
Custom coupon item limit
2018-06-13 09:57:47 -07:00
Mike Jolley 77e887efe9 code standards 2018-06-13 16:55:39 +01:00
Mike Jolley 31058ac215 Tests -> CRUD 2018-06-13 16:30:42 +01:00
Gerhard Potgieter ab769eb8a7 Update test_save_default_attributes to make use of propper attributes before checking defaults 2018-06-13 15:49:38 +02:00
Mike Jolley 812586742b Allow only valid default attributes 2018-06-13 14:33:13 +01:00
Mike Jolley 9ec7eba0f6 update image URLs 2018-06-13 11:53:30 +01:00
Mike Jolley c37f724326 Break up tests/test contents 2018-06-13 11:39:28 +01:00
Mike Jolley 01a3e359c3 Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-06-13 10:18:38 +01:00
Rodrigo Primo 69e1547cd9 Update e2e tests database to the latest WC db version 2018-06-12 09:02:40 -03:00
Brent Sessions 8fc43f0cad Skip upload from forks (#20462)
This will skip the uploading of screenshots if the S3 key is not present. This will happen when there is a PR for a fork submitted.

* Skip upload from forks

* trying with failing test

* Fixing tests

* need a rebuild
2018-06-11 13:59:59 -03:00
Gerhard Potgieter 3b9d403b02 Add geolocation::get_ip_address tests 2018-06-11 11:10:11 +02:00
Claudiu Lodromanean 3d4dfda568
Merge pull request #20435 from rnaby/070618-212333-wc-privacy-exporters-customer_data_exporter
Removed unnecessary parameter. Also removed from tests.
2018-06-08 11:34:42 -07:00
Jeremy Pry a2d3313b36 Add unit tests around coupon item limit setting
Also updates the `WC_Helper_Coupon` class to make it easier to register custom coupon types during tests.

For #20455
2018-06-08 14:17:39 -04:00
Rodrigo Primo c2616b74f2
Merge pull request #20439 from woocommerce/update/improve-e2e-screenshots
Only try to upload screenshots if directory is not empty
2018-06-08 09:34:45 -03:00
Claudiu Lodromanean dc20237f40
Merge pull request #20426 from woocommerce/fix/20386
Made path /orders/refund_id return invalid order id msg instead of error.
2018-06-07 10:50:46 -07:00
Khan M Rashedun-Naby 4b14cbc727 Removed unnecessary parameter. Also removed from tests. 2018-06-07 21:25:13 +06:00
Rodrigo Primo cc4871e5ca Only try to upload screenshots if directory is not empty
This commit adds a check before the code that uploads screenshots of failed e2e tests to make it run only if running the Travis build job that executed the tests and if the screenshots/ directory is not empty. There is no need to always download Travis artifacts and try to upload to S3 if there is nothing to upload.
2018-06-07 11:50:36 -03:00
Brent Sessions c64a35300a Take screenshots of failed e2e tests (#20313)
This adds screenshots for broken e2e tests. The screenshots will also be uploaded to an Amazon S3 instance from Travis CI so they can be viewed. If run locally, there will be a screenshots directory created where they can be viewed

If there is a failed e2e test you'll see a block under `travis.sh after` in the build log in Travis CI that will give the URLs for the images.

* Adding screenshot capabilities to all tests

* trying screenshots on S3

* try to get a failed test

* finding the right path

* fixing yml

* only taking failed screenshots

* fixing yml

* moving paths to env

* fixing target

* try without artifact target

* fixing test

* setting back temporary changes

* fixing spacing

* unneeded change

* trying different uploader

* Force a failed test

* fixing test again

* fixing  unneeded change

* updating git ignore
2018-06-07 11:31:37 -03:00
Peter Fabian b5c420de99 Fixed milestone according to issue tag. 2018-06-07 15:36:27 +02:00
Peter Fabian 185675c69e Added unit test to cover the orders/refund_id. 2018-06-07 14:58:53 +02:00
Mike Jolley 4df54b4e53 Merge branch 'master' 2018-06-07 11:24:12 +01:00
Mike Jolley 58c5ddc8d0 Remove test 2018-06-07 11:23:11 +01:00
Gerhard Potgieter 0d8f002769 Unset the server variable on teardown to avoid out of memory errors 2018-06-01 14:49:02 +02:00
Rodrigo Primo 7979ea6b1a Use ob_end_clean() instead of ob_get_clean()
Doing this change since the content of the output buffer is not used.
2018-05-29 09:02:40 -03:00
Gerhard Potgieter b3a9d5b4c2 Remove unused variables 2018-05-29 07:33:19 +02:00
Gerhard Potgieter dbd476e7de Add unit tests for importing taxes 2018-05-28 11:18:42 +02:00
Gerhard Potgieter 54b23918b9 Fix broken system status unit test, https://github.com/woocommerce/woocommerce/pull/20231 introduced a new item to the schema 2018-05-25 14:19:14 +02:00
Mike Jolley 58b9be29b9
Merge pull request #20191 from woocommerce/fix/20186
Product import from file on server
2018-05-25 12:29:27 +01:00
Gerhard Potgieter 2f9c9e4954 Fix server file upload test 2018-05-25 13:00:59 +02:00
Mike Jolley f05167df17
Merge pull request #20222 from liquidweb/fix/iso-3166-1-alpha-2
Ensure tests use ISO 3166-1 alpha-2 country codes
2018-05-25 10:32:48 +01:00
Mike Jolley 171139295c
Merge pull request #20193 from woocommerce/fix/20192
Fix WC_Coupon constructor with Coupon object
2018-05-25 10:29:38 +01:00
Steve Grunwell 4bbf9c364d Ensure tests use ISO 3166-1 alpha-2 country codes
[According to the WooCommerce wiki](https://github.com/woocommerce/woocommerce/wiki/Order-and-Order-Line-Item-Data) and `WC_REST_Orders_Controller`, WooCommerce stores country codes using the ISO 3166-1 alpha-2 (2 character) standard. However, the `WC_Tests_Order_Functions::test_wc_get_order_address_params()` test method was using 'USA' instead of 'US'.
2018-05-24 20:50:01 +00:00
Peter Fabian 082c1dfaf3 Excluded children categories from WP_Query in product shortcode if cat_operator=AND. 2018-05-24 16:12:48 +01:00
Gerhard Potgieter 3c2221a4b0 Add a exception test to coupon delete 2018-05-24 12:37:52 +02:00
Gerhard Potgieter 9bc6ca5df3 Fix the coupon data store delete unit test, you should not have been able to create a new datastore from a deleted coupon ID. See product data store tests are reference for this. 2018-05-24 12:26:36 +02:00
Gerhard Potgieter 07c18b59f0 Add unit test to test again passing a coupon object in the constructor 2018-05-24 11:28:24 +02:00
Gerhard Potgieter dbafe34ed2 Fix test to test the actual file upload and not just the import 2018-05-24 09:18:26 +02:00
Gerhard Potgieter 16385a957c Add unit test for testing products in ABSPATH on server. 2018-05-24 08:56:57 +02:00
Mike Jolley 2aec467de8
Wait for address fields to update in e2e checkout test (#20176)
* See if this error is breaking e2e

* Revert "See if this error is breaking e2e"

This reverts commit 3de6d71fc7.

* wait for address update
2018-05-23 12:56:35 +01:00
Gerhard Potgieter ad24b9c9d9
Merge pull request #20041 from woocommerce/fix/20039
Wrap cell in ' rather than prepend
2018-05-18 12:27:26 +01:00
Gerhard Potgieter b73cf49278 Update unit tests to conform to new escaping 2018-05-18 12:09:56 +01:00
Gerhard Potgieter 92be60f3e4
Merge pull request #20045 from liquidweb/fix/table-ordering
Sort the results of WC_Install::get_tables()
2018-05-18 11:14:21 +01:00
Rodrigo Primo 3057ed0bd6 Use WordPress version of phpunit-speed-trap
This commit adds WordPress version of phpunit-speed-trap (https://github.com/WordPress/wordpress-develop/blob/master/tests/phpunit/includes/speed-trap-listener.php). First I tried to add it using composer but for some unknown reason it worked on my local environment but not on Travis (https://travis-ci.org/woocommerce/woocommerce/jobs/377286389#L673). I don't think it is worth spending too much time on this so it seems to me that it is just easy to use WordPress version instead since it works.
2018-05-17 15:04:32 +01:00
Steve Grunwell 317e7ba29f Revert most of 74a3f1d6
As @claudiosanches pointed out, there isn't much real-world need for `WC_Install::get_tables()` to sort results. Instead, sort the returned value within the `WC_Tests_Install::test_get_tables()` method.
2018-05-11 22:46:46 +00:00
Steve Grunwell 226aedd4e2 Merge branch 'master' into fix/table-ordering 2018-05-11 17:11:02 +00:00
Steve Grunwell 74a3f1d6d8 Sort the results of WC_Install::get_tables()
Since custom tables can be registered within WooCommerce via the 'woocommerce_install_get_tables' filter, it's helpful to ensure that `WC_Install::get_tables()` automatically sorts the table names alphabetically.

This helps avoid false failures when testing a plugin that uses a custom table against the WooCommerce core test suite, as queries like `WC_Tests_Install::test_get_tables()` assumes that tables will be returned in alphabetical order.
2018-05-11 16:18:49 +00:00
Claudiu Lodromanean 6f2c807f1c
Merge pull request #19984 from woocommerce/fix/19640
Basic range download handling for Force download.
2018-05-09 09:08:15 -07:00
Peter Fabian 2b9a5a6330 Removed test to reflect changes in track download method. 2018-05-09 15:54:38 +02:00
Peter Fabian 7c30b1fac5 Fixed PHPCS problems in test file. 2018-05-09 12:45:17 +02:00
Peter Fabian 4da0f1f793 Added test for range download logging. 2018-05-09 12:04:38 +02:00
Claudiu Lodromanean bc59be04fa
Merge pull request #20009 from woocommerce/update/wc-orders-query-tests
Add test to check WC_Order_Query when using the 'customer' parameter
2018-05-08 13:57:54 -07:00
Rodrigo Primo 42e801db0c Add test to check WC_Order_Query when using the 'customer' parameter 2018-05-08 17:24:16 -03:00
Rodrigo Primo 3e8cd3f837 Remove unnecessary tests cleanup code
Tests don't need to manually remove data that they create. WP test framework does that automatically after each test is executed.
2018-05-08 16:00:00 -03:00
Rodrigo Primo 47f6104580 Add more unit tests to improve test coverage of functions in includes/wc-stock-functions.php 2018-05-08 15:58:03 -03:00
Rodrigo Primo 41f5985087 Fix PHPCS violations automatically using phpcbf 2018-05-08 15:48:55 -03:00
Rodrigo Primo b43f828a7b Fix PHPCS violations automatically using phpcbf 2018-05-08 11:55:32 -03:00
Rodrigo Primo 5d9dadca87 Remove unnecessary cleanup code from orders unit tests
It is not necessary to manually remove data added to the database after each test. WP unit tests framework does this automatically.
2018-05-08 11:52:58 -03:00
Claudiu Lodromanean bda8732c6f
Merge pull request #19974 from woocommerce/update/payment-method-columns
Updates table styling and columns
2018-05-07 11:23:49 -07:00
Mike Jolley cf9fa5b3ff Updates table styling and columns 2018-05-04 18:48:41 +01:00
Rodrigo Primo 7d5f6d3746 Remove WC API unit tests cleanup code
WC unit tests don't need to remove data from the database before finishing. `WP_UnitTestCase` creates a transaction before each test starts and roll it back after it ends, so data is never actually written to the database. This simplifies the tests and makes them faster.
2018-05-04 11:45:30 -03:00
Rodrigo Primo 7ce69dfca2 PHPCS fixes 2018-05-04 11:42:45 -03:00
Mike Jolley e807c6151f Merge branch 'master' into update/erasure-requests 2018-05-02 14:06:47 +01:00
claudiulodro 9c1179856d Update unit tests 2018-05-01 09:32:29 -07:00
Mike Jolley 7ae9919a19 Fix tests 2018-05-01 16:53:05 +01:00
Mike Jolley d40b704cba Remove deprecation test 2018-05-01 13:39:32 +01:00
Mike Jolley adf1c92666 Sets the option before running test so it passes :) Broken in #19871 2018-04-27 10:01:02 +01:00
Rodrigo Primo 214c9ae9c7 Use integer instead of string to set download ID
WC core supports both integers and strings as values to the download ID but this is necessary to make the core unit tests pass when running them in the context of the custom product tables plugins. This plugin accepts only integers for the download ID.
2018-04-26 16:47:38 -03:00
Rodrigo Primo 49804b3172 Merge branch 'feature/product-custom-tables-supporting-changes' of github.com:woocommerce/woocommerce into feature/product-custom-tables-supporting-changes 2018-04-26 16:46:10 -03:00
Rodrigo Primo c9a146aeba phpcs fixes 2018-04-26 14:46:17 -03:00
Peter Fabian 76d9cc7b19 Fix the US currency name and attribute check for creating variable product. 2018-04-25 10:00:10 +02:00
Rodrigo Primo 597033ca6f Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-04-24 13:47:22 -03:00
Rodrigo Primo 920006b8b9 Test setup methods should call parent setup method
This commits adds a call to `parent::setUp()` inside WC_Tests_Product_CSV_Importer::setUp(). This is necessary to make sure transactions are used on database calls and thus tests don't have to worry about cleaning inserted data.

I found this issue while debugging https://github.com/woocommerce/woocommerce-product-tables-feature-plugin/issues/81. Turns out this test was failing because WC_Tests_Product_CSV_Importer::test_import() was leaving one post in the database due to a bug in the custom product tables plugin.
2018-04-23 10:40:16 -03:00
Rodrigo Primo dcc309d16b Add call to parent::setUp() and remove cleanup code
parent::setUp() should be called inside test setup methods to make sure database changes are automatically reverted after each test is executed. This way it is not necessary to manually remove inserted data.
2018-04-23 10:34:15 -03:00
Rodrigo Primo 4a8f34f2ee Test setup methods should call parent setup method
This commits adds a call to `parent::setUp()` inside WC_Tests_Product_CSV_Importer::setUp(). This is necessary to make sure transactions are used on database calls and thus tests don't have to worry about cleaning inserted data.

I found this issue while debugging https://github.com/woocommerce/woocommerce-product-tables-feature-plugin/issues/81. Turns out this test was failing because WC_Tests_Product_CSV_Importer::test_import() was leaving one post in the database due to a bug in the custom product tables plugin.
2018-04-23 10:34:03 -03:00
Rodrigo Primo c7c82a2335 PHPCS fixes 2018-04-23 10:33:52 -03:00
Rodrigo Primo bf0da0287d Simple placeholders should not be quoted 2018-04-20 09:28:08 -03:00
Rodrigo Primo 9c33f133b6 Fix parameter order when calling PHPUnit_Framework_TestCase::assertEquals()
The first parameter passed to PHPUnit_Framework_TestCase::assertEquals() should be the expected value and the second parameter the actual value and not the other way around.
2018-04-19 17:25:38 -03:00
Mike Jolley d381330a91
Merge pull request #19705 from woocommerce/fix/19619
Handling of PHP's automatic array key conversion to int
2018-04-18 15:40:31 +01:00
Peter Fabian 4538f3fa8f Moved wc_selected to core functions. 2018-04-18 15:54:57 +02:00
Gerhard Potgieter f0f6169145 Fix the download log unit test, with the new constraint key introduced in #19330 the download log needs a valid download to save correctly. 2018-04-18 09:43:24 +02:00
claudiulodro f9e45bea91 Bring up-to-date with master and resolve merge conflicts 2018-04-17 13:27:39 -07:00
Claudio Sanches 933bcc32c3
Merge branch 'master' into fix/19620 2018-04-17 12:45:20 -03:00
Claudio Sanches f18220a009 Updated unit tests 2018-04-17 12:31:14 -03:00
Peter Fabian 49529e0912 Added wc_selected function.
- Added unit test for the wc_selected function.
2018-04-17 12:13:46 +02:00
Mike Jolley e951ff0a00 Fix test 2018-04-16 14:35:20 +01:00
Mike Jolley f3388d8cd6 tests 2018-04-13 18:25:51 +01:00
Mike Jolley 1b34cd4745 Moved settings tabs around to allow for privacy page. 2018-04-12 16:59:42 +01:00
Claudio Sanches 900c8fc33f
Merge pull request #19380 from woocommerce/update/19302
Override supports for PayPal to see if credentials exist
2018-04-06 15:44:42 -03:00
Claudio Sanches 53b000cb87 Remove product after unit test 2018-04-06 14:49:20 -03:00
Claudio Sanches a10689ce40 Added unit tests for wc_get_product_class() 2018-04-06 14:47:18 -03:00
Mike Jolley 4e42b2cd30 Handle manage_stock mixed content for variations 2018-04-03 17:46:43 +01:00
Mike Jolley 5ac7aac369 Improve can_refund_order and add unit tests 2018-04-03 17:09:09 +01:00
Mike Jolley 5bc26ebd79 Merge branch 'master' into update/17427 2018-04-03 14:38:49 +01:00
Mike Jolley 8721d62b67 update test 2018-04-03 14:37:31 +01:00
Rodrigo Primo 94751f2872 Use data store loader instead of hardcoding data store class name
This way plugins extending WC core data stores can still benefit from WC core tests
2018-04-02 15:50:44 -03:00
Rodrigo Primo d55c0d63b1 Add unit tests group 'core-only'
This group is used to identify unit tests that will work only when testing WC core. This is necessary since we are using WC core unit tests to test the custom product tables plugin and some tests should be skipped in this context.
2018-04-02 15:15:23 -03:00
Rodrigo Primo bb553c88ae Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-03-29 12:05:55 -03:00
Mike Jolley 51252915e1
Merge pull request #19493 from woocommerce/fix/19404
Removed line item limit and made sure the URL is shorter than 2083 ch…
2018-03-28 13:56:57 +01:00
Peter Fabian 3809ab3f4c Fixed shipping tax logic to behave the same as originally 2018-03-28 13:08:05 +02:00
Mike Jolley 5547c57c03
Merge pull request #19504 from woocommerce/fix/19485-backorder-import
Product import backorders default to no
2018-03-28 11:00:09 +01:00
Gerhard Potgieter 80ec10fc21 Fix unit test for import, the way the test is set up it expects a no for backorders and not an empty string 2018-03-28 08:28:13 +02:00
Peter Fabian 5eda49f98a Line item logic refactored
Renamed function get_non_line_item_args
Documentation updates
...all part of code review fixes
2018-03-27 15:55:03 +02:00
Peter Fabian f6d748a812 Fixed PHPCS violation 2018-03-26 13:31:29 +02:00
Peter Fabian 88588eccbc Code duplication removed
Added test for non line item agrument presence
Fixed incorrect comment
2018-03-26 13:05:55 +02:00
Peter Fabian 26144afbc6 Test request length after applying filter
- added default value to get_line_item_args to not break interface
- smaller code review updates
2018-03-23 17:22:09 +01:00
Peter Fabian fda6421dee Fixed compatibility with older PHP versions, removed superfluous asserts. 2018-03-22 20:42:19 +01:00
Peter Fabian 27a309d2df Removed line item limit and make sure the URL is shorter than 2083 characters
- removed limit to 9 line items per Paypal order
- if the request URL with all line items will be longer than 2083 characters, send it as one line item
- fix the character limit function to account for URL encoding happening in http_build_query
2018-03-22 15:39:30 +01:00
Claudio Sanches 21dc6d28cf
Merge branch 'master' into feature/18477 2018-03-21 14:31:58 -03:00