2db29164f9
* Update to pnpm 9.1 and fix a mini css bug * Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai * temporarily disable swallowing build output to diagnose issue with perf workflow * Ignore some type issues that commonly resurface when deps slightly change * Fix persistent type issues that have recurred many times * Add more ignores * Fix lint issue * Revert change to swallow build error * Improve access of the config that needs updated build dir. --------- Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
changelog | ||
src | ||
typings | ||
.eslintrc.js | ||
.npmrc | ||
CHANGELOG.md | ||
README.md | ||
composer.json | ||
composer.lock | ||
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
:
import { testAdminBasicSetup } from '@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 |