Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes no changes to the plugin itself.
It adds the wp-env Docker environment which provides two sites, at http://localhost:8888 is a development site, configured so changes made to the plugin are immediately reflected, and at http://localhost:8889 a test site, which when the environment is started, a zip of the plugin is built and installed.
There are two very simple tests included. The
.env.secret.dist
file needs to be copied to.env.secret
and a valid wallet address and viewkey configured.More commands are documented in the
tests/e2e-pw/README.md
file.Playwright (developed by Microsoft) is the end-to-end test framework chosen by WordPress and WooCommerce.
Playwright and wp-env are installed via NPM
Additionally, the WooCommerce plugin is installed twice, and two copies of WordPress are installed, via Composer
One copy of WooCommerce is used during the tests, i.e. the distribution build of WooCommerce, and the full woocommerce/woocommerce GitHub repo is installed for access to documentation and code samples. One copy of WordPress is installed for use with Xdebug and the second install is the full WordPress/wordpress-develop repository.
wp-cli/dist-archive-command is installed via Composer to build the plugin zip file. It uses the
.distignore
file to control what is included in the archive.The intention is to add more test to truly verify end to end operation of the plugin.