Commit Graph

281 Commits

Author SHA1 Message Date
Joshua T Flowers d640b15d09 Add a theme REST API to allow uploading themes (https://github.com/woocommerce/woocommerce-admin/pull/2568)
* Add theme upload REST api controller

* Add theme data to theme controller response

* Add tests for themes api

* Change user cap check to upload_themes

* Add test for users without theme capabilities
2019-07-05 16:01:35 +08:00
Justin Shreve 5a2f0c9da0 Onboarding - Add business extension recommendations (https://github.com/woocommerce/woocommerce-admin/pull/2551)
* Add business extension recommendations

* Fix failing test. Set max height and width for toggle

* Fix toggle display and fix when the extensions show (so they dont hide and disapear as "currently" selling is selected).
2019-07-04 11:56:28 -04:00
Jeff Stieler 5b905025fc Merge pull request woocommerce/woocommerce-admin#2526 from woocommerce/add/311-report-csv-exporter-endpoint
Add Report CSV Export Endpoint
2019-07-03 08:43:18 -06:00
Jeff Stieler c7d94cc929 Use the default "read reports" permission for the export endpoint. 2019-07-02 13:53:42 -06:00
Paul Sealock 8857635162 fix tests 2019-07-02 12:35:58 +12:00
Paul Sealock 563e94b7a2 add leading slash in path for Leaderboards 2019-07-02 12:19:55 +12:00
Justin Shreve aed4ea63b4 Server side route handling 2019-07-01 12:22:34 +12:00
Jeff Stieler 35d763fa8c Merge pull request woocommerce/woocommerce-admin#2463 from KZeni/patch-2
Add State alongside City (and other customer info).
2019-06-28 12:24:25 -06:00
Jeff Stieler fbd231acf4 Add test for reports export endpoint. 2019-06-28 11:10:13 -06:00
Jeff Stieler 8c40000ec2 Merge pull request woocommerce/woocommerce-admin#2496 from woocommerce/fix/rest-controller-default-params
Test that REST controllers work with their default parameters.
2019-06-28 08:52:16 -06:00
Ron Rennick 6982c21d3d Merge pull request woocommerce/woocommerce-admin#2519 from woocommerce/fix/2495
remove double slash from image urls, use string for download ID
2019-06-28 09:28:51 -03:00
Ron Rennick 9f76b02283 set all the unit test download IDs to strings 2019-06-27 17:46:56 -03:00
Jeff Stieler 7e87732dfb Rework test to rely on the REST server handling route defaults. 2019-06-27 11:38:54 -06:00
Jeff Stieler b8abe63d15 Don’t create a batch job that exceeds the range end. 2019-06-26 14:23:56 -06:00
Jeff Stieler 5b4d671833 Change test queue batch size.
Introduces error condition where range start is beyond the end.
2019-06-26 14:16:33 -06:00
Ron Rennick 57a8fbcb51 remove double slash from image urls, use string for download ID 2019-06-26 16:55:57 -03:00
Jeff Stieler 356f1ada77 Merge pull request woocommerce/woocommerce-admin#2502 from woocommerce/add/311-reports-csv-exporter-class
Add Reports CSV Exporter Class
2019-06-26 09:50:06 -06:00
Jeff Stieler 466ddda1a6 Add a test of the CSV export to the coupons report. 2019-06-24 19:26:33 -06:00
Jeff Stieler d6d3161bff Exclude IP download controller from defaults test. 2019-06-24 12:16:58 -06:00
Jeff Stieler 4711a4e11d Ensure coupons are enabled for testing. 2019-06-24 10:55:43 -06:00
Jeff Stieler 7e14630b3b Set default params on each test request, and use an admin user. 2019-06-24 10:55:40 -06:00
Jeff Stieler ff8615dac7 Test that all REST controllers can be called with default params. 2019-06-24 10:50:21 -06:00
Kurt Zenisek ce8d670420 Increased assertCount to accommodate the added data point 2019-06-20 14:24:14 -05:00
Jeff Stieler f75e3c7820 Check for good WC_Orders before using instance methods. 2019-06-20 08:31:10 -06:00
Joshua T Flowers 57416a2bdb Refactor customer name retrieval (https://github.com/woocommerce/woocommerce-admin/pull/2418)
* Return early from creating customer if order is false

* Refactor customer first and last name methods

* Separate customer name tests to create guest orders

* Check for parent_id before retrieving customer ID in refund

* Use registered customer ID in import report tests

* Compare absolute integer when checking for valid customer ID

* Check for order before getting customer ID when retrieving existing customer ID
2019-06-20 11:22:47 +08:00
Kurt Zenisek a39c885160 Added state alongside city & other info 2019-06-19 17:11:24 -05:00
Jeff Stieler d4e242b028 Add test to catch missing version updates. 2019-06-13 15:40:02 -06:00
Ron Rennick 241ebb63ff Merge pull request woocommerce/woocommerce-admin#2407 from woocommerce/fix/2354
Update Amount of {Item} to Number of {Item} when it's a count throughout
2019-06-13 13:41:15 -03:00
Joshua T Flowers 2f49a0a5a7 Prevent multiple imports from running simultaneously (https://github.com/woocommerce/woocommerce-admin/pull/2414)
* Prevent multiple imports from running simultaneously

* Cancel previous imports before importing again in tests
2019-06-13 23:32:58 +08:00
Ron Rennick 6b02ee217c Update Amount of Orders to Number of Orders throughout 2019-06-12 16:16:18 -03:00
Albert Juhé Lluveras 8bc2261c8a Add date_created_gmt property to orders endpoint (https://github.com/woocommerce/woocommerce-admin/pull/2086)
* Add date_created_gmt property to orders enpoint

* Make date_created properties of type date-time and improve descriptions
2019-06-12 11:21:56 +02:00
Paul Sealock dbd536c7a3 Settings: Add default date 2019-06-12 11:40:21 +12:00
Albert Juhé Lluveras 5d01cee56c Add progress bars to Historical Data Import screen (https://github.com/woocommerce/woocommerce-admin/pull/2312)
* Hook up import/status endpoint to Historical Data Import screen

* Fix PHP tests

* Add speak message when the import is complete

* Several fixes

* Cleanup

* Update progress bars every 3 seconds and bugfixes

* Rename ongoingImport to activeImport

* Use timestamp to identify queries

* Use timestamps for historical data state

* Add 'initializing' status

* Cleanup

* Pass less props around

* Refactor getStatus

* Set stop timestamp on request error

* Typo
2019-06-11 14:47:53 +02:00
Justin Shreve 821408fc83 Add Muriel/Newspack components for use in onboarding (https://github.com/woocommerce/woocommerce-admin/pull/2313)
* Add Muriel/Newspack components for use in onboarding

* Adjust some alignment
2019-05-28 10:05:55 -04:00
Joshua T Flowers 5e8509edd3 Onboarding: Add profiler body class on initial load + respect skipped/completed flags (https://github.com/woocommerce/woocommerce-admin/pull/2300) (https://github.com/woocommerce/woocommerce-admin/pull/2318)
* Add profiler body class on initial load, and respect skipped/complete status.

* Handle PR feedback: Remove unnecessary global, add some todos, added a filter around the next step slug, generalized the is-loading class a bit.
2019-05-28 06:38:01 -04:00
Joshua T Flowers cda83b4509 Onboarding - Add shared step actions and step 1 actions (https://github.com/woocommerce/woocommerce-admin/pull/2283)
* Add method to go to next profiler step in step controller

* Add method to update profile params in step controller

* Add action methods to step 1 in the profiler

* Allow JSON body params for profile controller

* Use JSON body params in onboarding profile tests
2019-05-28 11:09:48 +08:00
Paul Sealock f9bad3646d Persisted Queries: Avoid non-time related screens 2019-05-24 08:38:52 +12:00
Jeff Stieler 0d863ae7a6 Exclude auto-draft and trashed orders from imports. 2019-05-20 13:51:44 -06:00
Mike Jolley 79373b062c Merge branch 'master' into update/refactor-main-file 2019-05-16 14:20:13 +01:00
Joshua T Flowers 8a03b1bfb3 Add onboarding profile REST endpoints (https://github.com/woocommerce/woocommerce-admin/pull/2217)
* Add onboarding profile endpoint to get profile data

* Add onboarding profile update endpoint

* Add onboarding profile endpoint tests

* Update onboarding API namespaces
2019-05-16 13:05:37 +08:00
Mike Jolley 254e378346 Moved actionsheduler hook to main file 2019-05-14 19:19:24 +01:00
Ron Rennick 6780ae0136 update unit tests for new customer count 2019-05-13 14:14:53 -03:00
Joshua T Flowers fb91cd8788 Add import status endpoint and progress options (https://github.com/woocommerce/woocommerce-admin/pull/2189)
* Update import progress during batches

* Add import status route for querying import progress

* Update import totals before import start

* Move wc admin notes to separate action scheduler group

* Add import totals route to query customer and order totals

* Add wc helper queue job processing method

* Add import status and total tests

* Separate action type clearing for imports and notes

* Typecast action types as array in clear_pending_wcadmin_actions()
2019-05-13 10:30:07 +08:00
Joshua T Flowers c6a6e737c4 Add refund filtering to order reports (https://github.com/woocommerce/woocommerce-admin/pull/2179)
* Add customer functions to order and refund classes

* Extract shared order and refund methods to trait

* Add refund filter to advanced filters in orders report

* Filter refund types in orders data store

* Extract refunds subquery to parent report data store method

* Add refund subquery filtering to order stats data store

* Add tests around refund type filtering

* Change the default option for the refunds filter
2019-05-10 14:56:57 +08:00
Joshua T Flowers 3382fb7011 Record refunds separate from order entries (https://github.com/woocommerce/woocommerce-admin/pull/2083)
* Sync refunds on order sync

* Separate order and refund class extensions

* Add customer functions to order and refund classes

* Change products store to work with refund amounts

* Return early for refunds in coupon data store

* Allow refund processing in tax data store

* Remove unused refund amounts from tables and data stores

* Change order counts to parse out refund entries

* Include refunded orders in default queried statuses

* Only process order number filter on shop order post types

* Extract shared order and refund methods to trait

* Fix renamed schedule_single_order_import method

* Bump PHP and WP version requirements
2019-05-10 14:39:25 +08:00
Jeff Stieler a36e3cd024 Merge pull request woocommerce/woocommerce-admin#2034 from woocommerce/add/1850-import-endpoint
Add import endpoint and controller
2019-05-01 13:29:00 -06:00
Joshua Flowers 63c59a1f72 Update batch test function names and constants 2019-04-30 17:39:02 -06:00
Joshua Flowers 591c66995d Add tests for delete endpoint 2019-04-30 17:39:01 -06:00
Jeff Stieler f9c1b130c3 Add extra verification to import cancel endpoint test. 2019-04-30 10:38:07 -06:00
Joshua Flowers 61492c5f10 Add import cancel tests 2019-04-30 10:17:09 -06:00