Commit Graph

36 Commits

Author SHA1 Message Date
Adrian Duffell 9a0ffaeca7 Add Docker app for PHP Test Suite (https://github.com/woocommerce/woocommerce-admin/pull/5297) 2020-12-17 21:02:10 +08:00
Adrian Duffell ae1024dff8 Add autoloading of WooCommerce classes in PHP tests (https://github.com/woocommerce/woocommerce-admin/pull/5650)
* Restore composer install on WooCommerce plugin

Previously removed in c26db640d6

* Remove direct require of wc-install.php

In some contexts, this causes phpunit to halt because of the early exit call in wc-install.php:

defined( 'ABSPATH' ) || exit;

* Add temporary composer 1 downgrade before installing WooCommerce
2020-11-18 10:36:18 +08:00
Timmy Crawford 904425e5fc Update Woo tested and min versions. (https://github.com/woocommerce/woocommerce-admin/pull/5603)
* Update Woo tested and min versions.

* Update Woo tested and min versions.

* Load the installer class in bootstrap.

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2020-11-11 12:30:27 -08:00
Claudio Sanches 073a3f706f Fix usage of "package" tag in file headers (https://github.com/woocommerce/woocommerce-admin/pull/4940)
* Don't require package tag or file comment inside src

* Removed package tag from files inside src

* Fixed tests directory in phpcs.xml.dist

* Fixed usage of package tag

* Fixed new classes

* Fixed coding standards

* Fixed coding standards in tests
2020-08-11 16:18:47 -03:00
Timmy Crawford c992b2fa7c Build: Don't Attempt to Load non-minified Assets in Core Build (https://github.com/woocommerce/woocommerce-admin/pull/4747)
* Build: Only load non-minified js assets when they are available in the build.

* Avoid multiple Loader instances.

* Fix feature filter name in test bootstrap.

* Fix feature filter used in Loader tests.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-07-06 10:39:58 -07:00
Jeff Stieler 663fe9455e Fix failing order stats tests (https://github.com/woocommerce/woocommerce-admin/pull/4719)
* Fix missing uninstall usage in tests bootstrap.

Update test bootstrap using latest core WC version.

* Fix date offsets for test orders.

* Restore original test lib directory logic.

* Ensure that test runs near the bottom of the hour don't break.

* Update testing instructions in contributing docs.
2020-06-30 11:02:28 -04:00
Ron Rennick 6720c17140 update unit test bootstrap for WC 4.2 (https://github.com/woocommerce/woocommerce-admin/pull/4312) 2020-05-13 09:56:05 -03:00
Joshua T Flowers cb3fcbcf08 Onboarding: Remove old development flags (https://github.com/woocommerce/woocommerce-admin/pull/3809)
* Remove old onboarding flags

* Remove flag from onboarding docs

* Enable onboarding in tests
2020-03-04 09:46:02 +01:00
Justin Shreve 5b80e321ba Enable onboarding in the plugin build for those who have opted-in (https://github.com/woocommerce/woocommerce-admin/pull/3184)
* Enable onboarding in the plugin build for those who have opted-in

* Update constant andd option value
2019-11-07 13:31:02 -05:00
Joshua T Flowers c70c7bfd68 Fix vendor scripts not autoloading (https://github.com/woocommerce/woocommerce-admin/pull/2907)
* Fix vendor scripts and test bootstrapping

* Escape the downloaded file URL in tests

* Generate feature config file for tests

* Run feature config generation before and after script tests
2019-09-25 14:20:15 -04:00
Jeff Stieler 953427bea5 Remove defunct filename prefix from remaining files.
Excluding the note classes for third party compatibility.
2019-08-12 15:06:36 -07:00
Jeff Stieler 13878db9ac PSR-4ify the feature plugin and install classes. 2019-08-12 15:03:21 -07:00
Jeff Stieler fbd231acf4 Add test for reports export endpoint. 2019-06-28 11:10:13 -06:00
Jeff Stieler 4711a4e11d Ensure coupons are enabled for testing. 2019-06-24 10:55:43 -06:00
Mike Jolley 254e378346 Moved actionsheduler hook to main file 2019-05-14 19:19:24 +01:00
Jeff Stieler bfe5a75e98 Update text domain. (https://github.com/woocommerce/woocommerce-admin/pull/1795)
* Translation call text domain change from “wc-admin” to “woocommerce-admin”.

* Fix .pot file generation.

* Fix errantly closed array item in /revenue/stats controller.

* Rename plugin zip, main file, and repo name to "woocommerce-admin".
2019-03-13 11:14:02 -06:00
Ron Rennick 7910e76d8c phpcs for bootstrap.php 2019-02-14 19:04:30 -04:00
Jeff Stieler 73c430b9b8 Merge pull request woocommerce/woocommerce-admin#1510 from woocommerce/fix/532-wc-install-approach
Use a WC_Install-like approach to initialize WC Admin data
2019-02-12 13:05:48 -08:00
Justin Shreve 60d364d329 Update 5.0.0 version check and add basic readme.txt (https://github.com/woocommerce/woocommerce-admin/pull/1521)
* Update version check, add basic WP.org readme

* Clean up test depedency since we are supporting 5.0.0 or greater

* add some additional keywords

* update greater than message
2019-02-12 15:22:16 -05:00
Justin Shreve 0fe061b97d Add Feature Flags (https://github.com/woocommerce/woocommerce-admin/pull/1500)
* First pass at adding feature flags. Accessible over PHP and JS.

* Hook up dev config to test enviornments, hook up features to their flags.

* Cleanup some code and add documentation. Remove beta config.

* Handle PR Feedback: Add devdocs flag, remove categories flag, fix auto-generated PHP warning.

* Add todo for beta phase.

* Handle PR feedback: Simplify is_array check, update build command, simplify test mock, remove empty webpack line.
2019-02-12 15:02:02 -05:00
Jeff Stieler 884825f325 Fix method calls in test suite (functions moved classes). 2019-02-08 13:19:20 -08:00
Jeff Stieler 21572698d8 Fix unit tests that rely on queued data updates. 2019-02-04 09:18:50 -07:00
Jeff Stieler 4cfa082d0f Load gutenberg from test plugins directory if required. 2019-01-23 16:59:10 -07:00
Jeff Stieler 2d4aea1971 Only install/activate Gutenberg plugin if WP version under test is earlier than 5.0. 2019-01-22 10:44:00 -07:00
Jeff Stieler 1a5af7094d Add WC_Action_Queue test helper class.
The test helper allows inspection of the action queue.
2019-01-16 09:45:04 -07:00
Timmy Crawford 88b899f7cb Remove trailing slash on base_dir variable. (https://github.com/woocommerce/woocommerce-admin/pull/1078) 2018-12-12 13:13:49 -08:00
Allen Snook 40376c23e1 Add unit tests for admin notes REST API 2018-11-14 11:06:53 -08:00
Peter Fabian 6f9dd9c61b Moved wc-admin installation to phpunit bootstrap. 2018-11-02 11:31:41 +01: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 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 389a2182a1 Initial setup for unit tests. 2018-09-20 16:20:04 +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
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