woocommerce/plugins/woocommerce-admin/packages/admin-e2e-tests
Moon b2d32e9e72 Add required dependencies for pnpm nx build {package} command (https://github.com/woocommerce/woocommerce-admin/pull/8436)
* Add required dependencies for pnpm nx install {package} command

* Update pnpm lock file

* Add missing deps for packages/*

* Change to use relative imports for packages/components

* Move ts from deps to devDeps

* Add rimraf to packages/* devDependencies for clean command

* Add webpack cli to packages dependencies

* Add jest-cli to packages devDependencies

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-03-14 20:04:46 -07:00
..
src Prompt a modal to save any unsaved changes in OBW (https://github.com/woocommerce/woocommerce-admin/pull/8278) 2022-02-17 11:15:11 -08:00
typings Add task list and activity panel E2E tests (https://github.com/woocommerce/woocommerce-admin/pull/7509) 2021-09-03 08:21:43 -03:00
.npmrc Allow packages to be built in isolation. (https://github.com/woocommerce/woocommerce-admin/pull/7286) 2021-07-14 16:38:57 -04:00
CHANGELOG.md Update all js packages with minor/patch version changes (https://github.com/woocommerce/woocommerce-admin/pull/8392) 2022-03-08 10:11:12 +08:00
README.md Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349) 2022-03-04 12:01:16 +08:00
package.json Add required dependencies for pnpm nx build {package} command (https://github.com/woocommerce/woocommerce-admin/pull/8436) 2022-03-14 20:04:46 -07:00
tsconfig.json Enable Typescript checking on ./client folder (https://github.com/woocommerce/woocommerce-admin/pull/8372) 2022-03-01 12:19:07 +08: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