Commit Graph

1419 Commits

Author SHA1 Message Date
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
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
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