Commit Graph

151 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 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
Ron Rennick 57a8fbcb51 remove double slash from image urls, use string for download ID 2019-06-26 16:55:57 -03:00
Jeff Stieler d6d3161bff Exclude IP download controller from defaults test. 2019-06-24 12:16:58 -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
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
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
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
Jeff Stieler 0d863ae7a6 Exclude auto-draft and trashed orders from imports. 2019-05-20 13:51:44 -06: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
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
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 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
Jeff Stieler a3fdd72ba5 Merge pull request woocommerce/woocommerce-admin#1907 from woocommerce/fix/1615-order-number-filter
Support Sequential Order Numbers in Downloads Report order number filter
2019-04-30 10:10:39 -06:00
Jeff Stieler 4a85b012b5 Add tests for customer import using new parameters. 2019-04-30 09:46:14 -06:00
Jeff Stieler 3bfc53c9cf Reintroduce the customer lookup init to report regeneration.
With the new date range and “skip existing” logic.
2019-04-30 09:17:12 -06:00
Joshua T Flowers 53a4098de1 Fix missing leaderboard schema options (https://github.com/woocommerce/woocommerce-admin/pull/2059)
* Add missing schema properties

* Add missing leaderboard schema tests
2019-04-26 10:43:52 -07:00
Joshua T Flowers c17baa02cd Encode and decode persited query as JSON string in the leaderboards controller (https://github.com/woocommerce/woocommerce-admin/pull/2100)
* Encode and decode persited query as JSON string in leaderboards controller

* Update peristed query tests to use JSON string
2019-04-24 04:38:49 +08:00
Joshua Flowers 7a41da3058 Bust cache for orders query in import tests 2019-04-12 16:50:43 +08:00
Joshua Flowers 5838e2ab48 Add import controller tests 2019-04-12 16:50:42 +08:00
Joshua T Flowers e31be343e2 Make customer name extendable (https://github.com/woocommerce/woocommerce-admin/pull/1976)
* Make customer name extendable

* Update get_customer_name to favor user profile information

* Update customer name on profile update

* Add tests around customer name getting and setting

* Prefix customer name filter with woocommerce_reports_
2019-04-09 11:39:39 +08:00
Joshua T Flowers f682fe76be Add leaderboard controller and endpoint (https://github.com/woocommerce/woocommerce-admin/pull/1995)
* Add leaderboard controller and endpoint

* Add existing leaderboard stats to leaderboard endpoint

* Add persisted query to leaderboard params

* Add leaderboard endpoint tests

* Check if extended_info params are set before assigning

* Change number param input format to mixed inside wc_admin_number_format
2019-04-09 11:34:56 +08:00
Joshua T Flowers 753780bf7b Onboarding: Add levels REST API (https://github.com/woocommerce/woocommerce-admin/pull/1938)
* Add levels rest controller

* Add default levels

* Add onboarding level API tests

* Drop all since tags

* Make pre-response levels array associative for easier formatting

* Fix level tests for associative array
2019-04-05 10:35:30 +08:00
Joshua T Flowers 9c3faea12f Refactor notes controller and add ordering params (https://github.com/woocommerce/woocommerce-admin/pull/1878)
* Separate notes controller request args and add collection params

* Fix page param var

* Fix collection params sanitization

* Allow array of note types to be queried

* Add order and orderby collection params to notes controller

* Allow sorting by order and orderby params in notes data store

* Make sure notes are ordered by date and unread matches inbox note types

* Allow status or type params to use an array of items

* Add tests for notes ordering

* Remove unnecessary query arg assignment in the notes data store

* Update get_notes_count to use array for status and type
2019-04-01 10:53:34 +08:00
Joshua T Flowers 42ddfc0108 Add coupons count to data store and hook up to summary numbers in orders report (https://github.com/woocommerce/woocommerce-admin/pull/1912)
* Change coupons sum to distinct coupon count in REST API

* Hook up unique coupon count to orders summary numbers

* Add coupons count to order segmenting

* Add coupons count to expected stats in order test and revenue tests
2019-04-01 10:16:57 +08:00
Jeff Stieler 164a55b0d2 Allow strings in downloads report order number filter. 2019-03-26 16:04:36 -06:00
Jeff Stieler 7742a7d65e Add test coverage for “unsnoozing” notes. 2019-03-20 08:52:27 -06:00
Jeff Stieler 2a08ba20e8 Add a snoozed note to test data. 2019-03-20 08:52:27 -06:00