d41906267a
* Add payment_setup track for WooCommerce Payments * Add WooCommerce Reset Plugin to E2E environment * Add resetWoComerceState util * Add state reset before obw test * Refactor resetWooCommerceState resetWooCommerceState now makes the HTTP request locally instead of from inside the browser context. * Update reset functionality * Add custom settings reset function for onboarding * Update reset functionality * Add action-scheduler run helper function * Fix add section test * Add plugin removal helper functions * Fix lint errors * Fix broken e2e tests * Add changelog * Remove unused imports * Add comment for extra timeout * Add helper function to wait until button stops moving, incase of animations * Fix lint error * Add variable for string used in multiple places Co-authored-by: Adrian Duffell <9312929+adrianduffell@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
npm 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 |