Better e2e tests #789
Labels
type: technical debt - external devX
This issue/PR suffers from the ergonomics of external tools/dependencies
type: technical debt
This issue/PR represents/solves the technical debt of the project.
User story
This issue is to document the findings and effort to make e2e tests work for our plugin.
Previously in issue #42, we've put in a very minimal e2e test using @wordpress/env. Currently, when I check out the
trunk
branch and try to runnpm run wp-env start
, I'm encountering an error that says:The above error is documented and fixed in issue WordPress/gutenberg#29752.
I've also looked into e2e test in https://github.com/woocommerce/woocommerce and https://github.com/woocommerce/woocommerce-admin. They both uses
@woocommerce/e2e-environment
and@woocommerce/e2e-utils
packages. There is also a@woocommerce/e2e-core-tests
package that can be used to run e2e test for WooCommerce. I am able to run the e2e tests for https://github.com/woocommerce/woocommerce-admin successfully (although there is one failed test, due to programming error I believe).So for our plugin here, the next step would be to remove the existing e2e tests based on
@wordpress/env
and@wordpress/e2e-test-utils
, and instead rely on@woocommerce/e2e-environment
and@woocommerce/e2e-utils
.The first iteration should cover basic "get started" things like the following:
We can cover account connections in the Setup MC Step 1 page in the next iteration. That would require us to mock API calls to WordPress.com and Google.
With the above foundation in place, it would be easier for us to incrementally add more e2e tests in the future.
The text was updated successfully, but these errors were encountered: