86fc8b62e5
* Add pnpm-workspace.yaml * Add missing dependencies & replace file: with workspace:* in package.json * Replace "npm" with "pnpm" * Replace "npx" with "pnpx" * Remove package-lock.json * Add pnpm setup action to github workflows * Update webpack babel exclude path * Upgrade woo e2e and fix e2e test command Update e2e.yml Use pnpm run e2e:docker-up in e2e.yml * Remove unused docker-compose.yaml * Replace lerna with pnpm commands Update publish commands * Exclude _locutus_shared_bc.js in babel.config.js * Add .npmrc to set enable-pre-post-scripts=true by default * Fix storybook babel config Update babel.config.js * Add changelog * Update pnpm-lock.yaml * Replace pnpx with pnpm exec * Update pnpm-lock.yaml * Remove js-tests/package-lock.json * Fix @woocommerce/tracks -> workspace:* * Update pnpm-lock.yaml * Add @woocommerce/experimental to onboarding/package.json * Add "@woocommerce/component" to onboarding/package.json * Update pnpm-lock.yaml * Use || instead of && for "test:watch" Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com> * Fix packages/number "clean" command * Add root: true to .eslintrc.js to enforce it to use the root config file * Exclude packages/**/node_modules from babel transpiling * Fix js-tests build config Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
typings | ||
.npmrc | ||
CHANGELOG.md | ||
README.md | ||
package.json | ||
tsconfig.json |
README.md
Admin E2E Tests
An end-to-end test suite for WooCommerce setup, onboarding, home screen/task list, and analytics.
Installation
Install the module
pnpm install @woocommerce/admin-e2e-tests --save
Usage
Create a E2E test specification file under /tests/e2e/specs/example.test.js
:
const { testAdminBasicSetup } = require( '@woocommerce/admin-e2e-tests' );
testAdminBasicSetup();
See the wooCommerce E2E Boilerplate for instructions on setting up an E2E test environment.
Configuration
Add the following entries to tests/e2e/config/default.json
"onboardingwizard": {
"industry": "Test industry",
"numberofproducts": "1 - 10",
"sellingelsewhere": "No"
},
"settings": {
"shipping": {
"zonename": "United States",
"zoneregions": "United States (US)",
"shippingmethod": "Free shipping"
}
}
Available tests
The following test functions are included in the package:
Function | Description |
---|---|
testAdminBasicSetup |
Test that WooCommerce can be activated with pretty permalinks |
testAdminOnboardingWizard |
Complete the onboarding wizard with US merchant |
testAdminNonUSRecommendedFeatures |
Complete the onboarding wizard with non-US merchant |
testSelectiveBundleWCPay |
Ensure onboarding wizard offers WC Payments in appropriate contexts |
testAdminAnalyticsPages |
Test that the React App is functional on Analytics pages |
testAdminCouponsPage |
Test that the Coupons is functional |
testAdminPaymentSetupTask |
Test that payment methods can be configured |