woocommerce/plugins/woocommerce-admin/packages/admin-e2e-tests
louwie17 e6cf391141 Make sure batch fetch resolved data remains consistent (https://github.com/woocommerce/woocommerce-admin/pull/7587)
* Adjust batch fetch logic so data stays the same

* Fix receive options action call

* Resolve returned result

* Add missing await
2021-09-08 09:37:44 -03:00
..
src Make sure batch fetch resolved data remains consistent (https://github.com/woocommerce/woocommerce-admin/pull/7587) 2021-09-08 09:37:44 -03: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 Add task list and activity panel E2E tests (https://github.com/woocommerce/woocommerce-admin/pull/7509) 2021-09-03 08:21:43 -03:00
README.md Create E2E package (https://github.com/woocommerce/woocommerce-admin/pull/7084) 2021-07-13 16:38:05 -03:00
package.json Refactor package style builds (https://github.com/woocommerce/woocommerce-admin/pull/7531) 2021-08-19 10:15:59 -04:00
tsconfig.json Allow packages to be built in isolation. (https://github.com/woocommerce/woocommerce-admin/pull/7286) 2021-07-14 16:38:57 -04: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

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