diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index bf0a99c028d..a20fb54f898 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -27,7 +27,7 @@ If you have questions about the process to contribute code or want to discuss de - [Naming conventions](https://github.com/woocommerce/woocommerce/wiki/Naming-conventions) - [String localisation guidelines](https://github.com/woocommerce/woocommerce/wiki/String-localisation-guidelines) - [Running unit tests](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/tests/README.md) -- [Running e2e tests](https://github.com/woocommerce/woocommerce/wiki/End-to-end-Testing) +- [Running e2e tests](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/tests/e2e/README.md) ## Coding Guidelines and Development 🛠 @@ -48,8 +48,8 @@ If you are contributing code to the (Javascript-driven) WooCommerce Admin projec ## Feature Requests 🚀 -Feature requests can be [submitted to our issue tracker](https://github.com/woocommerce/woocommerce/issues/new?template=6-Feature-request.md). Be sure to include a description of the expected behavior and use case, and before submitting a request, please search for similar ones in the closed issues. +Feature requests can be [submitted to our issue tracker](https://github.com/woocommerce/woocommerce/issues/new?assignees=&labels=type%3A+enhancement%2Cstatus%3A+awaiting+triage&template=2-enhancement.yml&title=%5BEnhancement%5D%3A+). Be sure to include a description of the expected behavior and use case, and before submitting a request, please search for similar ones in the closed issues. Feature request issues will remain closed until we see sufficient interest via comments and [👍 reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/) from the community. -You can see a [list of current feature requests which require votes here](https://github.com/woocommerce/woocommerce/issues?q=is%3Aclosed+label%3A%22type%3A+enhancement%22+label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc). +You can see a [list of current feature requests which require votes here](https://github.com/woocommerce/woocommerce/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+label%3A%22needs%3A+votes%22+). diff --git a/.github/ISSUE_TEMPLATE/2-enhancement.yml b/.github/ISSUE_TEMPLATE/2-enhancement.yml index 0da172f20d9..3c7637cea8c 100644 --- a/.github/ISSUE_TEMPLATE/2-enhancement.yml +++ b/.github/ISSUE_TEMPLATE/2-enhancement.yml @@ -10,7 +10,7 @@ body: Please provide us with the information requested in this form. - Make sure to look through [existing `type: enhancement` issues](https://github.com/woocommerce/woocommerce/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+enhancement%22) and [existing `votes needed` issues](https://github.com/woocommerce/woocommerce/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+label%3A%22votes+needed%22) to see whether your idea is already being discussed. + Make sure to look through [existing `type: enhancement` issues](https://github.com/woocommerce/woocommerce/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+enhancement%22) and [existing `votes needed` issues](https://github.com/woocommerce/woocommerce/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+label%3A%22needs%3A+votes%22+) to see whether your idea is already being discussed. Feel free to contribute to any existing issues. Search tip: You can filter our issues using [our enhancement label](https://github.com/woocommerce/woocommerce/issues?q=is%3Aissue+label%3A%22type%3A+enhancement%22+). Search tip: Make use of [GitHub's search syntax to refine your search](https://help.github.com/en/github/searching-for-information-on-github/searching-issues-and-pull-requests). diff --git a/packages/js/e2e-core-tests/CHANGELOG.md b/packages/js/e2e-core-tests/CHANGELOG.md index 65f185480e2..3996c4db256 100644 --- a/packages/js/e2e-core-tests/CHANGELOG.md +++ b/packages/js/e2e-core-tests/CHANGELOG.md @@ -27,7 +27,7 @@ - Support for re-running setup and shopper tests - Shopper Order Email Receiving -- New tests - See [README.md](https://github.com/woocommerce/woocommerce/blob/trunk/tests/e2e/core-tests/README.md) for list of available tests +- New tests - See [README.md](https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/e2e-core-tests/README.md) for list of available tests ## Fixed diff --git a/packages/js/e2e-environment/builtin.md b/packages/js/e2e-environment/builtin.md index 2b91b80bd98..683e4269001 100644 --- a/packages/js/e2e-environment/builtin.md +++ b/packages/js/e2e-environment/builtin.md @@ -16,7 +16,7 @@ wp post create --post_type=page --post_status=publish --post_title='Ready' --pos ### Project Initialization -Each project will have its own begin test state and initialization script. For example, a project might start testing expecting that the [sample products](https://github.com/woocommerce/woocommerce/tree/trunk/sample-data) have already been imported. Below is the WP CLI equivalent of the built in initialization script for WooCommerce Core E2E testing: +Each project will have its own begin test state and initialization script. For example, a project might start testing expecting that the [sample products](https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce/sample-data) have already been imported. Below is the WP CLI equivalent of the built in initialization script for WooCommerce Core E2E testing: ``` diff --git a/packages/js/e2e-environment/external.md b/packages/js/e2e-environment/external.md index a39ff5965bb..b3eea9b1129 100644 --- a/packages/js/e2e-environment/external.md +++ b/packages/js/e2e-environment/external.md @@ -16,7 +16,7 @@ wp post create --post_type=page --post_status=publish --post_title='Ready' --pos ### Project Initialization -Each project will have its own begin test state and initialization script. For example, a project might start testing expecting that the [sample products](https://github.com/woocommerce/woocommerce/tree/trunk/sample-data) have already been imported. Below is the WP CLI equivalent initialization script for WooCommerce Core E2E testing: +Each project will have its own begin test state and initialization script. For example, a project might start testing expecting that the [sample products](https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce/sample-data) have already been imported. Below is the WP CLI equivalent initialization script for WooCommerce Core E2E testing: ``` diff --git a/plugins/woocommerce/includes/admin/class-wc-admin-help.php b/plugins/woocommerce/includes/admin/class-wc-admin-help.php index c4531915bdf..c5afccda4d3 100644 --- a/plugins/woocommerce/includes/admin/class-wc-admin-help.php +++ b/plugins/woocommerce/includes/admin/class-wc-admin-help.php @@ -65,8 +65,8 @@ class WC_Admin_Help { 'content' => '

' . __( 'Found a bug?', 'woocommerce' ) . '

' . /* translators: 1: GitHub issues URL 2: GitHub contribution guide URL 3: System status report URL */ - '

' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via Github issues. Ensure you read the contribution guide prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your system status report.', 'woocommerce' ), 'https://github.com/woocommerce/woocommerce/issues?state=open', 'https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '

' . - '

' . __( 'Report a bug', 'woocommerce' ) . ' ' . __( 'System status', 'woocommerce' ) . '

', + '

' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via GitHub issues. Ensure you read the contribution guide prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your system status report.', 'woocommerce' ), 'https://github.com/woocommerce/woocommerce/issues?state=open', 'https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '

' . + '

' . __( 'Report a bug', 'woocommerce' ) . ' ' . __( 'System status', 'woocommerce' ) . '

', ) ); @@ -75,7 +75,7 @@ class WC_Admin_Help { '

' . __( 'For more information:', 'woocommerce' ) . '

' . '

' . __( 'About WooCommerce', 'woocommerce' ) . '

' . '

' . __( 'WordPress.org project', 'woocommerce' ) . '

' . - '

' . __( 'Github project', 'woocommerce' ) . '

' . + '

' . __( 'GitHub project', 'woocommerce' ) . '

' . '

' . __( 'Official theme', 'woocommerce' ) . '

' . '

' . __( 'Official extensions', 'woocommerce' ) . '

' ); diff --git a/plugins/woocommerce/src/README.md b/plugins/woocommerce/src/README.md index 3e0df5c1657..a1712fcef45 100644 --- a/plugins/woocommerce/src/README.md +++ b/plugins/woocommerce/src/README.md @@ -177,13 +177,13 @@ use Automattic\WooCommerce\TheDependencyNamespace\TheDependencyClass; class TheClassServiceProvider extends AbstractServiceProvider { - protected $provides = array( - TheClass::class - ); + protected $provides = array( + TheClass::class + ); - public function register() { - $this->add( TheClass::class )->addArgument( TheDependencyClass::class ); - } + public function register() { + $this->add( TheClass::class )->addArgument( TheDependencyClass::class ); + } } ``` @@ -209,15 +209,15 @@ use Automattic\WooCommerce\TheDependencyNamespace\TheDependencyClass; class TheClassServiceProvider extends AbstractServiceProvider { - protected $provides = array( - TheClass::class, + protected $provides = array( + TheClass::class, TheDependencyClass::class - ); + ); - public function register() { + public function register() { $this->share( TheDependencyClass::class ); - $this->share_with_auto_arguments( ActionsProxy::class ); - } + $this->share_with_auto_arguments( ActionsProxy::class ); + } } ``` @@ -405,7 +405,7 @@ Unit tests are a fundamental tool to keep the code reliable and reasonably safe ### Mocking dependencies -Since all the dependencies for classes in this directory are dependency-injected or retrieved lazily by directly accessing the container, it's easy to mock them by either manually creating a mock class with the same public surface or by using [PHPUnit's test doubles](https://phpunit.readthedocs.io/en/9.2/test-doubles.html): +Since all the dependencies for classes in this directory are dependency-injected or retrieved lazily by directly accessing the container, it's easy to mock them by either manually creating a mock class with the same public surface or by using [PHPUnit's test doubles](https://phpunit.readthedocs.io/en/9.5/test-doubles.html): ```php $dependency_mock = somehow_create_mock(); diff --git a/plugins/woocommerce/tests/e2e/README.md b/plugins/woocommerce/tests/e2e/README.md index 0f734809c01..6ca2c9a3b14 100644 --- a/plugins/woocommerce/tests/e2e/README.md +++ b/plugins/woocommerce/tests/e2e/README.md @@ -63,7 +63,7 @@ This section explains how e2e tests are working behind the scenes. These are not ### Test Environment -We recommend using Docker for running tests locally in order for the test environment to match the setup on Github CI (where Docker is also used for running tests). [An official WordPress Docker image](https://github.com/docker-library/docs/blob/master/wordpress/README.md) is used to build the site. Once the site using the WP Docker image is built, the current WooCommerce dev branch is mapped into the `plugins` folder of that newly built test site. +We recommend using Docker for running tests locally in order for the test environment to match the setup on GitHub CI (where Docker is also used for running tests). [An official WordPress Docker image](https://github.com/docker-library/docs/blob/master/wordpress/README.md) is used to build the site. Once the site using the WP Docker image is built, the current WooCommerce dev branch is mapped into the `plugins` folder of that newly built test site. ### Test Variables @@ -289,7 +289,7 @@ In the WooCommerce Core repository the tests are in `tests/e2e/core-tests/specs/ The following packages are used in write tests: - `@automattic/puppeteer-utils` - utilities and configuration for running puppeteer against WordPress. See details in the [package's repository](https://github.com/Automattic/puppeteer-utils). -- `@woocommerce/e2e-utils` - this package contains utilities to simplify writing e2e tests specific to WooCommmerce. See details in the [package's repository](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e/utils). +- `@woocommerce/e2e-utils` - this package contains utilities to simplify writing e2e tests specific to WooCommmerce. See details in the [package's repository](https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-utils). ### Creating test structure