Commit Graph

382 Commits

Author SHA1 Message Date
Peter Fabian 6f9dd9c61b Moved wc-admin installation to phpunit bootstrap. 2018-11-02 11:31:41 +01:00
Joshua T Flowers 0f45a08f20 Update order summary in Orders report (https://github.com/woocommerce/woocommerce-admin/pull/613)
* Move TableSummary below pagination

* Add summary to order table

* Add new and returning customers

* Add product to totals in API

* Use get_var instead of get_results for unique products

* Change table summary styling

Remove slashes and increase padding between items based on discussion with @LevinMedia

Change margin to padding to overlap table shadow when pagination is not present.

* Fix wp_posts prefix and move to separate fxn

* Change new/returning customer column types to intval

* Add new/returning customer data to tests and fix formatting
2018-10-31 14:09:38 -05:00
Kelly Dwan f62537fc17 Try: Add Lerna to split out utility packages (https://github.com/woocommerce/woocommerce-admin/pull/678)
* Add lerna & GB package-building script

* Move currency library to lerna module

* Update lerna config

* Add publish commands

* Add currency as an faux-external module

* Add separate command to build just core files

* Update dependency path

* Update build script to build all packages into `dist`

* Add packages to the jest test setup

* Move date library to packages

* Update imports to use @woocommerce/date

* Output wcSettings definition before any scripts are output

Fixes issues where wc-dates lib relies on settings object

* Add the build step into travis

* Update jest config to dynamically get package paths

* Update package postcss config to match wc-admin’s main config

* Add combined watch scripts for package+app, add a `clean` command to clean up old build files

* Ignore PHPCS error (leave todo message to fix)

* Concat files with a space, fix issue where all files join in one continuous string and fail the check
2018-10-30 14:57:48 -04:00
Paul Sealock 7e5c124ce1 Filters: Add params to request query 2018-10-29 13:07:13 +13:00
Jonathan Belcher 8e46a78a2f Fix linting errors in tests/test-sample.php 2018-10-23 09:57:45 -04:00
Jonathan Belcher ecb3013fd3 Uses PHPBCF to autofix warnings and errors (https://github.com/woocommerce/woocommerce-admin/pull/611) 2018-10-22 12:20:14 -04:00
Peter Fabian 28c09248df Added remaining test files. 2018-09-24 19:46:37 +02:00
Peter Fabian cb50f79131 Plugin installation should not be needed in bootstrap, as it happens in the installation script. 2018-09-24 17:49:21 +02:00
Peter Fabian 670436ac13 PHPCS fixes. 2018-09-24 17:24:08 +02:00
Peter Fabian f2cb1e6a85 Removed duplicate WooCommerce installation. 2018-09-21 19:34:34 +02:00
Peter Fabian 6e6b028554 Travis test 7. 2018-09-21 16:37:02 +02:00
Peter Fabian a5dcd77f4b Travis test 6. 2018-09-21 16:15:43 +02:00
Peter Fabian 8f2af2e6d8 Corrected hour representation in tests. 2018-09-21 10:37:39 +02:00
Peter Fabian 9ccb1e2124 Added revenue stats tests. 2018-09-20 16:20:50 +02:00
Peter Fabian 389a2182a1 Initial setup for unit tests. 2018-09-20 16:20:04 +02:00
Kelly Dwan dec97d178e Components: Export reusable components to a separate file + global (https://github.com/woocommerce/woocommerce-admin/pull/297)
* Importing all components from a root components file

* Update Ratings component to avoid circular dependencies, fix tests

* Export components on `wc.components`, use this for importing

* Move react-dates initialize to the components file

* Push query changes to history

Fixes an issues where native a links do not update the query in `history`

* Update test config for new @woocommerce/components path

* Update chart components import

* Merge simple/complex & alphabetize by first exported name

* Add a readme with info about how to call these components
2018-08-20 17:18:13 -04:00
Kelly Dwan 944b7ab460 Update to Gutenberg 3.3 (https://github.com/woocommerce/woocommerce-admin/pull/234)
Removes Gutenberg package dependency in favor of published sub-packages, update tests and build process to reflect new package locations
2018-07-23 16:14:40 -04:00
Paul Sealock 55f803dd07 Update Gutenberg dependency to v3.2.0 for running js tests
Update Gutenberg packages deprecated and keycodes to build system
2018-07-14 21:57:18 +12:00
Justin Shreve 37e48ed6de Define text domain in test setup, and re-enable date test 2018-07-13 10:28:24 -04:00
Robert Elliott 7b8bcea17a move dummy into fixtures subfolder 2018-07-10 17:07:34 +02:00
Robert Elliott da980328e2 move dummy js and add README 2018-07-10 16:09:47 +02:00
Justin Shreve 71c12e6795 Update woo-dash naming to new wc-admin name (https://github.com/woocommerce/woocommerce-admin/pull/183) 2018-07-10 08:48:06 -04:00
Robert Elliott 5c0a293297 refactor params to reduce recalculating scales each time + new tests 2018-07-09 15:35:25 +02:00
Robert Elliott 806d423324 bar chart and example 2018-07-09 15:35:12 +02:00
Paul Sealock 817f6813a1 Date: Load localeData into Momentjs 2018-07-06 14:04:17 +12:00
Paul Sealock be002e442a DatePicker: Hook up react-dates 2018-06-27 14:11:13 +12:00
Kelly Dwan 17cbf3a3ad Add `formatCurrency`, which relies on a global currency object and local set on wcSettings 2018-06-26 14:22:23 -07:00
Kelly Dwan 99ac7728cd Try a context-aware heading component (https://github.com/woocommerce/woocommerce-admin/pull/121)
* Add H and Section components for context-aware headings

* Switch to using the new context-aware heading and section components

* Style header by class name, not heading level

* Add our client dir to the modules list for Jest

We already have this setting in webpack, but Jest doesn’t pick up on that
2018-06-20 11:10:06 -04:00
Kelly Dwan a8682ccc70 Pin Gutenberg version to 2.9.0 for tests (https://github.com/woocommerce/woocommerce-admin/pull/66)
* Pin Gutenberg to V2.9.0

* Update webpack & Jest config for Gutenberg 2.9.0
2018-05-21 11:26:04 -04:00
Kelly Dwan 3554c4ef7d Tests: Add Jest with Gutenberg as a npm dependency (https://github.com/woocommerce/woocommerce-admin/pull/43)
* Add Jest testing with Gutenberg as a dependency

* Add test using Enzyme

* Update for “element” moving

Something also must have moved api-request, so we mock that import now
2018-05-16 10:59:03 -04:00
Kelly Dwan e8f9a5faed PHPUnit: Ensure Gutenberg is loaded
Also adds the config from WC’s phpunit file
2018-05-03 13:36:36 -04:00
Kelly Dwan 555da60b01 Initial commit of plugin scaffold 2018-04-17 17:04:17 -04:00