woocommerce/packages/js/admin-e2e-tests
Ilyas Foo f9f85103c5 Attempt to reenable e2e 2022-04-18 09:06:03 +08:00
..
src Attempt to reenable e2e 2022-04-18 09:06:03 +08:00
typings Moved WCA Packages 2022-03-18 14:25:26 -07:00
.eslintrc.js Add .eslintrc config to each packages 2022-03-29 16:08:07 +08:00
.npmrc Moved WCA Packages 2022-03-18 14:25:26 -07:00
CHANGELOG.md Merge remote-tracking branch 'origin/trunk' into update/32132-payment-logic-in-task-and-settings 2022-04-14 09:48:39 +08:00
README.md Moved WCA Packages 2022-03-18 14:25:26 -07:00
package.json Merge pull request #32518 from woocommerce/update/32516-woocommerce-admin-links 2022-04-14 13:40:25 +08:00
project.json Add build-watch to most js packages and remove packages watch from woocommerce-admin command 2022-03-30 11:46:12 -03:00
tsconfig.json Moved WCA Packages 2022-03-18 14:25:26 -07:00

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