Commit Graph

173 Commits

Author SHA1 Message Date
Sam Seay f2ba2faf26 Fix a bug where the test zip command used the wrong file suffix for JS (https://github.com/woocommerce/woocommerce-admin/pull/7094) 2021-06-03 14:09:20 +12:00
Sam Seay edc8a1bdc5 Publish storybook docs, remove react docgen based docs (https://github.com/woocommerce/woocommerce-admin/pull/7055) 2021-06-02 15:54:00 +12:00
louwie17 69dfdf733c Add tree shaking support for woocommerce components (https://github.com/woocommerce/woocommerce-admin/pull/7034)
* Add woocommerce/components tree shaking support

* Compile individual component styles for individual use

* Update readme

* Add changelog

* Fix correct import

* Update readme with dependency extraction updates

* Update dependency extraction naming
2021-05-26 16:35:46 -03:00
Timmy Crawford 5c8fe41506 Update version to 2.4.0-dev and sync changelogs with release/2.3.0 branch (https://github.com/woocommerce/woocommerce-admin/pull/6991) 2021-05-14 14:50:15 -07:00
louwie17 a7db89ff4f Add dry run option for the release script (https://github.com/woocommerce/woocommerce-admin/pull/6946)
* Added dry run option and clean between core and plugin builds

* Add safety so I will not accidently start a release

* Change return to exit and update plugin release name on dry run

* Updated some of the logging

* Made use of git --dry-run and hub --noop

* Add dry run to add as well

* Removed dry-run command, updated log
2021-05-13 09:26:12 -03:00
louwie17 a41fb35045 Do a git clean before the core release as well (https://github.com/woocommerce/woocommerce-admin/pull/6945)
* Also do a git clean before the core release

* Fix spacing and add changelog
2021-05-06 10:55:53 +08:00
Sam Seay d98fe35faa Fix inconsistent quoting in the storybook script (https://github.com/woocommerce/woocommerce-admin/pull/6934) 2021-05-06 11:34:40 +12:00
louwie17 3ff1e1375e Update E2E config to support screenshots on test failure (https://github.com/woocommerce/woocommerce-admin/pull/6858)
* Add login page wait script for e2e tests

* Re-navigate to login page, if initial selector does not exist

* Add screenshot if login page did not render

* Add screenshot code, and screenshot artifacts to GH action

* Update screenshot logic for login

* Update artifact task

* Update upload artifact workflow

* Update jest config to make sure the screenshots work on test failures

* Remove old screenshot code

* Add screenshots to daily e2e tests as well incase of failure

* Add changelog
2021-04-26 13:41:38 -03:00
Tomek Wytrębowicz d6a126c301 Change `import-wp-css-storybook.sh`'s shebang to portable bash. (https://github.com/woocommerce/woocommerce-admin/pull/6875)
Fixes https://github.com/woocommerce/woocommerce-admin/issues/6874
2021-04-26 12:05:41 +02:00
louwie17 7859e37221 Making experimental package public and updating its dependency versions (https://github.com/woocommerce/woocommerce-admin/pull/6810)
* Making experimental package public, and updating the dependency versions

* add experimental to webpack and make explat public

* bump DEWP package version

* use filepath for inter package dependencies

* load experimental script

* remove check for experimental

Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-04-16 15:34:15 +12:00
Paul Sealock 7ab756b76c Try ExPlat: Add A/A test (https://github.com/woocommerce/woocommerce-admin/pull/6669)
* Add basic ExPlat initialization

* add tsx support
2021-04-15 13:32:46 +12:00
louwie17 3745a6a74e Add unminified assets if no minified assets exist in `make-zip.sh` (https://github.com/woocommerce/woocommerce-admin/pull/6732)
* Add unminified assets if no minified assets exist

* Add warning if multiple asset files exist
2021-04-14 09:23:43 -03:00
Adrian Duffell 7694bad218 Add Daily PHP Tests to CI (https://github.com/woocommerce/woocommerce-admin/pull/6715)
* Add daily PHP tests to CI

* Add support for WC_VERSION=latest env var

* Fix bug where wordpress used woocommerce version
2021-04-13 22:10:55 +08:00
Sam Seay 916d289e96 Fix a syntax error in the phpcs script. (https://github.com/woocommerce/woocommerce-admin/pull/6750) 2021-04-08 08:25:01 +12:00
louwie17 b29cd9a6c0 Add support for php8 unit tests (locally and in GH actions) (https://github.com/woocommerce/woocommerce-admin/pull/6678)
* Partial local version to run php8 unit tests

* Remove the post install scripts

* Remove tab

* Make sure woocommerce version contains patch number

* Remove unnecessary script

* Update bin settings and unit test script

* Remove phpunit binary

* Updated how php unit is being run

* Add specific phpunit version for php8

* Update bin phpunit composer.json

* Final cleanup of scripts

* Fix potential test where image is an object

* Move setting image below save

* Add changelog

* Do not convert obj/array to string for email_actions

* Remove some uses of tabs

* Set WP and WC version to minimum php 8 supported

* Remove unnecessary composer install within tests
2021-04-07 14:28:03 -03:00
Sam Seay cc01b9816e Fix TypeScript build for `packages` and add types for wc/data's onboarding store (https://github.com/woocommerce/woocommerce-admin/pull/6595) 2021-03-25 10:29:37 +13:00
Adrian Duffell a0ef649ef4 Remove composer v1 downgrade in PHP tests (https://github.com/woocommerce/woocommerce-admin/pull/6641) 2021-03-24 08:53:34 +08:00
Paul Sealock 8c1dcd949f Ensure script asset.php files are included in builds (https://github.com/woocommerce/woocommerce-admin/pull/6635)
* Ensure script asset.php files are included

* add changelog
2021-03-23 12:20:26 +13:00
louwie17 9b180db614 Add Typescript and page objects to E2E suite (https://github.com/woocommerce/woocommerce-admin/pull/6582)
* Initial playwright

* Updated e2e to use playwright and typescript

* Update set up environment and jest package

* Add changelog

* Add await to uncheck

* Fix formatting

* Revert jset back to ~24, as >25 runs slower, see facebook/jestwoocommerce/woocommerce-admin#9457

* Removed some unnecessary uses of waitForSelector

* Fix eslint issue

* Fix the e2e tests with latest updates

* Running most tests, with typescript now

* Fix any outstanding queries for the tests to work

* Update changelog

* Remove unnecessary jest version and unnecessary transform setting

* Fix test case broken after rebase

* Add fix to make e2e tests more robust

* Making sure dropdown value is correct

* Reove the wcpay condition for features number
2021-03-17 16:22:09 -03:00
Paul Sealock 7c61e2bff9 Hook Reference: Automate a reference resource (https://github.com/woocommerce/woocommerce-admin/pull/6454)
* read sample doc

* npm cli

* work with arrays

* Its happening

* better naming

* cleanup

* moar cleanup

* new line

* better

* save

* fixup rebase error

* package lock update

* node 12 usage

* add changelog

* fancy logs

* update package lock

* changelog in right place
2021-03-17 13:27:26 +13:00
Sam Seay 630f31ae9d Clean up unused deps and add TS to the build. (https://github.com/woocommerce/woocommerce-admin/pull/6441) 2021-03-01 16:01:22 +13:00
Paul Sealock 101df3b019 Add Dependency Extraction Webpack Plugin (https://github.com/woocommerce/woocommerce-admin/pull/5762)
* Add woo flavored DEWP

* clean up webpack config

* clean

* marketing coupons

* onboarding scripts

* nav scripts

* better imports of deps

* add asset files to bundle

* under git rebase conflict error

* try order

* Add wp_set_script_translations to the scripting loop

* changelog
2021-03-01 12:48:52 +13:00
Sam Seay 7e4a2a6dc8 Add a changelog lint check and auto-labelling to PRs (https://github.com/woocommerce/woocommerce-admin/pull/6414) 2021-02-24 14:47:06 +13:00
Sam Seay 27989ec4f2 Update client and packages builds to use corejs 3 and latest wp babel preset (https://github.com/woocommerce/woocommerce-admin/pull/6411) 2021-02-24 14:24:22 +13:00
Bec Scott e7c533e51b Shell script to release a tagged version to wordpress.org (https://github.com/woocommerce/woocommerce-admin/pull/5236)
* Shell script to release a tagged version to wordpress.org

* Fix prompt URL

* Add step to tag the release
2021-02-15 11:12:33 +10:00
Paul Sealock 07c4404f16 add settings and bump version (https://github.com/woocommerce/woocommerce-admin/pull/6331) 2021-02-15 10:44:46 +13:00
Darren Ethier 4cd14f5137 Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295)
* switch block-settings alias to settings and fix mapped external

* don’t force compilation of externals to `this` scope.

* update various meta data in package related files (changelog etc)

* update starter pack

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-02-10 12:55:38 +13:00
Paul Sealock 5871e9e9d2 Dependency Extraction Webpack Plugin: bump version to 1.2 (https://github.com/woocommerce/woocommerce-admin/pull/6268)
* bump DEWP to 1.2

* reference PR number
2021-02-09 15:20:54 +13:00
Adrian Duffell b690b37910 Add WordPress version selection to Docker PHP test suite (https://github.com/woocommerce/woocommerce-admin/pull/6245)
* Add WordPress version selection to Docker PHP test suite

* Remove guard for old WordPress version

It was producing an error message when valid versions like “5.3” are selected:

bin/install-wp-tests.sh: line 22: [: 5.3: integer expression expected

I removed it since disallowing older versions doesn't really add any value now.

* Bump image version to trigger rebuild

* Fix existing WordPress version not being replaced

The install-wp-tests.sh script does not install WordPress if a previous installation is detected.

To enable WP version switching, the ENTRYPOINT removes previous files to ensure the installation starts from a clean state.

* Partially revert abd8ab80dc7ef6b57316636d467b511a07d0c5d3

The typo fix was accidentally included in this commit.

* Fix installation routine running every time

A typo was causing the installation routine to run on each use.
2021-02-09 06:33:01 +08:00
Paul Sealock 88d72c88cd Dependency Extraction Webpack Plugin: Add Woo Blocks packages (https://github.com/woocommerce/woocommerce-admin/pull/6228)
* Hard code package names and alias block-settings

* instructions

* update readme

* block to blocks

* plural blocks

* just wcSettings, not wc.wcSettings
2021-02-04 17:43:24 +13:00
Sam Seay 242bdb475d Migrate the Travis unit test suite to Github actions (https://github.com/woocommerce/woocommerce-admin/pull/6164)
Add a matrix of tests against WP and WC versions and migrate the lint and js test to separate jobs.
2021-02-01 15:24:11 +13:00
Bruno Ribarić 5e5848bcd8 Remove redundant if statement in PHP Test Suite (https://github.com/woocommerce/woocommerce-admin/pull/6169) 2021-01-28 13:29:38 +08:00
Darren Ethier 4210b6f0a8 Update @wordpress/eslint-plugin dependency to latest version. (https://github.com/woocommerce/woocommerce-admin/pull/5856)
* update @wordpress/eslint-plugin dependency to latest version

* local prettier config isn’t needed anymore because of fix in upstream package

* add jsdoc config to use typescript format for jsdocs

* update changelog

* update packages and include .prettierrc.js back in for code editor support of prettier

* add docs

* minor prettier fix in test file

* Convert all new eslint rules throwing errors to warnings temporarily to be handled in separate prs

* updated changelog

* fix package-lock.json

* prettier auto-fixes

* add prettier dependency at root

* sigh prettier is being finicky

* version bump

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-01-26 13:24:28 +13:00
louwie17 4ab71bd963 Update travis CI to use a new distribution - xenial (https://github.com/woocommerce/woocommerce-admin/pull/6067)
* Update travis CI to use a new distribution - xenial

* Add changelog
2021-01-14 09:43:14 -04:00
Paul Sealock 8c8efd59fc Dependency Extraction Webpack Plugin: Handle irregular dependency names (https://github.com/woocommerce/woocommerce-admin/pull/5770)
* fix irregular dependency names

* starter pack

* blocks registry

* update docs
2020-12-16 08:22:19 +13:00
Ilyas Foo 9c7055a135 Test install script resets test environment (https://github.com/woocommerce/woocommerce-admin/pull/5761)
* Add reset option to bin/install-wp-tests.sh

* Fix logic issues and made reset more verbose

* Add testing suite removal on reset

* Change behaviour of test install script to reset by default

* Silence install-wp-tests.sh reset commands
2020-12-07 13:10:13 +08:00
Paul Sealock 71a9014e87 use is_admin_or_embed_page 2020-11-24 15:25:09 +13:00
Paul Sealock ac589e459e better check 2020-11-24 15:25:09 +13:00
Paul Sealock 064ff1fa67 load scripts on all pages 2020-11-24 15:25:09 +13:00
Sam Seay 564a4ffddb Remove unused dependencies, convert buildScss to async. (https://github.com/woocommerce/woocommerce-admin/pull/5715) 2020-11-24 09:21:16 +13:00
Sam Seay ebddffb8e8 Post 1.7.0 beta release chores (https://github.com/woocommerce/woocommerce-admin/pull/5558)
* Bump versions to 1.8.0-dev
* Update changelog for 1.7.0
2020-11-19 08:36:45 +13: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
Paul Sealock eefc8cade0 fixes 2020-11-17 16:11:10 +13:00
Paul Sealock e3a3d3af5c create ext readme 2020-11-17 16:11:10 +13:00
Sam Seay 364b764eb5 Fix the travis build and move the e2e tests to GH actions (https://github.com/woocommerce/woocommerce-admin/pull/5635) 2020-11-16 17:33:06 +13:00
Paul Sealock 3ca852ae5b version bump dewp 2020-11-16 15:34:47 +13:00
Paul Sealock 7189fb6d4e update scripts to composer 2 (https://github.com/woocommerce/woocommerce-admin/pull/5577) 2020-11-16 11:59:11 +13:00
Paul Sealock 4e785e30a7 Package builds: avoid building dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/5598)
* fix starter pack

* fixes

* revert lock

* fixup package.json
2020-11-12 22:31:18 +13:00
Jeff Stieler c26db640d6 Update dependencies in prep for Composer 2.x. (https://github.com/woocommerce/woocommerce-admin/pull/5462)
* Update dependencies in prep for Composer 2.x.

* Rollback jetpack autoloader update.

* Restore range versions for composer dependencies, regenerate lock with Composer 1.x.

* Fix PSR-4 Classes (https://github.com/woocommerce/woocommerce-admin/pull/5473)

* PSR-4 class names need to match their filename.

Remove underscores in classnames.

* Fix reported class name in deprecation notice.

* Fix comments.

* We don't need composer dependencies in core WC test setup.

* Update composer lockfile using version 2.x.

* Temporarily turn off error display.

Function deprecation notices are breaking tests.
2020-10-28 13:12:14 -04:00
Sam Seay fc030fb007 Migrate the devdocs examples to Storybook CSF stories (https://github.com/woocommerce/woocommerce-admin/pull/5271)
Fixes woocommerce/woocommerce-admin#5234
2020-10-15 14:55:55 +13:00