* Change atomic blocks to not use custom webpack build paths
we want to always load lazy loaded components from their default paths
to avoid having to handle importing components in different ways for
regular and atomic component packages
* Add footer parts to test themes
The Site Editor is expecting the footer parts to be there or it will try to
load them anyways and throw a 404. It's not breaking, but it's polluting
the console.
* Use REST API to tear down the templates
Previously, we used a util called `trashAllPosts` which navigated to the post UI
and deleted all the posts to tear down any side-effects of template editing tests.
However, with a [recent change](14e20f72b5),
WP Core removed the UI for those and that made our tests meet a 500 error.
Using the REST API should also make everything faster.
* Remove deprecated pupeteer waitFor usage
was still present in attribute-filter.test.js
* Update package-lock.json
* pin package versions
* Unify all atomic blocks to register on php side
* Remove Atomic Blcoks chunk_translation handling from AllBlocks
Before it was responsible for enabling translations for all the atomic blocks
* Add per atomic block chunk_translation registration
* update @wordpress/e2e-test-utils to 6.0.2
* add optional puppeteer
* pin workflows node version to 16.13.2
* upgrade package-lock
* upgrade package-lock
* set react and react-dom as peerDeps
* remove atomic block registration
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Tax is displayed correctly e2e test
* Add extra utils to shopper
* add single e2e test script oin package.json
* Feedback changes from Niels
* Test tax is correct on summary page
* Check if CI test passes
* Longer timeout for tax test
* change timeout in jest config
* increate jest timeout
* Test
* Test
* Test
* setTimeout outside of tests to 120000
* Address raluca's feedback and timeout everywheregaa
* Increase timeout on for search box
* set jest timeout to 120000
* Raluca's suggestions
* Debug
* Increase search timeout to 5000
* Only run Tax e2e tests in CI for quicker debug - REMOVE THIS
* use waitforSelector
* 30s delay for toMatchElement
* Let'shope this works
* Remove toMatchElement
* waitForSelector
* Run debug test only
* Debug tax test
* debug taxes
* shopper using toMatchElement again
* Remove the 30000 timeout delay from toMatchElement
* Run all tests but only once
* Remove tax test
* Revert "Remove tax test"
This reverts commit 7db34120e1e91f4fd26514fdb9525cac2a6066bb.
* Delete the minicart test
* Revert "Revert "Remove tax test""
This reverts commit 31dd654e52f37fcd02ccd25336958248bef495c6.
* Revert "Delete the minicart test"
This reverts commit 5595f0834a975d097a300bc0c7cbf643caa8b764.
* tax test
* block addToCart
* Put back block functions
* Refactor block.addToCart
* mini-cart e2e test uses shopper.block.emptyCart()
* only run shopper tests in CI
* Run frontend and shopper tests and change waitFor -> waitForTimeout
* Run frontend tests in CI
* Run CI e2e tests again
* Skip legacy template blocks
* Skip legacy template test but run all others
* Switch to storefront instead of twentytwentyone after legacy-template-blocks tests finish
* Tidy up
* fix typo
* Fix ESLint issue
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
* Update release-initial-checklist.md
This PR creates a new section `If this release is deployed to WordPress.org...` similar to the one in `patch-initial-checklist.md`
* Update patch release checklist
* Add links to single routes in main index woocommerce/woocommerce-blocks#4473
* Footer
* Feedback template
* Remove footer from existing MD files
* Add doc footer script
* Apply script to all docs
* Fix examples
* Remove unnecessary setup step and use node v16 in E2E action
* Ensure storefront is active
* Use new checkout fixture
* Try with only checkout test
* Update package.json
* Run all tests, not just checkout
* Update release initial checklist template
This PR includes more information about updating the Woo Blocks version in the WooCommerce repository:
- it updates the PR used as an example
- it updates the url for the composer.json file in WC repo
- it add info about how to update the composer.json and lock files
* Update .github/release-initial-checklist.md
* Add test environment to catch errors
* Add jest-circus and jest-html-reporters
This is so we can log the screenshots and errors that happen during E2E tests.
* Use the jest reporters and jest-circus to run the E2E tests
* Force cart test to break
Revert this!
* Upload jest report artifact when tests fail
* Run artifact upload on failure
* Upload entire report directory to artifact
* Revert "Force cart test to break"
This reverts commit c57f2c5ab1d7b60d8824d854c1cb9a8281a71c4b.
* Update .gitignore and jest.config
* Force cart test to break
* Force cart test to break
* Remove <rootDir> from jest-html-reporter path
This was causing the artefact not to upload.
* Revert "Force cart test to break"
Co-authored-by: Niels Lange <info@nielslange.de>
- updated release pull request description template to be more condensed and require no editing.
- moved some elements of release pull request items into pull request template (handled at the PR level instead of the release level).
- updated the release pull request checklist templates to include mobile and desktop test coverage for ui changes.
* Tidy up bootstap so it uses autoloaders and works with the known plugin paths
* eslint ignore woocommerce bin
* Use WC from bin in wp-env
* Git ignore woocommerce in bin
* Remove reliance on core framework across phpunit tests
* Simplify bootstrap - since test framework is no longer required, there is no need to pull in woo from github
* Remove unused configs
* Update CI
* Implement PHPunit Polyfill
* Abstract the test case
* Update lock
* remove chown
* experiment: try sudo
* move phpversion to first run
* Remove 7.0 tests :(
* test plugin override for 5.5 test
* Use dev version
* Fix formatting
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* update README files with version requirements
* update phpcs config
* update default environment for tests locally
* update workflows to only test against versions matching new policy
* update plugin header for new version policy
* restore older WP version support in E2E tests and PHPCS
I realized that we might still want to test against L2 WP versions in our E2E tests until those tests can be moved to WC core. While the feature plugin is L0, we still need to support L2 for existing features that are already surfaced in the WooCommerce plugin package.
Also with PHPCS if there are fixes to older things in the codebase, we will need to preserve the usage of L2 friendly (back-compat) code.
* add detection of Woo Core version to bootstrap
* update version used in phpunit tests
* add links to version policy update post
* restore 5.5.1 for Woo Core version
Getting errors with 5.5.2 - not sure what's going on but might be the tag isn't available as expected for 5.5.2 maybe?
* switch to hardcoded version header reference
PHPUNIT was tripping on this for some reason.
* remove older WP version e2e test workflows
* fix phpunit tests for new woo test suite
Woo Core now uses a container and has some mocks that are used in some legacy test helpers.
* remove explicit set WOO_VERSION for phpunit tests.
This should default to latest for the GH workflow runs.
* Update release PR template.
Add some explicit instructions around updating required WP and WC versions at time of release.
* use latest WOO_VERSION in .env
* some improvements to reduce the things needing updated
* remove extraneous code
* Add some more checklist items to release PR templates
* remove unnecessary conditional
* remove is-dismissible css classes
* Improve clarity of error messaging
* Update README.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* remove checklist items about versions for patch releases
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Tidy and document current configs
* Add terser package
* sharedConfig with Terser plugin setup
* replace todo
* revert change to alias
* Package lock update
* ci to install
* Revert "ci to install"
This reverts commit a65b7f3ca8ef8ab1cb78f825a43ca8df07f784bb.
* revert shared config
* fix extra comma
* tweak setup
* Missing jsx
* allow for WOO_VERSION config in tests setup
* pass through WOO_VERSION environment var to container
* force specific WOO_VERSION value for phpunit test run
* try passing through environment variable via docker arg
Also set .env for controlling local runs of phpunit
Trying a different way of adding a commit to allow for pr creation on release pull requests. This way reduces both the number of commits and requires no actual file changes.
* update wp-env package
* bump versions in e2e workflows
* Fix job names
* explicitly set core WP version
without this, the `mappings` configuration option causes breakage due to what appears to be a bug in the package.
* Change how GB install job is setup
`wp-env` currently has an issue where if you define the explicit WP version to install (vs just what is included by default), permissions aren’t configured correctly for the WP folder in the containers. So the ability to install plugins via cli is not possible. This only surfaces in linux environments.
I tried a number of ways to work around this but in the end the only foolproof way is to configure the environment to be setup with the installed plugin.
* add circular dependency check and fix it
* only throw error
* udpate error message
* only throw on production
* better defaults
* add variable to travis
* double echo
* echo with -e