Commit Graph

242 Commits

Author SHA1 Message Date
vedanshujain 88e72cd112 Add tool for verifying database table 2020-06-15 23:55:03 +05:30
Christopher Allford e11141f577 Added files that should be ignored on export to .gitattributes 2020-06-15 23:54:24 +05:30
Vedanshu Jain 0756027c66
Merge pull request #187 from woocommerce/release-1.0.8-prep
Release 1.0.8 prep
2020-05-11 20:24:30 +05:30
vedanshujain 7c9fd1ab0c Version update and min requirement bump 2020-05-11 17:37:14 +05:30
Rodrigo Primo c792dfb192 Fix unit tests to match new tested method behavior
This commit updates two unit tests that were failing
(https://travis-ci.org/woocommerce/woocommerce-rest-api/jobs/637678251#L707),
after the behavior of the method
WC_REST_Shipping_Zones_V2_Controller::register_routes() changed in PR #104.
2020-05-11 17:32:52 +05:30
vedanshujain f7eab9db6e Enable support trash status for products when its passed 2020-05-11 17:22:39 +05:30
vedanshujain 569e656459 Rephrase the test so that is more resilient and error-prone 2020-05-11 17:21:56 +05:30
vedanshujain 02aa89614e Applied coding standards 2020-05-11 17:21:56 +05:30
vedanshujain f4e093d528 Fix unit test 2020-05-11 17:21:56 +05:30
vedanshujain 57b59271bf Change file path in response to change in core 2020-05-11 17:21:56 +05:30
vedanshujain ec1e0b1110 Add unit test for trash status for products 2020-05-11 17:21:56 +05:30
Claudio Sanches 49162ec26a Added missing composer scripts 2020-01-28 18:04:51 -03:00
Claudio Sanches 35e3f65dbd Version 1.0.7 2020-01-28 18:03:37 -03:00
Claudio Sanches 1ca43e2002 Revert "Fixed type numeric type on products and variations schema" 2020-01-28 18:01:10 -03:00
Claudio Sanches e949c82339 Added pre-commit hook 2020-01-24 17:17:28 -03:00
Claudio Sanches 78ccf4d4c6 Version 1.0.6 2020-01-15 20:29:39 -03:00
Siriwat Uamngamsup 43b9f9f07d Fixed wrong route path for shipping zone api 2020-01-15 20:26:38 -03:00
Claudio Sanches ea36caf17e Removed MaxMind from System Status 2020-01-15 20:26:12 -03:00
Rodrigo Primo e325eafc9a Remove image after unit tests to make sure they pass on Travis
The test
WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_download_image_and_return_array()
was failing on Travis with the error below due images being kept on
accros different tests. To fix this problem, this commit makes sure that
every test that creates an image, removes it after the assertions.

```
1) WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_download_image_and_return_array

Failed asserting that two arrays are equal.

--- Expected
+++ Actual

@@ @@

 Array (
-    'file' => '/tmp/wordpress/wp-content/uploads/2020/01/Dr1Bczxq4q.png'
-    'url' => 'http://example.org/wp-content/uploads/2020/01/Dr1Bczxq4q.png'
+    'file' => '/tmp/wordpress/wp-content/uploads/2020/01/Dr1Bczxq4q-3.png'
+    'url' => 'http://example.org/wp-content/uploads/2020/01/Dr1Bczxq4q-3.png'

/home/travis/build/woocommerce/woocommerce-rest-api/unit-tests/Tests/Version3/functions.php:113
```

(https://travis-ci.org/woocommerce/woocommerce-rest-api/jobs/634921426#L719)
2020-01-15 20:25:02 -03:00
Rodrigo Primo 10f55dbff4 Fix unit test suite in the Travis build jobs
This commit fixes a problem in the script that configures the
environment to run the unit tests in the Travis build jobs. The script
was not running `composer install` in the WooCommerce directory, leaving
it installation incomplete and thus the tests were failing.

To fix this problem, this commit adds a call to `composer install` right
after WooCommerce is downloaded in the setup script
(`unit-tests/bin/install.sh`).
2020-01-15 20:22:29 -03:00
Claudio Sanches 4ea0e73909 Fixed logic and removed old variable 2020-01-15 20:21:25 -03:00
Claudio Sanches c55b49194b Fixed coding standards 2020-01-15 20:21:25 -03:00
Claudio Sanches d133875e5d Keep backwards compatibility 2020-01-15 20:21:25 -03:00
Claudio Sanches 06ec2fd9c6 Set correct type 2020-01-15 20:21:25 -03:00
Claudio Sanches 19b7e278ac Fixed schema 2020-01-15 20:21:25 -03:00
Claudio Sanches 7eded142c7 Remove extra loop 2020-01-15 20:21:25 -03:00
Rodrigo Primo 64f09329dd Add unit test to test filtering by field when getting system status 2020-01-15 20:21:25 -03:00
Rodrigo Primo 0cfbc27a27 Simplify and speedup WC_Tests_REST_System_Status tests
This implements two changes to WC_Tests_REST_System_Status test class:

- It simplifies the tests by setting the user in the setUp method
instead of in each test.
- Improves the performance of the tests by creating a new admin user
only once when the class is instantiated instead of once for every
single test that is executed.
2020-01-15 20:21:25 -03:00
Claudio Sanches bc0acf60b8 Improved logic to only try remote requests if necessary 2020-01-15 20:21:25 -03:00
Claudio Sanches 4342ae2b6f Prevent wp_remote_post or wp_remote_get to trigger when not necessary 2020-01-15 20:21:25 -03:00
Claudio Sanches b4125269a3 Updated WC_REST_Controller::get_fields_for_response() 2020-01-15 20:21:25 -03:00
Claudio Sanches 361326d7f0 Fixed type numeric type on products and variations schema 2020-01-15 20:18:20 -03:00
Claudio Sanches b8763fd3e4 Added unit tests for instance_id 2020-01-15 20:17:36 -03:00
Claudio Sanches ae9948edef Allow set instance_id for Order's shipping_lines 2020-01-15 20:17:19 -03:00
Claudio Sanches d139b35344 Test the correct orders endpoint 2020-01-15 20:16:11 -03:00
Claudio Sanches 3be425631f Version 1.0.5 2019-12-18 19:20:59 -03:00
Christopher Allford 0704f6d023 Added support for filtering products and variations by their menu_order 2019-12-18 19:20:12 -03:00
Claudio Sanches 5a509591e7 Fixed unit tests 2019-12-18 19:20:00 -03:00
Claudio Sanches 3e0e9fee77 Included tests for v3 2019-12-18 19:20:00 -03:00
Claudio Sanches b0da8ca633 Included unit tests 2019-12-18 19:20:00 -03:00
Claudio Sanches 218f1b1edb Fixed prepare_line_items for v1 2019-12-18 19:20:00 -03:00
Claudio Sanches 48fb4433ac Allow edit line items without passing an product ID again 2019-12-18 19:20:00 -03:00
Claudio Sanches 28e046c33e Make product_id non mandatory while updating a line_item in orders endpoint 2019-12-18 19:20:00 -03:00
Csaba Maulis 1d5e1715d6 Fix Products Controller images property type 2019-12-18 19:19:45 -03:00
Claudio Sanches 8d2eb27637 Version 1.0.4 2019-12-05 22:44:20 -03:00
Claudio Sanches 066719a585 Fixed unit tests and updated sniffs 2019-12-05 22:42:43 -03:00
Claudio Sanches ff7cd27886 Fixed unit tests 2019-12-05 22:29:02 -03:00
Claudio Sanches 3e4274acbe Fixed coding standards 2019-12-05 22:29:02 -03:00
Nikhil Chaudhary 8b7b919cca Update class-wc-rest-system-status-v2-controller.php
Added the total post count that is need on the Woocommerce System Status tab.
2019-12-05 22:29:02 -03:00
Mike Jolley 7d8f8163b6 filter empty objects from results before loop 2019-12-05 22:12:21 -03:00